summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgregor herrmann <gregoa@debian.org>2024-03-02 01:55:39 +0100
committergregor herrmann <gregoa@debian.org>2024-03-02 01:55:39 +0100
commita86c3166d058318bdc7e366e245fef477f2dbeb9 (patch)
tree851da2f36e88392163fbca97a96e03e6af48a380
parent6237d0d24dd1ee1f5d3aab89cf45941af04d1010 (diff)
parent8cff247b2f6fcab43bf4e2c577fc3ac96c05c041 (diff)
Update upstream source from tag 'upstream/0.010'
Update to upstream version '0.010' with Debian dir fc92874fa75d889a2f9bbda82462b9a6e7048353
-rw-r--r--Changes27
-rw-r--r--LICENSE189
-rw-r--r--MANIFEST2
-rw-r--r--META.json271
-rw-r--r--META.yml244
-rw-r--r--Makefile.PL4
-rw-r--r--README75
-rw-r--r--dist.ini13
-rw-r--r--lib/Algorithm/Backoff.pm96
-rw-r--r--lib/Algorithm/Backoff/Constant.pm47
-rw-r--r--lib/Algorithm/Backoff/Exponential.pm49
-rw-r--r--lib/Algorithm/Backoff/Fibonacci.pm47
-rw-r--r--lib/Algorithm/Backoff/LILD.pm47
-rw-r--r--lib/Algorithm/Backoff/LIMD.pm47
-rw-r--r--lib/Algorithm/Backoff/MILD.pm47
-rw-r--r--lib/Algorithm/Backoff/MIMD.pm47
-rw-r--r--t/01-base.t37
-rw-r--r--t/author-critic.t12
-rw-r--r--t/author-pod-coverage.t3
19 files changed, 908 insertions, 396 deletions
diff --git a/Changes b/Changes
index 5974d90..f454cdd 100644
--- a/Changes
+++ b/Changes
@@ -1,25 +1,34 @@
-0.009 2019-06-20 (PERLANCAR)
+0.010 2024-02-24 Released-By: PERLANCAR; Urgency: low
+
+ - No functional changes.
+
+ - [doc] Tweak descriptions.
+
+ - Fix a unit test (GH#3).
+
+
+0.009 2019-06-20 Released-By: PERLANCAR
- No functional changes.
- Fix typos in Synopsis.
-0.008 2019-06-20 (PERLANCAR)
+0.008 2019-06-20 Released-By: PERLANCAR
- No functional changes.
- [doc] Mention Retry::Backoff and App::AlgorithmBackoffUtils.
-0.007 2019-06-18 (PERLANCAR)
+0.007 2019-06-18 Released-By: PERLANCAR
- No functional changes.
- [doc] Mention Action::Retry.
-0.006 2019-06-08 (PERLANCAR)
+0.006 2019-06-08 Released-By: PERLANCAR
- Add strategies: LILD, LIMD, MILD, MIMD.
@@ -37,7 +46,7 @@
now have algorithms that have varying delays on success.
-0.005 2019-06-07 (PERLANCAR)
+0.005 2019-06-07 Released-By: PERLANCAR
- No functional changes.
@@ -46,21 +55,21 @@
- [meta] Add tag to common attributes.
-0.004 2019-06-05 (PERLANCAR)
+0.004 2019-06-05 Released-By: PERLANCAR
- Add common attribute: max_actual_duration.
- [doc] Update variable name in Synopsis.
-0.003 2019-04-10 (PERLANCAR)
+0.003 2019-04-10 Released-By: PERLANCAR
- Rename module/distro from Algorithm-Retry -> Algorithm-Backoff.
- Rename strategy ExponentialBackoff -> Exponential.
-0.002 2019-04-10 (PERLANCAR)
+0.002 2019-04-10 Released-By: PERLANCAR
- [Incompatible change][ux] Constant: Rename attribute delay_on_failure
to delay.
@@ -73,6 +82,6 @@
- [bugfix] Fix setting default for timestamp.
-0.001 2019-04-08 (PERLANCAR)
+0.001 2019-04-08 Released-By: PERLANCAR
- First release.
diff --git a/LICENSE b/LICENSE
index cb00a54..7ebf319 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-This software is copyright (c) 2019 by perlancar@cpan.org.
+This software is copyright (c) 2024, 2019 by perlancar <perlancar@cpan.org>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
@@ -12,7 +12,7 @@ b) the "Artistic License"
--- The GNU General Public License, Version 1, February 1989 ---
-This software is Copyright (c) 2019 by perlancar@cpan.org.
+This software is Copyright (c) 2024, 2019 by perlancar <perlancar@cpan.org>.
This is free software, licensed under:
@@ -270,110 +270,143 @@ necessary. Here a sample; alter the names:
That's all there is to it!
---- The Artistic License 1.0 ---
+--- The Perl Artistic License 1.0 ---
-This software is Copyright (c) 2019 by perlancar@cpan.org.
+This software is Copyright (c) 2024, 2019 by perlancar <perlancar@cpan.org>.
This is free software, licensed under:
- The Artistic License 1.0
+ The Perl Artistic License 1.0
-The Artistic License
-Preamble
-The intent of this document is to state the conditions under which a Package
-may be copied, such that the Copyright Holder maintains some semblance of
-artistic control over the development of the package, while giving the users of
-the package the right to use and distribute the Package in a more-or-less
-customary fashion, plus the right to make reasonable modifications.
+
+
+ The "Artistic License"
+
+ Preamble
+
+The intent of this document is to state the conditions under which a
+Package may be copied, such that the Copyright Holder maintains some
+semblance of artistic control over the development of the package,
+while giving the users of the package the right to use and distribute
+the Package in a more-or-less customary fashion, plus the right to make
+reasonable modifications.
Definitions:
- - "Package" refers to the collection of files distributed by the Copyright
- Holder, and derivatives of that collection of files created through
- textual modification.
- - "Standard Version" refers to such a Package if it has not been modified,
- or has been modified in accordance with the wishes of the Copyright
- Holder.
- - "Copyright Holder" is whoever is named in the copyright or copyrights for
- the package.
- - "You" is you, if you're thinking about copying or distributing this Package.
- - "Reasonable copying fee" is whatever you can justify on the basis of media
- cost, duplication charges, time of people involved, and so on. (You will
- not be required to justify it to the Copyright Holder, but only to the
- computing community at large as a market that must bear the fee.)
- - "Freely Available" means that no fee is charged for the item itself, though
- there may be fees involved in handling the item. It also means that
- recipients of the item may redistribute it under the same conditions they
- received it.
+ "Package" refers to the collection of files distributed by the
+ Copyright Holder, and derivatives of that collection of files
+ created through textual modification.
+
+ "Standard Version" refers to such a Package if it has not been
+ modified, or has been modified in accordance with the wishes
+ of the Copyright Holder as specified below.
+
+ "Copyright Holder" is whoever is named in the copyright or
+ copyrights for the package.
+
+ "You" is you, if you're thinking about copying or distributing
+ this Package.
+
+ "Reasonable copying fee" is whatever you can justify on the
+ basis of media cost, duplication charges, time of people involved,
+ and so on. (You will not be required to justify it to the
+ Copyright Holder, but only to the computing community at large
+ as a market that must bear the fee.)
+
+ "Freely Available" means that no fee is charged for the item
+ itself, though there may be fees involved in handling the item.
+ It also means that recipients of the item may redistribute it
+ under the same conditions they received it.
1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers.
-2. You may apply bug fixes, portability fixes and other modifications derived
-from the Public Domain or from the Copyright Holder. A Package modified in such
-a way shall still be considered the Standard Version.
+2. You may apply bug fixes, portability fixes and other modifications
+derived from the Public Domain or from the Copyright Holder. A Package
+modified in such a way shall still be considered the Standard Version.
-3. You may otherwise modify your copy of this Package in any way, provided that
-you insert a prominent notice in each changed file stating how and when you
-changed that file, and provided that you do at least ONE of the following:
+3. You may otherwise modify your copy of this Package in any way, provided
+that you insert a prominent notice in each changed file stating how and
+when you changed that file, and provided that you do at least ONE of the
+following:
- a) place your modifications in the Public Domain or otherwise make them
- Freely Available, such as by posting said modifications to Usenet or an
- equivalent medium, or placing the modifications on a major archive site
- such as ftp.uu.net, or by allowing the Copyright Holder to include your
- modifications in the Standard Version of the Package.
+ a) place your modifications in the Public Domain or otherwise make them
+ Freely Available, such as by posting said modifications to Usenet or
+ an equivalent medium, or placing the modifications on a major archive
+ site such as uunet.uu.net, or by allowing the Copyright Holder to include
+ your modifications in the Standard Version of the Package.
- b) use the modified Package only within your corporation or organization.
+ b) use the modified Package only within your corporation or organization.
- c) rename any non-standard executables so the names do not conflict with
- standard executables, which must also be provided, and provide a separate
- manual page for each non-standard executable that clearly documents how it
- differs from the Standard Version.
+ c) rename any non-standard executables so the names do not conflict
+ with standard executables, which must also be provided, and provide
+ a separate manual page for each non-standard executable that clearly
+ documents how it differs from the Standard Version.
- d) make other distribution arrangements with the Copyright Holder.
+ d) make other distribution arrangements with the Copyright Holder.
-4. You may distribute the programs of this Package in object code or executable
-form, provided that you do at least ONE of the following:
+4. You may distribute the programs of this Package in object code or
+executable form, provided that you do at least ONE of the following:
- a) distribute a Standard Version of the executables and library files,
- together with instructions (in the manual page or equivalent) on where to
- get the Standard Version.
+ a) distribute a Standard Version of the executables and library files,
+ together with instructions (in the manual page or equivalent) on where
+ to get the Standard Version.
- b) accompany the distribution with the machine-readable source of the Package
- with your modifications.
+ b) accompany the distribution with the machine-readable source of
+ the Package with your modifications.
- c) accompany any non-standard executables with their corresponding Standard
- Version executables, giving the non-standard executables non-standard
- names, and clearly documenting the differences in manual pages (or
- equivalent), together with instructions on where to get the Standard
- Version.
+ c) give non-standard executables non-standard names, and clearly
+ document the differences in manual pages (or equivalent), together
+ with instructions on where to get the Standard Version.
- d) make other distribution arrangements with the Copyright Holder.
+ d) make other distribution arrangements with the Copyright Holder.
5. You may charge a reasonable copying fee for any distribution of this
-Package. You may charge any fee you choose for support of this Package. You
-may not charge a fee for this Package itself. However, you may distribute this
-Package in aggregate with other (possibly commercial) programs as part of a
-larger (possibly commercial) software distribution provided that you do not
-advertise this Package as a product of your own.
-
-6. The scripts and library files supplied as input to or produced as output
-from the programs of this Package do not automatically fall under the copyright
-of this Package, but belong to whomever generated them, and may be sold
-commercially, and may be aggregated with this Package.
-
-7. C or perl subroutines supplied by you and linked into this Package shall not
-be considered part of this Package.
-
-8. The name of the Copyright Holder may not be used to endorse or promote
+Package. You may charge any fee you choose for support of this
+Package. You may not charge a fee for this Package itself. However,
+you may distribute this Package in aggregate with other (possibly
+commercial) programs as part of a larger (possibly commercial) software
+distribution provided that you do not advertise this Package as a
+product of your own. You may embed this Package's interpreter within
+an executable of yours (by linking); this shall be construed as a mere
+form of aggregation, provided that the complete Standard Version of the
+interpreter is so embedded.
+
+6. The scripts and library files supplied as input to or produced as
+output from the programs of this Package do not automatically fall
+under the copyright of this Package, but belong to whoever generated
+them, and may be sold commercially, and may be aggregated with this
+Package. If such scripts or library files are aggregated with this
+Package via the so-called "undump" or "unexec" methods of producing a
+binary executable image, then distribution of such an image shall
+neither be construed as a distribution of this Package nor shall it
+fall under the restrictions of Paragraphs 3 and 4, provided that you do
+not represent such an executable image as a Standard Version of this
+Package.
+
+7. C subroutines (or comparably compiled subroutines in other
+languages) supplied by you and linked into this Package in order to
+emulate subroutines and variables of the language defined by this
+Package shall not be considered part of this Package, but are the
+equivalent of input as in Paragraph 6, provided these subroutines do
+not change the language in any way that would cause it to fail the
+regression tests for the language.
+
+8. Aggregation of this Package with a commercial distribution is always
+permitted provided that the use of this Package is embedded; that is,
+when no overt attempt is made to make this Package's interfaces visible
+to the end user of the commercial distribution. Such use shall not be
+construed as a distribution of this Package.
+
+9. The name of the Copyright Holder may not be used to endorse or promote
products derived from this software without specific prior written permission.
-9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
-MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-The End
+ The End
diff --git a/MANIFEST b/MANIFEST
index 4cb30ac..d9653cd 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.012.
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.031.
Changes
LICENSE
MANIFEST
diff --git a/META.json b/META.json
index f5c2c8d..325ce8d 100644
--- a/META.json
+++ b/META.json
@@ -4,7 +4,7 @@
"perlancar <perlancar@cpan.org>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010",
+ "generated_by" : "Dist::Zilla version 6.031, CPAN::Meta::Converter version 2.150010",
"license" : [
"perl_5"
],
@@ -28,7 +28,7 @@
"Test::Rinci" : "0.151"
},
"x_spec" : {
- "Rinci" : "v1.1.90"
+ "Rinci" : "v1.1.102"
}
},
"runtime" : {
@@ -51,6 +51,40 @@
}
}
},
+ "provides" : {
+ "Algorithm::Backoff" : {
+ "file" : "lib/Algorithm/Backoff.pm",
+ "version" : "0.010"
+ },
+ "Algorithm::Backoff::Constant" : {
+ "file" : "lib/Algorithm/Backoff/Constant.pm",
+ "version" : "0.010"
+ },
+ "Algorithm::Backoff::Exponential" : {
+ "file" : "lib/Algorithm/Backoff/Exponential.pm",
+ "version" : "0.010"
+ },
+ "Algorithm::Backoff::Fibonacci" : {
+ "file" : "lib/Algorithm/Backoff/Fibonacci.pm",
+ "version" : "0.010"
+ },
+ "Algorithm::Backoff::LILD" : {
+ "file" : "lib/Algorithm/Backoff/LILD.pm",
+ "version" : "0.010"
+ },
+ "Algorithm::Backoff::LIMD" : {
+ "file" : "lib/Algorithm/Backoff/LIMD.pm",
+ "version" : "0.010"
+ },
+ "Algorithm::Backoff::MILD" : {
+ "file" : "lib/Algorithm/Backoff/MILD.pm",
+ "version" : "0.010"
+ },
+ "Algorithm::Backoff::MIMD" : {
+ "file" : "lib/Algorithm/Backoff/MIMD.pm",
+ "version" : "0.010"
+ }
+ },
"release_status" : "stable",
"resources" : {
"bugtracker" : {
@@ -63,13 +97,18 @@
"web" : "https://github.com/perlancar/perl-Algorithm-Backoff"
}
},
- "version" : "0.009",
+ "version" : "0.010",
"x_Dist_Zilla" : {
"perl" : {
- "version" : "5.028002"
+ "version" : "5.038002"
},
"plugins" : [
{
+ "class" : "Dist::Zilla::Plugin::PERLANCAR::CheckPendingRelease",
+ "name" : "@Author::PERLANCAR/PERLANCAR::CheckPendingRelease",
+ "version" : "0.001"
+ },
+ {
"class" : "Dist::Zilla::Plugin::GatherDir",
"config" : {
"Dist::Zilla::Plugin::GatherDir" : {
@@ -83,52 +122,52 @@
}
},
"name" : "@Author::PERLANCAR/@Filter/GatherDir",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@Author::PERLANCAR/@Filter/PruneCruft",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::ManifestSkip",
"name" : "@Author::PERLANCAR/@Filter/ManifestSkip",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@Author::PERLANCAR/@Filter/MetaYAML",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@Author::PERLANCAR/@Filter/License",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::PodCoverageTests",
"name" : "@Author::PERLANCAR/@Filter/PodCoverageTests",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::PodSyntaxTests",
"name" : "@Author::PERLANCAR/@Filter/PodSyntaxTests",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::ExtraTests",
"name" : "@Author::PERLANCAR/@Filter/ExtraTests",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@Author::PERLANCAR/@Filter/ExecDir",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::ShareDir",
"name" : "@Author::PERLANCAR/@Filter/ShareDir",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::MakeMaker",
@@ -138,27 +177,27 @@
}
},
"name" : "@Author::PERLANCAR/@Filter/MakeMaker",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@Author::PERLANCAR/@Filter/Manifest",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@Author::PERLANCAR/@Filter/ConfirmRelease",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@Author::PERLANCAR/ExecDir script",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::PERLANCAR::BeforeBuild",
"name" : "@Author::PERLANCAR/PERLANCAR::BeforeBuild",
- "version" : "0.596"
+ "version" : "0.610"
},
{
"class" : "Dist::Zilla::Plugin::Rinci::AbstractFromMeta",
@@ -172,13 +211,19 @@
},
{
"class" : "Dist::Zilla::Plugin::PERLANCAR::EnsurePrereqToSpec",
+ "config" : {
+ "Dist::Zilla::Role::ModuleMetadata" : {
+ "Module::Metadata" : "1.000037",
+ "version" : "0.006"
+ }
+ },
"name" : "@Author::PERLANCAR/PERLANCAR::EnsurePrereqToSpec",
- "version" : "0.060"
+ "version" : "0.064"
},
{
"class" : "Dist::Zilla::Plugin::PERLANCAR::MetaResources",
"name" : "@Author::PERLANCAR/PERLANCAR::MetaResources",
- "version" : "0.040"
+ "version" : "0.043"
},
{
"class" : "Dist::Zilla::Plugin::CheckChangeLog",
@@ -199,7 +244,7 @@
]
},
"Dist::Zilla::Role::ModuleMetadata" : {
- "Module::Metadata" : "1.000033",
+ "Module::Metadata" : "1.000037",
"version" : "0.006"
}
},
@@ -207,9 +252,23 @@
"version" : "0.011"
},
{
+ "class" : "Dist::Zilla::Plugin::Git::Contributors",
+ "config" : {
+ "Dist::Zilla::Plugin::Git::Contributors" : {
+ "git_version" : "2.25.1",
+ "include_authors" : 0,
+ "include_releaser" : 1,
+ "order_by" : "name",
+ "paths" : []
+ }
+ },
+ "name" : "@Author::PERLANCAR/Git::Contributors",
+ "version" : "0.036"
+ },
+ {
"class" : "Dist::Zilla::Plugin::CopyrightYearFromGit",
"name" : "@Author::PERLANCAR/CopyrightYearFromGit",
- "version" : "0.003"
+ "version" : "0.009"
},
{
"class" : "Dist::Zilla::Plugin::IfBuilt",
@@ -219,22 +278,49 @@
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@Author::PERLANCAR/MetaJSON",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@Author::PERLANCAR/MetaConfig",
- "version" : "6.012"
+ "version" : "6.031"
+ },
+ {
+ "class" : "Dist::Zilla::Plugin::MetaProvides::Package",
+ "config" : {
+ "Dist::Zilla::Plugin::MetaProvides::Package" : {
+ "finder_objects" : [
+ {
+ "class" : "Dist::Zilla::Plugin::FinderCode",
+ "name" : "@Author::PERLANCAR/MetaProvides::Package/AUTOVIV/:InstallModulesPM",
+ "version" : "6.031"
+ }
+ ],
+ "include_underscores" : 0
+ },
+ "Dist::Zilla::Role::MetaProvider::Provider" : {
+ "$Dist::Zilla::Role::MetaProvider::Provider::VERSION" : "2.002004",
+ "inherit_missing" : 1,
+ "inherit_version" : 1,
+ "meta_noindex" : 1
+ },
+ "Dist::Zilla::Role::ModuleMetadata" : {
+ "Module::Metadata" : "1.000037",
+ "version" : "0.006"
+ }
+ },
+ "name" : "@Author::PERLANCAR/MetaProvides::Package",
+ "version" : "2.004003"
},
{
- "class" : "Dist::Zilla::Plugin::Authority",
- "name" : "@Author::PERLANCAR/Authority",
- "version" : "1.009"
+ "class" : "Dist::Zilla::Plugin::PERLANCAR::Authority",
+ "name" : "@Author::PERLANCAR/PERLANCAR::Authority",
+ "version" : "0.001"
},
{
"class" : "Dist::Zilla::Plugin::OurDate",
"name" : "@Author::PERLANCAR/OurDate",
- "version" : "0.03"
+ "version" : "0.040"
},
{
"class" : "Dist::Zilla::Plugin::OurDist",
@@ -244,7 +330,7 @@
{
"class" : "Dist::Zilla::Plugin::OurPkgVersion",
"name" : "@Author::PERLANCAR/OurPkgVersion",
- "version" : "0.15"
+ "version" : "0.21"
},
{
"class" : "Dist::Zilla::Plugin::PodWeaver",
@@ -252,73 +338,73 @@
"Dist::Zilla::Plugin::PodWeaver" : {
"finder" : [
":InstallModules",
- ":ExecFiles"
+ ":PerlExecFiles"
],
"plugins" : [
{
"class" : "Pod::Weaver::Plugin::EnsurePod5",
"name" : "@CorePrep/EnsurePod5",
- "version" : "4.015"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Plugin::H1Nester",
"name" : "@CorePrep/H1Nester",
- "version" : "4.015"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Name",
"name" : "@Author::PERLANCAR/Name",
- "version" : "4.015"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Version",
"name" : "@Author::PERLANCAR/Version",
- "version" : "4.015"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Region",
"name" : "@Author::PERLANCAR/prelude",
- "version" : "4.015"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "SYNOPSIS",
- "version" : "4.015"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "DESCRIPTION",
- "version" : "4.015"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "OVERVIEW",
- "version" : "4.015"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "ATTRIBUTES",
- "version" : "4.015"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "METHODS",
- "version" : "4.015"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "FUNCTIONS",
- "version" : "4.015"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Leftovers",
"name" : "@Author::PERLANCAR/Leftovers",
- "version" : "4.015"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Region",
"name" : "@Author::PERLANCAR/postlude",
- "version" : "4.015"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Completion::GetoptLongComplete",
@@ -353,22 +439,32 @@
{
"class" : "Pod::Weaver::Section::Authors",
"name" : "@Author::PERLANCAR/Authors",
- "version" : "4.015"
+ "version" : "4.019"
+ },
+ {
+ "class" : "Pod::Weaver::Section::Contributors",
+ "name" : "@Author::PERLANCAR/Contributors",
+ "version" : "0.009"
+ },
+ {
+ "class" : "Pod::Weaver::Section::PERLANCAR::Contributing",
+ "name" : "@Author::PERLANCAR/PERLANCAR/Contributing",
+ "version" : "0.293"
},
{
"class" : "Pod::Weaver::Section::Legal",
"name" : "@Author::PERLANCAR/Legal",
- "version" : "4.015"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Plugin::Rinci",
"name" : "@Author::PERLANCAR/Rinci",
- "version" : "0.780"
+ "version" : "0.786"
},
{
"class" : "Pod::Weaver::Plugin::AppendPrepend",
"name" : "@Author::PERLANCAR/AppendPrepend",
- "version" : "0.01"
+ "version" : "0.021"
},
{
"class" : "Pod::Weaver::Plugin::EnsureUniqueSections",
@@ -378,23 +474,23 @@
{
"class" : "Pod::Weaver::Plugin::SingleEncoding",
"name" : "@Author::PERLANCAR/SingleEncoding",
- "version" : "4.015"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Plugin::PERLANCAR::SortSections",
"name" : "@Author::PERLANCAR/PERLANCAR::SortSections",
- "version" : "0.06"
+ "version" : "0.082"
}
]
}
},
"name" : "@Author::PERLANCAR/PodWeaver",
- "version" : "4.008"
+ "version" : "4.010"
},
{
"class" : "Dist::Zilla::Plugin::PruneFiles",
"name" : "@Author::PERLANCAR/PruneFiles",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::Pod2Readme",
@@ -404,17 +500,17 @@
{
"class" : "Dist::Zilla::Plugin::Rinci::AddPrereqs",
"name" : "@Author::PERLANCAR/Rinci::AddPrereqs",
- "version" : "0.142"
+ "version" : "0.145"
},
{
"class" : "Dist::Zilla::Plugin::Rinci::AddToDb",
"name" : "@Author::PERLANCAR/Rinci::AddToDb",
- "version" : "0.01"
+ "version" : "0.020"
},
{
- "class" : "Dist::Zilla::Plugin::Rinci::Validate",
- "name" : "@Author::PERLANCAR/Rinci::Validate",
- "version" : "0.24"
+ "class" : "Dist::Zilla::Plugin::Rinci::EmbedValidator",
+ "name" : "@Author::PERLANCAR/Rinci::EmbedValidator",
+ "version" : "0.251"
},
{
"class" : "Dist::Zilla::Plugin::SetScriptShebang",
@@ -445,9 +541,18 @@
"version" : "2.058"
},
{
- "class" : "Dist::Zilla::Plugin::Test::Perl::Critic",
- "name" : "@Author::PERLANCAR/Test::Perl::Critic",
- "version" : "3.001"
+ "class" : "Dist::Zilla::Plugin::Test::Perl::Critic::Subset",
+ "config" : {
+ "Dist::Zilla::Plugin::Test::Perl::Critic::Subset" : {
+ "finder" : [
+ ":ExecFiles",
+ ":InstallModules",
+ ":TestFiles"
+ ]
+ }
+ },
+ "name" : "@Author::PERLANCAR/Test::Perl::Critic::Subset",
+ "version" : "3.001.006"
},
{
"class" : "Dist::Zilla::Plugin::Test::Rinci",
@@ -473,7 +578,7 @@
{
"class" : "Dist::Zilla::Plugin::Acme::CPANModules::Blacklist",
"name" : "@Author::PERLANCAR/Acme::CPANModules::Blacklist",
- "version" : "0.001"
+ "version" : "0.002"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs::EnsureVersion",
@@ -483,7 +588,7 @@
{
"class" : "Dist::Zilla::Plugin::Prereqs::CheckCircular",
"name" : "@Author::PERLANCAR/Prereqs::CheckCircular",
- "version" : "0.006"
+ "version" : "0.007"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN::WWWPAUSESimple",
@@ -499,7 +604,7 @@
}
},
"name" : "TestRequires",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
@@ -510,7 +615,7 @@
}
},
"name" : "Prereqs",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
@@ -521,57 +626,62 @@
}
},
"name" : "DevelopX_spec",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":IncModules",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExtraTestFiles",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":PerlExecFiles",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":MainModule",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":AllFiles",
- "version" : "6.012"
+ "version" : "6.031"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":NoFiles",
- "version" : "6.012"
+ "version" : "6.031"
+ },
+ {
+ "class" : "Dist::Zilla::Plugin::FinderCode",
+ "name" : "@Author::PERLANCAR/MetaProvides::Package/AUTOVIV/:InstallModulesPM",
+ "version" : "6.031"
}
],
"zilla" : {
@@ -579,12 +689,17 @@
"config" : {
"is_trial" : 0
},
- "version" : "6.012"
+ "version" : "6.031"
}
},
"x_authority" : "cpan:PERLANCAR",
- "x_generated_by_perl" : "v5.28.2",
- "x_serialization_backend" : "Cpanel::JSON::XS version 4.11",
+ "x_contributors" : [
+ "Brendan Byrd <brendan.byrd@grantstreet.com>",
+ "SineSwiper <GitHub@ResonatorSoft.org>"
+ ],
+ "x_generated_by_perl" : "v5.38.2",
+ "x_serialization_backend" : "Cpanel::JSON::XS version 4.37",
+ "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
diff --git a/META.yml b/META.yml
index 3734ee9..345a720 100644
--- a/META.yml
+++ b/META.yml
@@ -12,12 +12,37 @@ build_requires:
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 0
-generated_by: 'Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010'
+generated_by: 'Dist::Zilla version 6.031, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: Algorithm-Backoff
+provides:
+ Algorithm::Backoff:
+ file: lib/Algorithm/Backoff.pm
+ version: '0.010'
+ Algorithm::Backoff::Constant:
+ file: lib/Algorithm/Backoff/Constant.pm
+ version: '0.010'
+ Algorithm::Backoff::Exponential:
+ file: lib/Algorithm/Backoff/Exponential.pm
+ version: '0.010'
+ Algorithm::Backoff::Fibonacci:
+ file: lib/Algorithm/Backoff/Fibonacci.pm
+ version: '0.010'
+ Algorithm::Backoff::LILD:
+ file: lib/Algorithm/Backoff/LILD.pm
+ version: '0.010'
+ Algorithm::Backoff::LIMD:
+ file: lib/Algorithm/Backoff/LIMD.pm
+ version: '0.010'
+ Algorithm::Backoff::MILD:
+ file: lib/Algorithm/Backoff/MILD.pm
+ version: '0.010'
+ Algorithm::Backoff::MIMD:
+ file: lib/Algorithm/Backoff/MIMD.pm
+ version: '0.010'
requires:
Time::HiRes: '0'
parent: '0'
@@ -28,12 +53,16 @@ resources:
bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-Backoff
homepage: https://metacpan.org/release/Algorithm-Backoff
repository: git://github.com/perlancar/perl-Algorithm-Backoff.git
-version: '0.009'
+version: '0.010'
x_Dist_Zilla:
perl:
- version: '5.028002'
+ version: '5.038002'
plugins:
-
+ class: Dist::Zilla::Plugin::PERLANCAR::CheckPendingRelease
+ name: '@Author::PERLANCAR/PERLANCAR::CheckPendingRelease'
+ version: '0.001'
+ -
class: Dist::Zilla::Plugin::GatherDir
config:
Dist::Zilla::Plugin::GatherDir:
@@ -45,66 +74,66 @@ x_Dist_Zilla:
prune_directory: []
root: .
name: '@Author::PERLANCAR/@Filter/GatherDir'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@Author::PERLANCAR/@Filter/PruneCruft'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::ManifestSkip
name: '@Author::PERLANCAR/@Filter/ManifestSkip'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@Author::PERLANCAR/@Filter/MetaYAML'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::License
name: '@Author::PERLANCAR/@Filter/License'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::PodCoverageTests
name: '@Author::PERLANCAR/@Filter/PodCoverageTests'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@Author::PERLANCAR/@Filter/PodSyntaxTests'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::ExtraTests
name: '@Author::PERLANCAR/@Filter/ExtraTests'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::ExecDir
name: '@Author::PERLANCAR/@Filter/ExecDir'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::ShareDir
name: '@Author::PERLANCAR/@Filter/ShareDir'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::MakeMaker
config:
Dist::Zilla::Role::TestRunner:
default_jobs: 1
name: '@Author::PERLANCAR/@Filter/MakeMaker'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::Manifest
name: '@Author::PERLANCAR/@Filter/Manifest'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@Author::PERLANCAR/@Filter/ConfirmRelease'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::ExecDir
name: '@Author::PERLANCAR/ExecDir script'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::PERLANCAR::BeforeBuild
name: '@Author::PERLANCAR/PERLANCAR::BeforeBuild'
- version: '0.596'
+ version: '0.610'
-
class: Dist::Zilla::Plugin::Rinci::AbstractFromMeta
name: '@Author::PERLANCAR/Rinci::AbstractFromMeta'
@@ -115,12 +144,16 @@ x_Dist_Zilla:
version: '0.02'
-
class: Dist::Zilla::Plugin::PERLANCAR::EnsurePrereqToSpec
+ config:
+ Dist::Zilla::Role::ModuleMetadata:
+ Module::Metadata: '1.000037'
+ version: '0.006'
name: '@Author::PERLANCAR/PERLANCAR::EnsurePrereqToSpec'
- version: '0.060'
+ version: '0.064'
-
class: Dist::Zilla::Plugin::PERLANCAR::MetaResources
name: '@Author::PERLANCAR/PERLANCAR::MetaResources'
- version: '0.040'
+ version: '0.043'
-
class: Dist::Zilla::Plugin::CheckChangeLog
name: '@Author::PERLANCAR/CheckChangeLog'
@@ -136,14 +169,25 @@ x_Dist_Zilla:
finder:
- ':InstallModules'
Dist::Zilla::Role::ModuleMetadata:
- Module::Metadata: '1.000033'
+ Module::Metadata: '1.000037'
version: '0.006'
name: '@Author::PERLANCAR/CheckSelfDependency'
version: '0.011'
-
+ class: Dist::Zilla::Plugin::Git::Contributors
+ config:
+ Dist::Zilla::Plugin::Git::Contributors:
+ git_version: 2.25.1
+ include_authors: 0
+ include_releaser: 1
+ order_by: name
+ paths: []
+ name: '@Author::PERLANCAR/Git::Contributors'
+ version: '0.036'
+ -
class: Dist::Zilla::Plugin::CopyrightYearFromGit
name: '@Author::PERLANCAR/CopyrightYearFromGit'
- version: '0.003'
+ version: '0.009'
-
class: Dist::Zilla::Plugin::IfBuilt
name: '@Author::PERLANCAR/IfBuilt'
@@ -151,19 +195,39 @@ x_Dist_Zilla:
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@Author::PERLANCAR/MetaJSON'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@Author::PERLANCAR/MetaConfig'
- version: '6.012'
+ version: '6.031'
-
- class: Dist::Zilla::Plugin::Authority
- name: '@Author::PERLANCAR/Authority'
- version: '1.009'
+ class: Dist::Zilla::Plugin::MetaProvides::Package
+ config:
+ Dist::Zilla::Plugin::MetaProvides::Package:
+ finder_objects:
+ -
+ class: Dist::Zilla::Plugin::FinderCode
+ name: '@Author::PERLANCAR/MetaProvides::Package/AUTOVIV/:InstallModulesPM'
+ version: '6.031'
+ include_underscores: 0
+ Dist::Zilla::Role::MetaProvider::Provider:
+ $Dist::Zilla::Role::MetaProvider::Provider::VERSION: '2.002004'
+ inherit_missing: 1
+ inherit_version: 1
+ meta_noindex: 1
+ Dist::Zilla::Role::ModuleMetadata:
+ Module::Metadata: '1.000037'
+ version: '0.006'
+ name: '@Author::PERLANCAR/MetaProvides::Package'
+ version: '2.004003'
+ -
+ class: Dist::Zilla::Plugin::PERLANCAR::Authority
+ name: '@Author::PERLANCAR/PERLANCAR::Authority'
+ version: '0.001'
-
class: Dist::Zilla::Plugin::OurDate
name: '@Author::PERLANCAR/OurDate'
- version: '0.03'
+ version: '0.040'
-
class: Dist::Zilla::Plugin::OurDist
name: '@Author::PERLANCAR/OurDist'
@@ -171,67 +235,67 @@ x_Dist_Zilla:
-
class: Dist::Zilla::Plugin::OurPkgVersion
name: '@Author::PERLANCAR/OurPkgVersion'
- version: '0.15'
+ version: '0.21'
-
class: Dist::Zilla::Plugin::PodWeaver
config:
Dist::Zilla::Plugin::PodWeaver:
finder:
- ':InstallModules'
- - ':ExecFiles'
+ - ':PerlExecFiles'
plugins:
-
class: Pod::Weaver::Plugin::EnsurePod5
name: '@CorePrep/EnsurePod5'
- version: '4.015'
+ version: '4.019'
-
class: Pod::Weaver::Plugin::H1Nester
name: '@CorePrep/H1Nester'
- version: '4.015'
+ version: '4.019'
-
class: Pod::Weaver::Section::Name
name: '@Author::PERLANCAR/Name'
- version: '4.015'
+ version: '4.019'
-
class: Pod::Weaver::Section::Version
name: '@Author::PERLANCAR/Version'
- version: '4.015'
+ version: '4.019'
-
class: Pod::Weaver::Section::Region
name: '@Author::PERLANCAR/prelude'
- version: '4.015'
+ version: '4.019'
-
class: Pod::Weaver::Section::Generic
name: SYNOPSIS
- version: '4.015'
+ version: '4.019'
-
class: Pod::Weaver::Section::Generic
name: DESCRIPTION
- version: '4.015'
+ version: '4.019'
-
class: Pod::Weaver::Section::Generic
name: OVERVIEW
- version: '4.015'
+ version: '4.019'
-
class: Pod::Weaver::Section::Collect
name: ATTRIBUTES
- version: '4.015'
+ version: '4.019'
-
class: Pod::Weaver::Section::Collect
name: METHODS
- version: '4.015'
+ version: '4.019'
-
class: Pod::Weaver::Section::Collect
name: FUNCTIONS
- version: '4.015'
+ version: '4.019'
-
class: Pod::Weaver::Section::Leftovers
name: '@Author::PERLANCAR/Leftovers'
- version: '4.015'
+ version: '4.019'
-
class: Pod::Weaver::Section::Region
name: '@Author::PERLANCAR/postlude'
- version: '4.015'
+ version: '4.019'
-
class: Pod::Weaver::Section::Completion::GetoptLongComplete
name: '@Author::PERLANCAR/Completion::GetoptLongComplete'
@@ -259,19 +323,27 @@ x_Dist_Zilla:
-
class: Pod::Weaver::Section::Authors
name: '@Author::PERLANCAR/Authors'
- version: '4.015'
+ version: '4.019'
+ -
+ class: Pod::Weaver::Section::Contributors
+ name: '@Author::PERLANCAR/Contributors'
+ version: '0.009'
+ -
+ class: Pod::Weaver::Section::PERLANCAR::Contributing
+ name: '@Author::PERLANCAR/PERLANCAR/Contributing'
+ version: '0.293'
-
class: Pod::Weaver::Section::Legal
name: '@Author::PERLANCAR/Legal'
- version: '4.015'
+ version: '4.019'
-
class: Pod::Weaver::Plugin::Rinci
name: '@Author::PERLANCAR/Rinci'
- version: '0.780'
+ version: '0.786'
-
class: Pod::Weaver::Plugin::AppendPrepend
name: '@Author::PERLANCAR/AppendPrepend'
- version: '0.01'
+ version: '0.021'
-
class: Pod::Weaver::Plugin::EnsureUniqueSections
name: '@Author::PERLANCAR/EnsureUniqueSections'
@@ -279,17 +351,17 @@ x_Dist_Zilla:
-
class: Pod::Weaver::Plugin::SingleEncoding
name: '@Author::PERLANCAR/SingleEncoding'
- version: '4.015'
+ version: '4.019'
-
class: Pod::Weaver::Plugin::PERLANCAR::SortSections
name: '@Author::PERLANCAR/PERLANCAR::SortSections'
- version: '0.06'
+ version: '0.082'
name: '@Author::PERLANCAR/PodWeaver'
- version: '4.008'
+ version: '4.010'
-
class: Dist::Zilla::Plugin::PruneFiles
name: '@Author::PERLANCAR/PruneFiles'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::Pod2Readme
name: '@Author::PERLANCAR/Pod2Readme'
@@ -297,15 +369,15 @@ x_Dist_Zilla:
-
class: Dist::Zilla::Plugin::Rinci::AddPrereqs
name: '@Author::PERLANCAR/Rinci::AddPrereqs'
- version: '0.142'
+ version: '0.145'
-
class: Dist::Zilla::Plugin::Rinci::AddToDb
name: '@Author::PERLANCAR/Rinci::AddToDb'
- version: '0.01'
+ version: '0.020'
-
- class: Dist::Zilla::Plugin::Rinci::Validate
- name: '@Author::PERLANCAR/Rinci::Validate'
- version: '0.24'
+ class: Dist::Zilla::Plugin::Rinci::EmbedValidator
+ name: '@Author::PERLANCAR/Rinci::EmbedValidator'
+ version: '0.251'
-
class: Dist::Zilla::Plugin::SetScriptShebang
name: '@Author::PERLANCAR/SetScriptShebang'
@@ -314,7 +386,7 @@ x_Dist_Zilla:
class: Dist::Zilla::Plugin::Test::Compile
config:
Dist::Zilla::Plugin::Test::Compile:
- bail_out_on_fail: '0'
+ bail_out_on_fail: 0
fail_on_warning: author
fake_home: 0
filename: t/00-compile.t
@@ -329,9 +401,15 @@ x_Dist_Zilla:
name: '@Author::PERLANCAR/Test::Compile'
version: '2.058'
-
- class: Dist::Zilla::Plugin::Test::Perl::Critic
- name: '@Author::PERLANCAR/Test::Perl::Critic'
- version: '3.001'
+ class: Dist::Zilla::Plugin::Test::Perl::Critic::Subset
+ config:
+ Dist::Zilla::Plugin::Test::Perl::Critic::Subset:
+ finder:
+ - ':ExecFiles'
+ - ':InstallModules'
+ - ':TestFiles'
+ name: '@Author::PERLANCAR/Test::Perl::Critic::Subset'
+ version: 3.001.006
-
class: Dist::Zilla::Plugin::Test::Rinci
name: '@Author::PERLANCAR/Test::Rinci'
@@ -351,7 +429,7 @@ x_Dist_Zilla:
-
class: Dist::Zilla::Plugin::Acme::CPANModules::Blacklist
name: '@Author::PERLANCAR/Acme::CPANModules::Blacklist'
- version: '0.001'
+ version: '0.002'
-
class: Dist::Zilla::Plugin::Prereqs::EnsureVersion
name: '@Author::PERLANCAR/Prereqs::EnsureVersion'
@@ -359,7 +437,7 @@ x_Dist_Zilla:
-
class: Dist::Zilla::Plugin::Prereqs::CheckCircular
name: '@Author::PERLANCAR/Prereqs::CheckCircular'
- version: '0.006'
+ version: '0.007'
-
class: Dist::Zilla::Plugin::UploadToCPAN::WWWPAUSESimple
name: '@Author::PERLANCAR/UploadToCPAN::WWWPAUSESimple'
@@ -371,7 +449,7 @@ x_Dist_Zilla:
phase: test
type: requires
name: TestRequires
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::Prereqs
config:
@@ -379,7 +457,7 @@ x_Dist_Zilla:
phase: runtime
type: requires
name: Prereqs
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::Prereqs
config:
@@ -387,53 +465,61 @@ x_Dist_Zilla:
phase: develop
type: x_spec
name: DevelopX_spec
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':IncModules'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExtraTestFiles'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':PerlExecFiles'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':MainModule'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':AllFiles'
- version: '6.012'
+ version: '6.031'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':NoFiles'
- version: '6.012'
+ version: '6.031'
+ -
+ class: Dist::Zilla::Plugin::FinderCode
+ name: '@Author::PERLANCAR/MetaProvides::Package/AUTOVIV/:InstallModulesPM'
+ version: '6.031'
zilla:
class: Dist::Zilla::Dist::Builder
config:
- is_trial: '0'
- version: '6.012'
+ is_trial: 0
+ version: '6.031'
x_authority: cpan:PERLANCAR
-x_generated_by_perl: v5.28.2
-x_serialization_backend: 'YAML::Tiny version 1.73'
+x_contributors:
+ - 'Brendan Byrd <brendan.byrd@grantstreet.com>'
+ - 'SineSwiper <GitHub@ResonatorSoft.org>'
+x_generated_by_perl: v5.38.2
+x_serialization_backend: 'YAML::Tiny version 1.74'
+x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later'
x_static_install: 1
diff --git a/Makefile.PL b/Makefile.PL
index a91d5b0..1c657a1 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.012.
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.031.
use strict;
use warnings;
@@ -30,7 +30,7 @@ my %WriteMakefileArgs = (
"Test::More" => "0.98",
"Test::Number::Delta" => 0
},
- "VERSION" => "0.009",
+ "VERSION" => "0.010",
"test" => {
"TESTS" => "t/*.t"
}
diff --git a/README b/README
index be7350c..bbce8dc 100644
--- a/README
+++ b/README
@@ -2,8 +2,8 @@ NAME
Algorithm::Backoff - Various backoff strategies for retry
VERSION
- This document describes version 0.009 of Algorithm::Backoff (from Perl
- distribution Algorithm-Backoff), released on 2019-06-20.
+ This document describes version 0.010 of Algorithm::Backoff (from Perl
+ distribution Algorithm-Backoff), released on 2024-02-24.
SYNOPSIS
# 1. pick a strategy and instantiate
@@ -14,8 +14,10 @@ SYNOPSIS
#delay_on_success => 0, # optional, default 0
);
- # 2. log success/failure and get a new number of seconds to delay, timestamp is
- # optional but must be monotonically increasing.
+ # 2. log success/failure and get a new number of seconds to delay. if you don't
+ # want to log for the current time, you can pass a timestamp (number of seconds
+ # passed since some reference value, like a Unix epoch) as the argument, which
+ # should be monotonically increasing.
my $secs = $ab->failure(); # => 2
my $secs = $ab->success(); # => 0
@@ -27,6 +29,12 @@ DESCRIPTION
This class ("Algorithm::Backoff") is a base class only.
+ Algorithm::Backoff does not actually provide a function/method to retry
+ a piece of code. It only contains the backoff strategies and splits the
+ actual delaying to another module (e.g. Retry::Backoff). This allows for
+ things like printing/returning all the retries and their delay amounts
+ without actually doing the delay (e.g. in show-backoff-delays script).
+
METHODS
new
Usage:
@@ -68,8 +76,8 @@ METHODS
my $secs = $obj->success([ $timestamp ]);
Log a successful attempt. If not specified, $timestamp defaults to
- current time. Will return the suggested number of seconds to wait before
- doing another attempt.
+ current Unix timestamp. Will return the suggested number of seconds to
+ wait before doing another attempt.
failure
Usage:
@@ -77,9 +85,9 @@ METHODS
my $secs = $obj->failure([ $timestamp ]);
Log a failed attempt. If not specified, $timestamp defaults to current
- time. Will return the suggested number of seconds to wait before doing
- another attempt, or -1 if it suggests that one gives up (e.g. if
- "max_attempts" parameter has been exceeded).
+ Unix timestamp. Will return the suggested number of seconds to wait
+ before doing another attempt, or -1 if it suggests that one gives up
+ (e.g. if "max_attempts" parameter has been exceeded).
HOMEPAGE
Please visit the project's homepage at
@@ -89,13 +97,6 @@ SOURCE
Source repository is at
<https://github.com/perlancar/perl-Algorithm-Backoff>.
-BUGS
- Please report any bugs or feature requests on the bugtracker website
- <https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-Backoff>
-
- When submitting a bug or request, please include a test-file or a patch
- to an existing test-file that illustrates the bug or desired feature.
-
SEE ALSO
Retry::Backoff - an application of Algorithm::Backoff to retry a piece
of code using various backoff strategies.
@@ -103,18 +104,48 @@ SEE ALSO
App::AlgorithmBackoffUtils - various CLI's related to
Algorithm::Backoff.
- Action::Retry - Somehow I didn't find this module before writing
- Algorithm::Backoff. Otherwise I probably would not have created
- Algorithm::Backoff. But Algorithm::Backoff offers an alternative
- interface, some additional parameters (like delay on success and jitter
- factor), a lighter footprint (no Moo), and a couple more strategies.
+ Action::Retry - A prior art for Algorithm::Backoff. Somehow I didn't
+ find this module before writing Algorithm::Backoff. But
+ Algorithm::Backoff offers an alternative interface (a split of actual
+ sleep/retry vs the algorithm), and some additional parameters (like
+ delay on success and jitter factor), a lighter footprint (no Moo), and a
+ couple more strategies.
AUTHOR
perlancar <perlancar@cpan.org>
+CONTRIBUTORS
+ * Brendan Byrd <brendan.byrd@grantstreet.com>
+
+ * SineSwiper <GitHub@ResonatorSoft.org>
+
+CONTRIBUTING
+ To contribute, you can send patches by email/via RT, or send pull
+ requests on GitHub.
+
+ Most of the time, you don't need to build the distribution yourself. You
+ can simply modify the code, then test via:
+
+ % prove -l
+
+ If you want to build the distribution (e.g. to try to install it locally
+ on your system), you can install Dist::Zilla,
+ Dist::Zilla::PluginBundle::Author::PERLANCAR,
+ Pod::Weaver::PluginBundle::Author::PERLANCAR, and sometimes one or two
+ other Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps
+ required beyond that are considered a bug and can be reported to me.
+
COPYRIGHT AND LICENSE
- This software is copyright (c) 2019 by perlancar@cpan.org.
+ This software is copyright (c) 2024, 2019 by perlancar
+ <perlancar@cpan.org>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
+BUGS
+ Please report any bugs or feature requests on the bugtracker website
+ <https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-Backoff>
+
+ When submitting a bug or request, please include a test-file or a patch
+ to an existing test-file that illustrates the bug or desired feature.
+
diff --git a/dist.ini b/dist.ini
index 22d80ac..628c246 100644
--- a/dist.ini
+++ b/dist.ini
@@ -1,9 +1,15 @@
-version = 0.009
+;---------------------------------
+author = perlancar <perlancar@cpan.org>
+copyright_holder = perlancar <perlancar@cpan.org>
+license = Perl_5
+;---------------------------------
+
+version = 0.010
name = Algorithm-Backoff
[@Author::PERLANCAR]
-:version=0.594
+:version=0.610
[Prereqs / TestRequires]
Test::Exception=0
@@ -20,4 +26,5 @@ Time::HiRes=0
[Prereqs / DevelopX_spec]
-phase=develop
-relationship=x_spec
-Rinci=1.1.90
+Rinci=1.1.102
+
diff --git a/lib/Algorithm/Backoff.pm b/lib/Algorithm/Backoff.pm
index 0804f7d..b725607 100644
--- a/lib/Algorithm/Backoff.pm
+++ b/lib/Algorithm/Backoff.pm
@@ -1,14 +1,16 @@
package Algorithm::Backoff;
-our $DATE = '2019-06-20'; # DATE
-our $VERSION = '0.009'; # VERSION
-
use 5.010001;
use strict 'subs', 'vars';
use warnings;
use Time::HiRes qw(time);
+our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
+our $DATE = '2024-02-24'; # DATE
+our $DIST = 'Algorithm-Backoff'; # DIST
+our $VERSION = '0.010'; # VERSION
+
our %SPEC;
our %attr_consider_actual_delay = (
@@ -194,10 +196,9 @@ sub new {
sub _consider_actual_delay {
my ($self, $delay, $timestamp) = @_;
- $self->{_last_delay} //= 0;
+ $self->{_prev_delay} //= 0;
my $actual_delay = $timestamp - $self->{_last_timestamp};
- my $new_delay = $delay + $self->{_last_delay} - $actual_delay;
- $self->{_last_delay} = $new_delay;
+ my $new_delay = $delay + $self->{_prev_delay} - $actual_delay;
$new_delay;
}
@@ -279,7 +280,7 @@ Algorithm::Backoff - Various backoff strategies for retry
=head1 VERSION
-This document describes version 0.009 of Algorithm::Backoff (from Perl distribution Algorithm-Backoff), released on 2019-06-20.
+This document describes version 0.010 of Algorithm::Backoff (from Perl distribution Algorithm-Backoff), released on 2024-02-24.
=head1 SYNOPSIS
@@ -291,8 +292,10 @@ This document describes version 0.009 of Algorithm::Backoff (from Perl distribut
#delay_on_success => 0, # optional, default 0
);
- # 2. log success/failure and get a new number of seconds to delay, timestamp is
- # optional but must be monotonically increasing.
+ # 2. log success/failure and get a new number of seconds to delay. if you don't
+ # want to log for the current time, you can pass a timestamp (number of seconds
+ # passed since some reference value, like a Unix epoch) as the argument, which
+ # should be monotonically increasing.
my $secs = $ab->failure(); # => 2
my $secs = $ab->success(); # => 0
@@ -305,6 +308,12 @@ strategies for setting delay between retry attempts.
This class (C<Algorithm::Backoff>) is a base class only.
+Algorithm::Backoff does not actually provide a function/method to retry a piece
+of code. It only contains the backoff strategies and splits the actual delaying
+to another module (e.g. L<Retry::Backoff>). This allows for things like
+printing/returning all the retries and their delay amounts without actually
+doing the delay (e.g. in L<show-backoff-delays> script).
+
=head1 METHODS
@@ -341,6 +350,7 @@ Note that after a success, the number of attempts is reset (as expected). So if
max_attempts is 3, and if you fail twice then succeed, then on the next failure
the algorithm will retry again for a maximum of 3 times.
+
=back
Return value: (obj)
@@ -353,8 +363,8 @@ Usage:
my $secs = $obj->success([ $timestamp ]);
Log a successful attempt. If not specified, C<$timestamp> defaults to current
-time. Will return the suggested number of seconds to wait before doing another
-attempt.
+Unix timestamp. Will return the suggested number of seconds to wait before doing
+another attempt.
=head2 failure
@@ -362,9 +372,9 @@ Usage:
my $secs = $obj->failure([ $timestamp ]);
-Log a failed attempt. If not specified, C<$timestamp> defaults to current time.
-Will return the suggested number of seconds to wait before doing another
-attempt, or -1 if it suggests that one gives up (e.g. if C<max_attempts>
+Log a failed attempt. If not specified, C<$timestamp> defaults to current Unix
+timestamp. Will return the suggested number of seconds to wait before doing
+another attempt, or -1 if it suggests that one gives up (e.g. if C<max_attempts>
parameter has been exceeded).
=head1 HOMEPAGE
@@ -375,14 +385,6 @@ Please visit the project's homepage at L<https://metacpan.org/release/Algorithm-
Source repository is at L<https://github.com/perlancar/perl-Algorithm-Backoff>.
-=head1 BUGS
-
-Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-Backoff>
-
-When submitting a bug or request, please include a test-file or a
-patch to an existing test-file that illustrates the bug or desired
-feature.
-
=head1 SEE ALSO
L<Retry::Backoff> - an application of Algorithm::Backoff to retry a piece of
@@ -390,9 +392,9 @@ code using various backoff strategies.
L<App::AlgorithmBackoffUtils> - various CLI's related to Algorithm::Backoff.
-L<Action::Retry> - Somehow I didn't find this module before writing
-Algorithm::Backoff. Otherwise I probably would not have created
-Algorithm::Backoff. But Algorithm::Backoff offers an alternative interface, some
+L<Action::Retry> - A prior art for Algorithm::Backoff. Somehow I didn't find
+this module before writing Algorithm::Backoff. But Algorithm::Backoff offers an
+alternative interface (a split of actual sleep/retry vs the algorithm), and some
additional parameters (like delay on success and jitter factor), a lighter
footprint (no Moo), and a couple more strategies.
@@ -400,11 +402,53 @@ footprint (no Moo), and a couple more strategies.
perlancar <perlancar@cpan.org>
+=head1 CONTRIBUTORS
+
+=for stopwords Brendan Byrd SineSwiper
+
+=over 4
+
+=item *
+
+Brendan Byrd <brendan.byrd@grantstreet.com>
+
+=item *
+
+SineSwiper <GitHub@ResonatorSoft.org>
+
+=back
+
+=head1 CONTRIBUTING
+
+
+To contribute, you can send patches by email/via RT, or send pull requests on
+GitHub.
+
+Most of the time, you don't need to build the distribution yourself. You can
+simply modify the code, then test via:
+
+ % prove -l
+
+If you want to build the distribution (e.g. to try to install it locally on your
+system), you can install L<Dist::Zilla>,
+L<Dist::Zilla::PluginBundle::Author::PERLANCAR>,
+L<Pod::Weaver::PluginBundle::Author::PERLANCAR>, and sometimes one or two other
+Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond
+that are considered a bug and can be reported to me.
+
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2019 by perlancar@cpan.org.
+This software is copyright (c) 2024, 2019 by perlancar <perlancar@cpan.org>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
+=head1 BUGS
+
+Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-Backoff>
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
=cut
diff --git a/lib/Algorithm/Backoff/Constant.pm b/lib/Algorithm/Backoff/Constant.pm
index 753ef4c..4b4e421 100644
--- a/lib/Algorithm/Backoff/Constant.pm
+++ b/lib/Algorithm/Backoff/Constant.pm
@@ -1,13 +1,15 @@
package Algorithm::Backoff::Constant;
-our $DATE = '2019-06-20'; # DATE
-our $VERSION = '0.009'; # VERSION
-
use strict;
use warnings;
use parent qw(Algorithm::Backoff);
+our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
+our $DATE = '2024-02-24'; # DATE
+our $DIST = 'Algorithm-Backoff'; # DIST
+our $VERSION = '0.010'; # VERSION
+
our %SPEC;
$SPEC{new} = {
@@ -59,7 +61,7 @@ Algorithm::Backoff::Constant - Backoff using a constant delay
=head1 VERSION
-This document describes version 0.009 of Algorithm::Backoff::Constant (from Perl distribution Algorithm-Backoff), released on 2019-06-20.
+This document describes version 0.010 of Algorithm::Backoff::Constant (from Perl distribution Algorithm-Backoff), released on 2024-02-24.
=head1 SYNOPSIS
@@ -181,6 +183,7 @@ Maximum delay time, in seconds.
Maximum delay time, in seconds.
+
=back
Return value: (obj)
@@ -193,14 +196,6 @@ Please visit the project's homepage at L<https://metacpan.org/release/Algorithm-
Source repository is at L<https://github.com/perlancar/perl-Algorithm-Backoff>.
-=head1 BUGS
-
-Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-Backoff>
-
-When submitting a bug or request, please include a test-file or a
-patch to an existing test-file that illustrates the bug or desired
-feature.
-
=head1 SEE ALSO
L<Algorithm::Backoff>
@@ -211,11 +206,37 @@ Other C<Algorithm::Backoff::*> classes.
perlancar <perlancar@cpan.org>
+=head1 CONTRIBUTING
+
+
+To contribute, you can send patches by email/via RT, or send pull requests on
+GitHub.
+
+Most of the time, you don't need to build the distribution yourself. You can
+simply modify the code, then test via:
+
+ % prove -l
+
+If you want to build the distribution (e.g. to try to install it locally on your
+system), you can install L<Dist::Zilla>,
+L<Dist::Zilla::PluginBundle::Author::PERLANCAR>,
+L<Pod::Weaver::PluginBundle::Author::PERLANCAR>, and sometimes one or two other
+Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond
+that are considered a bug and can be reported to me.
+
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2019 by perlancar@cpan.org.
+This software is copyright (c) 2024, 2019 by perlancar <perlancar@cpan.org>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
+=head1 BUGS
+
+Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-Backoff>
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
=cut
diff --git a/lib/Algorithm/Backoff/Exponential.pm b/lib/Algorithm/Backoff/Exponential.pm
index b482aa8..be73332 100644
--- a/lib/Algorithm/Backoff/Exponential.pm
+++ b/lib/Algorithm/Backoff/Exponential.pm
@@ -1,13 +1,15 @@
package Algorithm::Backoff::Exponential;
-our $DATE = '2019-06-20'; # DATE
-our $VERSION = '0.009'; # VERSION
-
use strict;
use warnings;
use parent qw(Algorithm::Backoff);
+our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
+our $DATE = '2024-02-24'; # DATE
+our $DIST = 'Algorithm-Backoff'; # DIST
+our $VERSION = '0.010'; # VERSION
+
our %SPEC;
$SPEC{new} = {
@@ -60,7 +62,7 @@ Algorithm::Backoff::Exponential - Backoff exponentially
=head1 VERSION
-This document describes version 0.009 of Algorithm::Backoff::Exponential (from Perl distribution Algorithm-Backoff), released on 2019-06-20.
+This document describes version 0.010 of Algorithm::Backoff::Exponential (from Perl distribution Algorithm-Backoff), released on 2024-02-24.
=head1 SYNOPSIS
@@ -162,6 +164,8 @@ Number of seconds to wait after a success.
=item * B<exponent_base> => I<ufloat> (default: 2)
+(No description)
+
=item * B<initial_delay>* => I<ufloat>
Initial delay for the first attempt after failure, in seconds.
@@ -207,6 +211,7 @@ Maximum delay time, in seconds.
Maximum delay time, in seconds.
+
=back
Return value: (obj)
@@ -219,14 +224,6 @@ Please visit the project's homepage at L<https://metacpan.org/release/Algorithm-
Source repository is at L<https://github.com/perlancar/perl-Algorithm-Backoff>.
-=head1 BUGS
-
-Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-Backoff>
-
-When submitting a bug or request, please include a test-file or a
-patch to an existing test-file that illustrates the bug or desired
-feature.
-
=head1 SEE ALSO
L<https://en.wikipedia.org/wiki/Exponential_backoff>
@@ -239,11 +236,37 @@ Other C<Algorithm::Backoff::*> classes.
perlancar <perlancar@cpan.org>
+=head1 CONTRIBUTING
+
+
+To contribute, you can send patches by email/via RT, or send pull requests on
+GitHub.
+
+Most of the time, you don't need to build the distribution yourself. You can
+simply modify the code, then test via:
+
+ % prove -l
+
+If you want to build the distribution (e.g. to try to install it locally on your
+system), you can install L<Dist::Zilla>,
+L<Dist::Zilla::PluginBundle::Author::PERLANCAR>,
+L<Pod::Weaver::PluginBundle::Author::PERLANCAR>, and sometimes one or two other
+Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond
+that are considered a bug and can be reported to me.
+
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2019 by perlancar@cpan.org.
+This software is copyright (c) 2024, 2019 by perlancar <perlancar@cpan.org>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
+=head1 BUGS
+
+Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-Backoff>
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
=cut
diff --git a/lib/Algorithm/Backoff/Fibonacci.pm b/lib/Algorithm/Backoff/Fibonacci.pm
index b93384a..b912678 100644
--- a/lib/Algorithm/Backoff/Fibonacci.pm
+++ b/lib/Algorithm/Backoff/Fibonacci.pm
@@ -1,13 +1,15 @@
package Algorithm::Backoff::Fibonacci;
-our $DATE = '2019-06-20'; # DATE
-our $VERSION = '0.009'; # VERSION
-
use strict;
use warnings;
use parent qw(Algorithm::Backoff);
+our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
+our $DATE = '2024-02-24'; # DATE
+our $DIST = 'Algorithm-Backoff'; # DIST
+our $VERSION = '0.010'; # VERSION
+
our %SPEC;
$SPEC{new} = {
@@ -77,7 +79,7 @@ Algorithm::Backoff::Fibonacci - Backoff using Fibonacci sequence
=head1 VERSION
-This document describes version 0.009 of Algorithm::Backoff::Fibonacci (from Perl distribution Algorithm-Backoff), released on 2019-06-20.
+This document describes version 0.010 of Algorithm::Backoff::Fibonacci (from Perl distribution Algorithm-Backoff), released on 2024-02-24.
=head1 SYNOPSIS
@@ -225,6 +227,7 @@ Maximum delay time, in seconds.
Maximum delay time, in seconds.
+
=back
Return value: (obj)
@@ -237,14 +240,6 @@ Please visit the project's homepage at L<https://metacpan.org/release/Algorithm-
Source repository is at L<https://github.com/perlancar/perl-Algorithm-Backoff>.
-=head1 BUGS
-
-Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-Backoff>
-
-When submitting a bug or request, please include a test-file or a
-patch to an existing test-file that illustrates the bug or desired
-feature.
-
=head1 SEE ALSO
L<https://en.wikipedia.org/wiki/Fibonacci_number>
@@ -257,11 +252,37 @@ Other C<Algorithm::Backoff::*> classes.
perlancar <perlancar@cpan.org>
+=head1 CONTRIBUTING
+
+
+To contribute, you can send patches by email/via RT, or send pull requests on
+GitHub.
+
+Most of the time, you don't need to build the distribution yourself. You can
+simply modify the code, then test via:
+
+ % prove -l
+
+If you want to build the distribution (e.g. to try to install it locally on your
+system), you can install L<Dist::Zilla>,
+L<Dist::Zilla::PluginBundle::Author::PERLANCAR>,
+L<Pod::Weaver::PluginBundle::Author::PERLANCAR>, and sometimes one or two other
+Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond
+that are considered a bug and can be reported to me.
+
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2019 by perlancar@cpan.org.
+This software is copyright (c) 2024, 2019 by perlancar <perlancar@cpan.org>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
+=head1 BUGS
+
+Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-Backoff>
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
=cut
diff --git a/lib/Algorithm/Backoff/LILD.pm b/lib/Algorithm/Backoff/LILD.pm
index ab56824..bfd621f 100644
--- a/lib/Algorithm/Backoff/LILD.pm
+++ b/lib/Algorithm/Backoff/LILD.pm
@@ -1,13 +1,15 @@
package Algorithm::Backoff::LILD;
-our $DATE = '2019-06-20'; # DATE
-our $VERSION = '0.009'; # VERSION
-
use strict;
use warnings;
use parent qw(Algorithm::Backoff);
+our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
+our $DATE = '2024-02-24'; # DATE
+our $DIST = 'Algorithm-Backoff'; # DIST
+our $VERSION = '0.010'; # VERSION
+
our %SPEC;
$SPEC{new} = {
@@ -70,7 +72,7 @@ Algorithm::Backoff::LILD - Linear Increment, Linear Decrement (LILD) backoff
=head1 VERSION
-This document describes version 0.009 of Algorithm::Backoff::LILD (from Perl distribution Algorithm-Backoff), released on 2019-06-20.
+This document describes version 0.010 of Algorithm::Backoff::LILD (from Perl distribution Algorithm-Backoff), released on 2024-02-24.
=head1 SYNOPSIS
@@ -225,6 +227,7 @@ Maximum delay time, in seconds.
Maximum delay time, in seconds.
+
=back
Return value: (obj)
@@ -237,14 +240,6 @@ Please visit the project's homepage at L<https://metacpan.org/release/Algorithm-
Source repository is at L<https://github.com/perlancar/perl-Algorithm-Backoff>.
-=head1 BUGS
-
-Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-Backoff>
-
-When submitting a bug or request, please include a test-file or a
-patch to an existing test-file that illustrates the bug or desired
-feature.
-
=head1 SEE ALSO
L<Algorithm::Backoff::LIMD>
@@ -261,11 +256,37 @@ Other C<Algorithm::Backoff::*> classes.
perlancar <perlancar@cpan.org>
+=head1 CONTRIBUTING
+
+
+To contribute, you can send patches by email/via RT, or send pull requests on
+GitHub.
+
+Most of the time, you don't need to build the distribution yourself. You can
+simply modify the code, then test via:
+
+ % prove -l
+
+If you want to build the distribution (e.g. to try to install it locally on your
+system), you can install L<Dist::Zilla>,
+L<Dist::Zilla::PluginBundle::Author::PERLANCAR>,
+L<Pod::Weaver::PluginBundle::Author::PERLANCAR>, and sometimes one or two other
+Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond
+that are considered a bug and can be reported to me.
+
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2019 by perlancar@cpan.org.
+This software is copyright (c) 2024, 2019 by perlancar <perlancar@cpan.org>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
+=head1 BUGS
+
+Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-Backoff>
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
=cut
diff --git a/lib/Algorithm/Backoff/LIMD.pm b/lib/Algorithm/Backoff/LIMD.pm
index e713f80..8c784d3 100644
--- a/lib/Algorithm/Backoff/LIMD.pm
+++ b/lib/Algorithm/Backoff/LIMD.pm
@@ -1,13 +1,15 @@
package Algorithm::Backoff::LIMD;
-our $DATE = '2019-06-20'; # DATE
-our $VERSION = '0.009'; # VERSION
-
use strict;
use warnings;
use parent qw(Algorithm::Backoff);
+our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
+our $DATE = '2024-02-24'; # DATE
+our $DIST = 'Algorithm-Backoff'; # DIST
+our $VERSION = '0.010'; # VERSION
+
our %SPEC;
$SPEC{new} = {
@@ -70,7 +72,7 @@ Algorithm::Backoff::LIMD - Linear Increment, Multiplicative Decrement (LIMD) bac
=head1 VERSION
-This document describes version 0.009 of Algorithm::Backoff::LIMD (from Perl distribution Algorithm-Backoff), released on 2019-06-20.
+This document describes version 0.010 of Algorithm::Backoff::LIMD (from Perl distribution Algorithm-Backoff), released on 2024-02-24.
=head1 SYNOPSIS
@@ -223,6 +225,7 @@ Maximum delay time, in seconds.
Maximum delay time, in seconds.
+
=back
Return value: (obj)
@@ -235,14 +238,6 @@ Please visit the project's homepage at L<https://metacpan.org/release/Algorithm-
Source repository is at L<https://github.com/perlancar/perl-Algorithm-Backoff>.
-=head1 BUGS
-
-Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-Backoff>
-
-When submitting a bug or request, please include a test-file or a
-patch to an existing test-file that illustrates the bug or desired
-feature.
-
=head1 SEE ALSO
L<Algorithm::Backoff::LILD>
@@ -259,11 +254,37 @@ Other C<Algorithm::Backoff::*> classes.
perlancar <perlancar@cpan.org>
+=head1 CONTRIBUTING
+
+
+To contribute, you can send patches by email/via RT, or send pull requests on
+GitHub.
+
+Most of the time, you don't need to build the distribution yourself. You can
+simply modify the code, then test via:
+
+ % prove -l
+
+If you want to build the distribution (e.g. to try to install it locally on your
+system), you can install L<Dist::Zilla>,
+L<Dist::Zilla::PluginBundle::Author::PERLANCAR>,
+L<Pod::Weaver::PluginBundle::Author::PERLANCAR>, and sometimes one or two other
+Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond
+that are considered a bug and can be reported to me.
+
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2019 by perlancar@cpan.org.
+This software is copyright (c) 2024, 2019 by perlancar <perlancar@cpan.org>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
+=head1 BUGS
+
+Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-Backoff>
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
=cut
diff --git a/lib/Algorithm/Backoff/MILD.pm b/lib/Algorithm/Backoff/MILD.pm
index b703717..56ae983 100644
--- a/lib/Algorithm/Backoff/MILD.pm
+++ b/lib/Algorithm/Backoff/MILD.pm
@@ -1,13 +1,15 @@
package Algorithm::Backoff::MILD;
-our $DATE = '2019-06-20'; # DATE
-our $VERSION = '0.009'; # VERSION
-
use strict;
use warnings;
use parent qw(Algorithm::Backoff);
+our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
+our $DATE = '2024-02-24'; # DATE
+our $DIST = 'Algorithm-Backoff'; # DIST
+our $VERSION = '0.010'; # VERSION
+
our %SPEC;
$SPEC{new} = {
@@ -70,7 +72,7 @@ Algorithm::Backoff::MILD - Multiplicative Increment, Linear Decrement (MILD) bac
=head1 VERSION
-This document describes version 0.009 of Algorithm::Backoff::MILD (from Perl distribution Algorithm-Backoff), released on 2019-06-20.
+This document describes version 0.010 of Algorithm::Backoff::MILD (from Perl distribution Algorithm-Backoff), released on 2024-02-24.
=head1 SYNOPSIS
@@ -226,6 +228,7 @@ Maximum delay time, in seconds.
Maximum delay time, in seconds.
+
=back
Return value: (obj)
@@ -238,14 +241,6 @@ Please visit the project's homepage at L<https://metacpan.org/release/Algorithm-
Source repository is at L<https://github.com/perlancar/perl-Algorithm-Backoff>.
-=head1 BUGS
-
-Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-Backoff>
-
-When submitting a bug or request, please include a test-file or a
-patch to an existing test-file that illustrates the bug or desired
-feature.
-
=head1 SEE ALSO
L<Algorithm::Backoff::LILD>
@@ -262,11 +257,37 @@ Other C<Algorithm::Backoff::*> classes.
perlancar <perlancar@cpan.org>
+=head1 CONTRIBUTING
+
+
+To contribute, you can send patches by email/via RT, or send pull requests on
+GitHub.
+
+Most of the time, you don't need to build the distribution yourself. You can
+simply modify the code, then test via:
+
+ % prove -l
+
+If you want to build the distribution (e.g. to try to install it locally on your
+system), you can install L<Dist::Zilla>,
+L<Dist::Zilla::PluginBundle::Author::PERLANCAR>,
+L<Pod::Weaver::PluginBundle::Author::PERLANCAR>, and sometimes one or two other
+Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond
+that are considered a bug and can be reported to me.
+
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2019 by perlancar@cpan.org.
+This software is copyright (c) 2024, 2019 by perlancar <perlancar@cpan.org>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
+=head1 BUGS
+
+Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-Backoff>
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
=cut
diff --git a/lib/Algorithm/Backoff/MIMD.pm b/lib/Algorithm/Backoff/MIMD.pm
index cb13bab..987739f 100644
--- a/lib/Algorithm/Backoff/MIMD.pm
+++ b/lib/Algorithm/Backoff/MIMD.pm
@@ -1,13 +1,15 @@
package Algorithm::Backoff::MIMD;
-our $DATE = '2019-06-20'; # DATE
-our $VERSION = '0.009'; # VERSION
-
use strict;
use warnings;
use parent qw(Algorithm::Backoff);
+our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
+our $DATE = '2024-02-24'; # DATE
+our $DIST = 'Algorithm-Backoff'; # DIST
+our $VERSION = '0.010'; # VERSION
+
our %SPEC;
$SPEC{new} = {
@@ -70,7 +72,7 @@ Algorithm::Backoff::MIMD - Multiplicative Increment, Multiplicative Decrement (M
=head1 VERSION
-This document describes version 0.009 of Algorithm::Backoff::MIMD (from Perl distribution Algorithm-Backoff), released on 2019-06-20.
+This document describes version 0.010 of Algorithm::Backoff::MIMD (from Perl distribution Algorithm-Backoff), released on 2024-02-24.
=head1 SYNOPSIS
@@ -228,6 +230,7 @@ Maximum delay time, in seconds.
Maximum delay time, in seconds.
+
=back
Return value: (obj)
@@ -240,14 +243,6 @@ Please visit the project's homepage at L<https://metacpan.org/release/Algorithm-
Source repository is at L<https://github.com/perlancar/perl-Algorithm-Backoff>.
-=head1 BUGS
-
-Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-Backoff>
-
-When submitting a bug or request, please include a test-file or a
-patch to an existing test-file that illustrates the bug or desired
-feature.
-
=head1 SEE ALSO
L<Algorithm::Backoff::LILD>
@@ -264,11 +259,37 @@ Other C<Algorithm::Backoff::*> classes.
perlancar <perlancar@cpan.org>
+=head1 CONTRIBUTING
+
+
+To contribute, you can send patches by email/via RT, or send pull requests on
+GitHub.
+
+Most of the time, you don't need to build the distribution yourself. You can
+simply modify the code, then test via:
+
+ % prove -l
+
+If you want to build the distribution (e.g. to try to install it locally on your
+system), you can install L<Dist::Zilla>,
+L<Dist::Zilla::PluginBundle::Author::PERLANCAR>,
+L<Pod::Weaver::PluginBundle::Author::PERLANCAR>, and sometimes one or two other
+Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond
+that are considered a bug and can be reported to me.
+
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2019 by perlancar@cpan.org.
+This software is copyright (c) 2024, 2019 by perlancar <perlancar@cpan.org>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
+=head1 BUGS
+
+Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-Backoff>
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
=cut
diff --git a/t/01-base.t b/t/01-base.t
index 01c26f3..39685a4 100644
--- a/t/01-base.t
+++ b/t/01-base.t
@@ -4,10 +4,11 @@ use strict;
use warnings;
use Test::Exception;
use Test::More 0.98;
+#use Test::RandomResults;
use Algorithm::Backoff::Constant;
-# XXX test max_attempts for each strategy
+# XXX also test max_attempts for each strategy
subtest "attr: max_attempts" => sub {
my $ar;
@@ -36,7 +37,7 @@ subtest "attr: max_attempts" => sub {
is ($ar->failure(1), -1);
};
-# XXX test max_actual_duration for each strategy
+# XXX also test max_actual_duration for each strategy
subtest "attr: max_actual_duration" => sub {
my $ar;
@@ -51,7 +52,7 @@ subtest "attr: max_actual_duration" => sub {
is ($ar->failure(4), -1);
};
-# XXX test consider_actual_delay for each strategy
+# XXX also test consider_actual_delay for each strategy
subtest "attr: consider_actual_delay" => sub {
my $ar;
@@ -76,7 +77,35 @@ subtest "attr: consider_actual_delay" => sub {
is($ar->failure(11), 0);
};
-# XXX test jitter_factor for each strategy
+# This tests that consider_actual_delay uses the post-processed _prev_delay
+# value correctly.
+subtest "attr: consider_actual_delay + post-processing" => sub {
+ my $ar;
+
+ $ar = Algorithm::Backoff::Constant->new(
+ consider_actual_delay => 1,
+ delay => 3, # "pre-processor" delay
+ max_delay => 2, # real delay
+ max_attempts => 0,
+ );
+
+ # first failure after 1 second
+ is($ar->failure(1), 2);
+
+ # 2s delay + instant failure, so the delay is now 3 -> max 2
+ is($ar->failure(1+2+0), 2);
+
+ # 2s delay + 2s failure, so the delay is now 3-2 = 1
+ is($ar->failure(3+2+2), 1);
+
+ # 1s delay + 5s failure, so delay is now 3-5 = -2 -> min 0
+ is($ar->failure(7+1+5), 0);
+
+ # 0s delay + instant failure, so delay is now 3 -> max 2
+ is($ar->failure(13+0+0), 2);
+};
+
+# XXX also test jitter_factor for each strategy
subtest "attr: jitter_factor" => sub {
my $ar = Algorithm::Backoff::Constant->new(
delay => 2,
diff --git a/t/author-critic.t b/t/author-critic.t
index 22becf1..c95d7de 100644
--- a/t/author-critic.t
+++ b/t/author-critic.t
@@ -11,5 +11,13 @@ BEGIN {
use strict;
use warnings;
-use Test::Perl::Critic (-profile => "perlcritic.rc") x!! -e "perlcritic.rc";
-all_critic_ok();
+# this test was generated with Dist::Zilla::Plugin::Test::Perl::Critic::Subset 3.001.006
+
+use Test::Perl::Critic (-profile => "") x!! -e "";
+
+my $filenames = ['lib/Algorithm/Backoff.pm','lib/Algorithm/Backoff/Constant.pm','lib/Algorithm/Backoff/Exponential.pm','lib/Algorithm/Backoff/Fibonacci.pm','lib/Algorithm/Backoff/LILD.pm','lib/Algorithm/Backoff/LIMD.pm','lib/Algorithm/Backoff/MILD.pm','lib/Algorithm/Backoff/MIMD.pm'];
+unless ($filenames && @$filenames) {
+ $filenames = -d "blib" ? ["blib"] : ["lib"];
+}
+
+all_critic_ok(@$filenames);
diff --git a/t/author-pod-coverage.t b/t/author-pod-coverage.t
index 243340f..09473df 100644
--- a/t/author-pod-coverage.t
+++ b/t/author-pod-coverage.t
@@ -8,7 +8,8 @@ BEGIN {
}
# This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests.
-
+use strict;
+use warnings;
use Test::Pod::Coverage 1.08;
use Pod::Coverage::TrustPod;