diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..00471dd --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.build +Acme-Time-Constant-* diff --git a/.perltidyrc b/.perltidyrc new file mode 100644 index 0000000..3af28b5 --- /dev/null +++ b/.perltidyrc @@ -0,0 +1,2 @@ +-i 2 +-l 130 diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..38a6708 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,56 @@ +language: perl +matrix: + allow_failures: + - perl: "5.8" + - env: STERILIZE_ENV=0 RELEASE_TESTING=1 AUTHOR_TESTING=1 + - env: STERILIZE_ENV=0 DEVELOPER_DEPS=1 + include: + - perl: "5.8" + env: STERILIZE_ENV=0 + - perl: "5.10" + env: STERILIZE_ENV=0 + - perl: "5.12" + env: STERILIZE_ENV=0 + - perl: "5.14" + env: STERILIZE_ENV=0 + - perl: "5.16" + env: STERILIZE_ENV=0 + - perl: "5.20" + env: STERILIZE_ENV=0 + - perl: "5.21" + env: STERILIZE_ENV=0 + - perl: "5.8" + env: STERILIZE_ENV=1 + - perl: "5.10" + env: STERILIZE_ENV=1 + - perl: "5.20" + env: STERILIZE_ENV=1 + - perl: "5.21" + env: STERILIZE_ENV=1 + - perl: "5.21" + env: STERILIZE_ENV=0 DEVELOPER_DEPS=1 + - perl: "5.21" + env: STERILIZE_ENV=0 RELEASE_TESTING=1 AUTHOR_TESTING=1 + - perl: "5.21" + env: STERILIZE_ENV=0 COVERAGE_TESTING=1 +before_install: + - perlbrew list + - time git clone --depth 10 https://github.com/kentfredric/travis-scripts.git maint-travis-ci + - time git -C ./maint-travis-ci reset --hard master + - time perl ./maint-travis-ci/branch_reset.pl + - time perl ./maint-travis-ci/sterilize_env.pl +install: + - time perl ./maint-travis-ci/install_deps_early.pl + - time perl ./maint-travis-ci/install_deps.pl +before_script: + - time perl ./maint-travis-ci/before_script.pl +script: + - time perl ./maint-travis-ci/script.pl +after_failure: + - perl ./maint-travis-ci/report_fail_ctx.pl +branches: + only: + - "master" + - "build/master" + - "releases" + diff --git a/Changes b/Changes new file mode 100644 index 0000000..b355af5 --- /dev/null +++ b/Changes @@ -0,0 +1,5 @@ +Release history for Acme-Time-Constant + +0.001000 2014-08-04T04:27:24Z + - First version. + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f54a236 --- /dev/null +++ b/LICENSE @@ -0,0 +1,379 @@ +This software is copyright (c) 2014 by Kent Fredric . + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. + +Terms of the Perl programming language system itself + +a) the GNU General Public License as published by the Free + Software Foundation; either version 1, or (at your option) any + later version, or +b) the "Artistic License" + +--- The GNU General Public License, Version 1, February 1989 --- + +This software is Copyright (c) 2014 by Kent Fredric . + +This is free software, licensed under: + + The GNU General Public License, Version 1, February 1989 + + GNU GENERAL PUBLIC LICENSE + Version 1, February 1989 + + Copyright (C) 1989 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The license agreements of most software companies try to keep users +at the mercy of those companies. By contrast, our General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. The +General Public License applies to the Free Software Foundation's +software and to any other program whose authors commit to using it. +You can use it for your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Specifically, the General Public License is designed to make +sure that you have the freedom to give away or sell copies of free +software, that you receive source code or can get it if you want it, +that you can change the software or use pieces of it in new free +programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of a such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must tell them their rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any program or other work which +contains a notice placed by the copyright holder saying it may be +distributed under the terms of this General Public License. The +"Program", below, refers to any such program or work, and a "work based +on the Program" means either the Program or any work containing the +Program or a portion of it, either verbatim or with modifications. Each +licensee is addressed as "you". + + 1. You may copy and distribute verbatim copies of the Program's source +code as you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this +General Public License and to the absence of any warranty; and give any +other recipients of the Program a copy of this General Public License +along with the Program. You may charge a fee for the physical act of +transferring a copy. + + 2. You may modify your copy or copies of the Program or any portion of +it, and copy and distribute such modifications under the terms of Paragraph +1 above, provided that you also do the following: + + a) cause the modified files to carry prominent notices stating that + you changed the files and the date of any change; and + + b) cause the whole of any work that you distribute or publish, that + in whole or in part contains the Program or any part thereof, either + with or without modifications, to be licensed at no charge to all + third parties under the terms of this General Public License (except + that you may choose to grant warranty protection to some or all + third parties, at your option). + + c) If the modified program normally reads commands interactively when + run, you must cause it, when started running for such interactive use + in the simplest and most usual way, to print or display an + announcement including an appropriate copyright notice and a notice + that there is no warranty (or else, saying that you provide a + warranty) and that users may redistribute the program under these + conditions, and telling the user how to view a copy of this General + Public License. + + d) You may charge a fee for the physical act of transferring a + copy, and you may at your option offer warranty protection in + exchange for a fee. + +Mere aggregation of another independent work with the Program (or its +derivative) on a volume of a storage or distribution medium does not bring +the other work under the scope of these terms. + + 3. You may copy and distribute the Program (or a portion or derivative of +it, under Paragraph 2) in object code or executable form under the terms of +Paragraphs 1 and 2 above provided that you also do one of the following: + + a) accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of + Paragraphs 1 and 2 above; or, + + b) accompany it with a written offer, valid for at least three + years, to give any third party free (except for a nominal charge + for the cost of distribution) a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of + Paragraphs 1 and 2 above; or, + + c) accompany it with the information you received as to where the + corresponding source code may be obtained. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form alone.) + +Source code for a work means the preferred form of the work for making +modifications to it. For an executable file, complete source code means +all the source code for all modules it contains; but, as a special +exception, it need not include source code for modules which are standard +libraries that accompany the operating system on which the executable +file runs, or for standard header files or definitions files that +accompany that operating system. + + 4. You may not copy, modify, sublicense, distribute or transfer the +Program except as expressly provided under this General Public License. +Any attempt otherwise to copy, modify, sublicense, distribute or transfer +the Program is void, and will automatically terminate your rights to use +the Program under this License. However, parties who have received +copies, or rights to use copies, from you under this General Public +License will not have their licenses terminated so long as such parties +remain in full compliance. + + 5. By copying, distributing or modifying the Program (or any work based +on the Program) you indicate your acceptance of this license to do so, +and all its terms and conditions. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the original +licensor to copy, distribute or modify the Program subject to these +terms and conditions. You may not impose any further restrictions on the +recipients' exercise of the rights granted herein. + + 7. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of the license which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +the license, you may choose any version ever published by the Free Software +Foundation. + + 8. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to humanity, the best way to achieve this is to make it +free software which everyone can redistribute and change under these +terms. + + To do so, attach the following notices to the program. It is safest to +attach them to the start of each source file to most effectively convey +the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19xx name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the +appropriate parts of the General Public License. Of course, the +commands you use may be called something other than `show w' and `show +c'; they could even be mouse-clicks or menu items--whatever suits your +program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + program `Gnomovision' (a program to direct compilers to make passes + at assemblers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +That's all there is to it! + + +--- The Artistic License 1.0 --- + +This software is Copyright (c) 2014 by Kent Fredric . + +This is free software, licensed under: + + The 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. + +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. + +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. + +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. + + 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. + + 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: + + 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. + + 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. + + 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 +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. + +The End + diff --git a/MANIFEST b/MANIFEST new file mode 100644 index 0000000..11154a9 --- /dev/null +++ b/MANIFEST @@ -0,0 +1,30 @@ +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.020. +.gitignore +.perltidyrc +.travis.yml +Changes +LICENSE +MANIFEST +META.json +META.yml +Makefile.PL +README +dist.ini +dist.ini.meta +lib/Acme/Time/Constant.pm +maint/perlcritic.rc.gen.pl +misc/perlcritic.deps +perlcritic.rc +t/00-compile/lib_Acme_Time_Constant_pm.t +t/00-report-prereqs.dd +t/00-report-prereqs.t +t/basic.t +weaver.ini +xt/author/critic.t +xt/release/cpan-changes.t +xt/release/distmeta.t +xt/release/eol.t +xt/release/kwalitee.t +xt/release/minimum-version.t +xt/release/pod-coverage.t +xt/release/pod-syntax.t diff --git a/META.json b/META.json new file mode 100644 index 0000000..367cfe3 --- /dev/null +++ b/META.json @@ -0,0 +1,815 @@ +{ + "abstract" : "Run any code in constant time.", + "author" : [ + "Kent Fredric " + ], + "dynamic_config" : 0, + "generated_by" : "Dist::Zilla version 5.020, CPAN::Meta::Converter version 2.142060", + "license" : [ + "perl_5" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "Acme-Time-Constant", + "prereqs" : { + "configure" : { + "recommends" : { + "ExtUtils::MakeMaker" : "6.98" + }, + "requires" : { + "ExtUtils::MakeMaker" : "0" + } + }, + "develop" : { + "requires" : { + "Dist::Zilla::Plugin::Authority" : "1.006", + "Dist::Zilla::Plugin::AutoPrereqs" : "0", + "Dist::Zilla::Plugin::BumpVersionAfterRelease" : "0", + "Dist::Zilla::Plugin::ConfirmRelease" : "0", + "Dist::Zilla::Plugin::CopyFilesFromBuild" : "0", + "Dist::Zilla::Plugin::EOLTests" : "0", + "Dist::Zilla::Plugin::Git::Check" : "0", + "Dist::Zilla::Plugin::Git::Commit" : "0", + "Dist::Zilla::Plugin::Git::CommitBuild" : "0", + "Dist::Zilla::Plugin::Git::GatherDir" : "0", + "Dist::Zilla::Plugin::Git::NextRelease" : "0", + "Dist::Zilla::Plugin::Git::Tag" : "0", + "Dist::Zilla::Plugin::GithubMeta" : "0", + "Dist::Zilla::Plugin::License" : "0", + "Dist::Zilla::Plugin::MakeMaker" : "0", + "Dist::Zilla::Plugin::Manifest" : "0", + "Dist::Zilla::Plugin::ManifestSkip" : "0", + "Dist::Zilla::Plugin::MetaConfig" : "0", + "Dist::Zilla::Plugin::MetaData::BuiltWith" : "0", + "Dist::Zilla::Plugin::MetaJSON" : "0", + "Dist::Zilla::Plugin::MetaProvides::Package" : "1.14000001", + "Dist::Zilla::Plugin::MetaTests" : "0", + "Dist::Zilla::Plugin::MetaYAML" : "0", + "Dist::Zilla::Plugin::MinimumPerl" : "0", + "Dist::Zilla::Plugin::PodCoverageTests" : "0", + "Dist::Zilla::Plugin::PodSyntaxTests" : "0", + "Dist::Zilla::Plugin::PodWeaver" : "0", + "Dist::Zilla::Plugin::Prereqs" : "0", + "Dist::Zilla::Plugin::Prereqs::Recommend::MatchInstalled" : "0", + "Dist::Zilla::Plugin::ReadmeAnyFromPod" : "0", + "Dist::Zilla::Plugin::ReadmeFromPod" : "0", + "Dist::Zilla::Plugin::RewriteVersion::Sanitized" : "0", + "Dist::Zilla::Plugin::RunExtraTests" : "0", + "Dist::Zilla::Plugin::Test::CPAN::Changes" : "0", + "Dist::Zilla::Plugin::Test::Compile::PerFile" : "0", + "Dist::Zilla::Plugin::Test::Kwalitee" : "0", + "Dist::Zilla::Plugin::Test::MinimumVersion" : "0", + "Dist::Zilla::Plugin::Test::Perl::Critic" : "0", + "Dist::Zilla::Plugin::Test::ReportPrereqs" : "0", + "Dist::Zilla::Plugin::TestRelease" : "0", + "Dist::Zilla::Plugin::Twitter" : "0", + "Dist::Zilla::Plugin::UploadToCPAN" : "0", + "Pod::Coverage::TrustPod" : "0", + "Test::CPAN::Changes" : "0.19", + "Test::CPAN::Meta" : "0", + "Test::Kwalitee" : "1.12", + "Test::Pod" : "1.41", + "Test::Pod::Coverage" : "1.08" + }, + "suggests" : { + "Dist::Zilla::App::Command::bakeini" : "0.001001", + "Dist::Zilla::PluginBundle::Author::KENTNL" : "2.016007" + } + }, + "runtime" : { + "requires" : { + "Sub::Exporter::Progressive" : "0", + "Time::HiRes" : "0", + "Time::Warp" : "0", + "perl" : "5.008", + "strict" : "0", + "utf8" : "0", + "warnings" : "0" + } + }, + "test" : { + "recommends" : { + "CPAN::Meta" : "2.120900", + "ExtUtils::MakeMaker" : "6.98", + "Test::More" : "1.001003" + }, + "requires" : { + "ExtUtils::MakeMaker" : "0", + "File::Spec" : "0", + "Test::More" : "0.89" + } + } + }, + "provides" : { + "Acme::Time::Constant" : { + "file" : "lib/Acme/Time/Constant.pm", + "version" : "0.001000" + } + }, + "release_status" : "stable", + "resources" : { + "bugtracker" : { + "web" : "https://github.com/kentnl/Acme-Time-Constant/issues" + }, + "homepage" : "https://github.com/kentnl/Acme-Time-Constant", + "repository" : { + "type" : "git", + "url" : "https://github.com/kentnl/Acme-Time-Constant.git", + "web" : "https://github.com/kentnl/Acme-Time-Constant" + } + }, + "version" : "0.001000", + "x_BuiltWith" : { + "modules" : { + "CPAN::Meta" : "2.142060", + "Dist::Zilla::App::Command::bakeini" : "0.001001", + "Dist::Zilla::Plugin::Authority" : "1.006", + "Dist::Zilla::Plugin::AutoPrereqs" : "5.020", + "Dist::Zilla::Plugin::BumpVersionAfterRelease" : "0.002", + "Dist::Zilla::Plugin::ConfirmRelease" : "5.020", + "Dist::Zilla::Plugin::CopyFilesFromBuild" : "0.103510", + "Dist::Zilla::Plugin::EOLTests" : "0.02", + "Dist::Zilla::Plugin::Git::Check" : "2.023", + "Dist::Zilla::Plugin::Git::Commit" : "2.023", + "Dist::Zilla::Plugin::Git::CommitBuild" : "2.023", + "Dist::Zilla::Plugin::Git::GatherDir" : "2.023", + "Dist::Zilla::Plugin::Git::NextRelease" : "0.002011", + "Dist::Zilla::Plugin::Git::Tag" : "2.023", + "Dist::Zilla::Plugin::GithubMeta" : "0.46", + "Dist::Zilla::Plugin::License" : "5.020", + "Dist::Zilla::Plugin::MakeMaker" : "5.020", + "Dist::Zilla::Plugin::Manifest" : "5.020", + "Dist::Zilla::Plugin::ManifestSkip" : "5.020", + "Dist::Zilla::Plugin::MetaConfig" : "5.020", + "Dist::Zilla::Plugin::MetaData::BuiltWith" : "1.001000", + "Dist::Zilla::Plugin::MetaJSON" : "5.020", + "Dist::Zilla::Plugin::MetaProvides::Package" : "2.000003", + "Dist::Zilla::Plugin::MetaTests" : "5.020", + "Dist::Zilla::Plugin::MetaYAML" : "5.020", + "Dist::Zilla::Plugin::MinimumPerl" : "1.003", + "Dist::Zilla::Plugin::PodCoverageTests" : "5.020", + "Dist::Zilla::Plugin::PodSyntaxTests" : "5.020", + "Dist::Zilla::Plugin::PodWeaver" : "4.005", + "Dist::Zilla::Plugin::Prereqs" : "5.020", + "Dist::Zilla::Plugin::Prereqs::Recommend::MatchInstalled" : "0.002000", + "Dist::Zilla::Plugin::ReadmeAnyFromPod" : "0.141760", + "Dist::Zilla::Plugin::ReadmeFromPod" : "0.21", + "Dist::Zilla::Plugin::RewriteVersion::Sanitized" : "0.001001", + "Dist::Zilla::Plugin::RunExtraTests" : "0.022", + "Dist::Zilla::Plugin::Test::CPAN::Changes" : "0.008", + "Dist::Zilla::Plugin::Test::Compile::PerFile" : "0.002001", + "Dist::Zilla::Plugin::Test::Kwalitee" : "2.07", + "Dist::Zilla::Plugin::Test::MinimumVersion" : "2.000005", + "Dist::Zilla::Plugin::Test::Perl::Critic" : "2.112410", + "Dist::Zilla::Plugin::Test::ReportPrereqs" : "0.018", + "Dist::Zilla::Plugin::TestRelease" : "5.020", + "Dist::Zilla::Plugin::Twitter" : "0.025", + "Dist::Zilla::Plugin::UploadToCPAN" : "5.020", + "Dist::Zilla::PluginBundle::Author::KENTNL" : "2.016007", + "ExtUtils::MakeMaker" : "6.98", + "File::Spec" : "3.48", + "Pod::Coverage::TrustPod" : "0.100003", + "Sub::Exporter::Progressive" : "0.001011", + "Test::CPAN::Changes" : "0.30", + "Test::CPAN::Meta" : "0.23", + "Test::Kwalitee" : "1.19", + "Test::More" : "1.001003", + "Test::Pod" : "1.48", + "Test::Pod::Coverage" : "1.10", + "Time::HiRes" : "1.9726", + "Time::Warp" : "0.5", + "strict" : "1.08", + "utf8" : "1.14", + "warnings" : "1.24" + }, + "perl" : { + "original" : "v5.21.1", + "qv" : 1, + "version" : [ + 5, + 21, + 1 + ] + }, + "perl-config" : { + "gccversion" : "4.8.3", + "myarchname" : "x86_64-linux", + "osname" : "linux" + }, + "platform" : "linux", + "uname" : "Linux 3.15.5-aufs x86_64 GenuineIntel GNU/Linux" + }, + "x_Dist_Zilla" : { + "perl" : { + "version" : "5.021001" + }, + "plugins" : [ + { + "class" : "Dist::Zilla::Plugin::MetaConfig", + "name" : "@Author::KENTNL/MetaConfig", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::GithubMeta", + "name" : "@Author::KENTNL/GithubMeta", + "version" : "0.46" + }, + { + "class" : "Dist::Zilla::Plugin::MetaProvides::Package", + "config" : { + "Dist::Zilla::Plugin::MetaProvides::Package" : { + "finder_objects" : [ + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : "@Author::KENTNL/MetaProvides::Package/AUTOVIV/:InstallModulesPM", + "version" : "5.020" + } + ] + }, + "Dist::Zilla::Role::MetaProvider::Provider" : { + "inherit_missing" : "1", + "inherit_version" : "1", + "meta_noindex" : "1" + } + }, + "name" : "@Author::KENTNL/MetaProvides::Package", + "version" : "2.000003" + }, + { + "class" : "Dist::Zilla::Plugin::MetaData::BuiltWith", + "config" : { + "Dist::Zilla::Plugin::MetaData::BuiltWith" : { + "_stash_key" : "x_BuiltWith", + "show_config" : "1", + "show_uname" : "1", + "uname" : { + "uname_args" : [ + "-s", + "-o", + "-r", + "-m", + "-i" + ], + "uname_call" : "uname" + } + } + }, + "name" : "@Author::KENTNL/MetaData::BuiltWith", + "version" : "1.001000" + }, + { + "class" : "Dist::Zilla::Plugin::Git::GatherDir", + "config" : { + "Dist::Zilla::Plugin::Git::GatherDir" : { + "include_untracked" : "0" + }, + "Dist::Zilla::Role::Git::Repo" : { + "repo_root" : "." + } + }, + "name" : "@Author::KENTNL/Git::GatherDir", + "version" : "2.023" + }, + { + "class" : "Dist::Zilla::Plugin::License", + "name" : "@Author::KENTNL/License", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::MetaJSON", + "name" : "@Author::KENTNL/MetaJSON", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::MetaYAML", + "name" : "@Author::KENTNL/MetaYAML", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::Manifest", + "name" : "@Author::KENTNL/Manifest", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::CopyFilesFromBuild", + "name" : "@Author::KENTNL/CopyXBuild", + "version" : "0.103510" + }, + { + "class" : "Dist::Zilla::Plugin::MetaTests", + "name" : "@Author::KENTNL/MetaTests", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::PodCoverageTests", + "name" : "@Author::KENTNL/PodCoverageTests", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::PodSyntaxTests", + "name" : "@Author::KENTNL/PodSyntaxTests", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", + "name" : "@Author::KENTNL/Test::ReportPrereqs", + "version" : "0.018" + }, + { + "class" : "Dist::Zilla::Plugin::Test::Kwalitee", + "name" : "@Author::KENTNL/Test::Kwalitee", + "version" : "2.07" + }, + { + "class" : "Dist::Zilla::Plugin::EOLTests", + "name" : "@Author::KENTNL/EOLTests", + "version" : "0.02" + }, + { + "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", + "name" : "@Author::KENTNL/Test::MinimumVersion", + "version" : "2.000005" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : "@Author::KENTNL/Test::Compile::PerFile/AUTOVIV/:InstallModulesPM", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::Test::Compile::PerFile", + "config" : { + "Dist::Zilla::Plugin::Test::Compile::PerFile" : { + "file" : [ + "lib/Acme/Time/Constant.pm" + ], + "path_translator" : "base64_filter", + "prefix" : "t/00-compile", + "skip" : [], + "test_template" : "01-basic.t.tpl", + "xt_mode" : null + } + }, + "name" : "@Author::KENTNL/Test::Compile::PerFile", + "version" : "0.002001" + }, + { + "class" : "Dist::Zilla::Plugin::Test::Perl::Critic", + "name" : "@Author::KENTNL/Test::Perl::Critic", + "version" : "2.112410" + }, + { + "class" : "Dist::Zilla::Plugin::ManifestSkip", + "name" : "@Author::KENTNL/ManifestSkip", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::RewriteVersion::Sanitized", + "config" : { + "Dist::Zilla::Role::Version::Sanitize" : { + "mantissa" : "6", + "normal_form" : "numify" + } + }, + "name" : "@Author::KENTNL/RewriteVersion::Sanitized", + "version" : "0.001001" + }, + { + "class" : "Dist::Zilla::Plugin::PodWeaver", + "config" : { + "Dist::Zilla::Plugin::PodWeaver" : { + "finder" : [ + ":InstallModules", + ":ExecFiles" + ], + "plugins" : [ + { + "class" : "Pod::Weaver::Plugin::EnsurePod5", + "name" : "@CorePrep/EnsurePod5", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Plugin::H1Nester", + "name" : "@CorePrep/H1Nester", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Plugin::SingleEncoding", + "name" : "-SingleEncoding", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Name", + "name" : "Name", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Version", + "name" : "Version", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Region", + "name" : "prelude", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Generic", + "name" : "SYNOPSIS", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Generic", + "name" : "DESCRIPTION", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Generic", + "name" : "OVERVIEW", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Collect", + "name" : "METHODS", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Collect", + "name" : "ATTRIBUTES", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Collect", + "name" : "PRIVATE_ATTRIBUTES", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Collect", + "name" : "PRIVATE_METHODS", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Leftovers", + "name" : "Leftovers", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Region", + "name" : "postlude", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Authors", + "name" : "Authors", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Legal", + "name" : "Legal", + "version" : "4.006" + } + ] + } + }, + "name" : "@Author::KENTNL/PodWeaver", + "version" : "4.005" + }, + { + "class" : "Dist::Zilla::Plugin::AutoPrereqs", + "name" : "@Author::KENTNL/AutoPrereqs", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::Prereqs", + "config" : { + "Dist::Zilla::Plugin::Prereqs" : { + "phase" : "develop", + "type" : "suggests" + } + }, + "name" : "@Author::KENTNL/BundleDevelSuggests", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::MinimumPerl", + "name" : "@Author::KENTNL/MinimumPerl", + "version" : "1.003" + }, + { + "class" : "Dist::Zilla::Plugin::Authority", + "name" : "@Author::KENTNL/Authority", + "version" : "1.006" + }, + { + "class" : "Dist::Zilla::Plugin::MakeMaker", + "config" : { + "Dist::Zilla::Role::TestRunner" : { + "default_jobs" : "10" + } + }, + "name" : "@Author::KENTNL/MakeMaker", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::ReadmeFromPod", + "name" : "@Author::KENTNL/ReadmeFromPod", + "version" : "0.21" + }, + { + "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", + "name" : "@Author::KENTNL/ReadmeAnyFromPod", + "version" : "0.141760" + }, + { + "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", + "name" : "@Author::KENTNL/Test::CPAN::Changes", + "version" : "0.008" + }, + { + "class" : "Dist::Zilla::Plugin::RunExtraTests", + "config" : { + "Dist::Zilla::Role::TestRunner" : { + "default_jobs" : "10" + } + }, + "name" : "@Author::KENTNL/RunExtraTests", + "version" : "0.022" + }, + { + "class" : "Dist::Zilla::Plugin::TestRelease", + "name" : "@Author::KENTNL/TestRelease", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::ConfirmRelease", + "name" : "@Author::KENTNL/ConfirmRelease", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Check", + "config" : { + "Dist::Zilla::Plugin::Git::Check" : { + "untracked_files" : "die" + }, + "Dist::Zilla::Role::Git::DirtyFiles" : { + "allow_dirty" : [ + "dist.ini", + "Changes" + ], + "allow_dirty_match" : [], + "changelog" : "Changes" + }, + "Dist::Zilla::Role::Git::Repo" : { + "repo_root" : "." + } + }, + "name" : "@Author::KENTNL/Git::Check", + "version" : "2.023" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Commit", + "config" : { + "Dist::Zilla::Plugin::Git::Commit" : { + "add_files_in" : [], + "commit_msg" : "v%v%n%n%c", + "time_zone" : "local" + }, + "Dist::Zilla::Role::Git::DirtyFiles" : { + "allow_dirty" : [ + "dist.ini", + "Changes" + ], + "allow_dirty_match" : [], + "changelog" : "Changes" + }, + "Dist::Zilla::Role::Git::Repo" : { + "repo_root" : "." + } + }, + "name" : "@Author::KENTNL/commit_dirty_files", + "version" : "2.023" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Tag", + "config" : { + "Dist::Zilla::Plugin::Git::Tag" : { + "branch" : null, + "signed" : 0, + "tag" : "0.001000-source", + "tag_format" : "%v-source", + "tag_message" : "v%v", + "time_zone" : "local" + }, + "Dist::Zilla::Role::Git::Repo" : { + "repo_root" : "." + } + }, + "name" : "@Author::KENTNL/tag_master", + "version" : "2.023" + }, + { + "class" : "Dist::Zilla::Plugin::Git::NextRelease", + "name" : "@Author::KENTNL/Git::NextRelease", + "version" : "0.002011" + }, + { + "class" : "Dist::Zilla::Plugin::BumpVersionAfterRelease", + "name" : "@Author::KENTNL/BumpVersionAfterRelease", + "version" : "0.002" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Commit", + "config" : { + "Dist::Zilla::Plugin::Git::Commit" : { + "add_files_in" : [], + "commit_msg" : "v%v%n%n%c", + "time_zone" : "local" + }, + "Dist::Zilla::Role::Git::DirtyFiles" : { + "allow_dirty" : [ + "dist.ini", + "Changes" + ], + "allow_dirty_match" : [ + "(?^u:^lib/)" + ], + "changelog" : "Changes" + }, + "Dist::Zilla::Role::Git::Repo" : { + "repo_root" : "." + } + }, + "name" : "@Author::KENTNL/commit_release_changes", + "version" : "2.023" + }, + { + "class" : "Dist::Zilla::Plugin::Git::CommitBuild", + "config" : { + "Dist::Zilla::Plugin::Git::CommitBuild" : { + "branch" : "build/%b", + "build_root" : null, + "message" : "Build results of %h (on %b)", + "multiple_inheritance" : 0, + "release_branch" : "releases", + "release_message" : "Build results of %h (on %b)" + }, + "Dist::Zilla::Role::Git::Repo" : { + "repo_root" : "." + } + }, + "name" : "@Author::KENTNL/Git::CommitBuild", + "version" : "2.023" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Tag", + "config" : { + "Dist::Zilla::Plugin::Git::Tag" : { + "branch" : "releases", + "signed" : 0, + "tag" : "0.001000", + "tag_format" : "%v", + "tag_message" : "v%v", + "time_zone" : "local" + }, + "Dist::Zilla::Role::Git::Repo" : { + "repo_root" : "." + } + }, + "name" : "@Author::KENTNL/tag_release", + "version" : "2.023" + }, + { + "class" : "Dist::Zilla::Plugin::UploadToCPAN", + "name" : "@Author::KENTNL/UploadToCPAN", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::Twitter", + "name" : "@Author::KENTNL/Twitter", + "version" : "0.025" + }, + { + "class" : "Dist::Zilla::Plugin::Prereqs::Recommend::MatchInstalled", + "config" : { + "Dist::Zilla::Plugin::Prereqs::Recommend::MatchInstalled" : { + "applyto_map" : [ + "build.requires = build.recommends", + "test.requires = test.recommends", + "runtime.requires = runtime.recommends", + "configure.requires = configure.recommends", + "develop.requires = develop.recommends" + ], + "applyto_phase" : [ + "build", + "test", + "runtime", + "configure", + "develop" + ], + "modules" : [ + "ExtUtils::MakeMaker", + "Test::More" + ] + } + }, + "name" : "@Author::KENTNL/Prereqs::Recommend::MatchInstalled", + "version" : "0.002000" + }, + { + "class" : "Dist::Zilla::Plugin::Prereqs::Recommend::MatchInstalled", + "config" : { + "Dist::Zilla::Plugin::Prereqs::Recommend::MatchInstalled" : { + "applyto_map" : [ + "develop.suggests = develop.suggests" + ], + "applyto_phase" : [ + "develop" + ], + "modules" : [ + "Dist::Zilla::PluginBundle::Author::KENTNL", + "Dist::Zilla::App::Command::bakeini" + ] + } + }, + "name" : "@Author::KENTNL/always_latest_develop_bundle", + "version" : "0.002000" + }, + { + "class" : "Dist::Zilla::Plugin::Prereqs", + "config" : { + "Dist::Zilla::Plugin::Prereqs" : { + "phase" : "develop", + "type" : "requires" + } + }, + "name" : "@Author::KENTNL/::Role::BundleDeps", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::Prereqs", + "config" : { + "Dist::Zilla::Plugin::Prereqs" : { + "phase" : "runtime", + "type" : "requires" + } + }, + "name" : "Prereqs", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":InstallModules", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":IncModules", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":TestFiles", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":ExecFiles", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":ShareFiles", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":MainModule", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":AllFiles", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":NoFiles", + "version" : "5.020" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : "@Author::KENTNL/MetaProvides::Package/AUTOVIV/:InstallModulesPM", + "version" : "5.020" + } + ], + "zilla" : { + "class" : "Dist::Zilla::Dist::Builder", + "config" : { + "is_trial" : "0" + }, + "version" : "5.020" + } + }, + "x_authority" : "cpan:KENTNL" +} diff --git a/META.yml b/META.yml new file mode 100644 index 0000000..01a5827 --- /dev/null +++ b/META.yml @@ -0,0 +1,575 @@ +--- +abstract: 'Run any code in constant time.' +author: + - 'Kent Fredric ' +build_requires: + ExtUtils::MakeMaker: '0' + File::Spec: '0' + Test::More: '0.89' +configure_requires: + ExtUtils::MakeMaker: '0' +dynamic_config: '0' +generated_by: 'Dist::Zilla version 5.020, CPAN::Meta::Converter version 2.142060' +license: perl +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: '1.4' +name: Acme-Time-Constant +provides: + Acme::Time::Constant: + file: lib/Acme/Time/Constant.pm + version: '0.001000' +requires: + Sub::Exporter::Progressive: '0' + Time::HiRes: '0' + Time::Warp: '0' + perl: '5.008' + strict: '0' + utf8: '0' + warnings: '0' +resources: + bugtracker: https://github.com/kentnl/Acme-Time-Constant/issues + homepage: https://github.com/kentnl/Acme-Time-Constant + repository: https://github.com/kentnl/Acme-Time-Constant.git +version: '0.001000' +x_BuiltWith: + modules: + CPAN::Meta: '2.142060' + Dist::Zilla::App::Command::bakeini: '0.001001' + Dist::Zilla::Plugin::Authority: '1.006' + Dist::Zilla::Plugin::AutoPrereqs: '5.020' + Dist::Zilla::Plugin::BumpVersionAfterRelease: '0.002' + Dist::Zilla::Plugin::ConfirmRelease: '5.020' + Dist::Zilla::Plugin::CopyFilesFromBuild: '0.103510' + Dist::Zilla::Plugin::EOLTests: '0.02' + Dist::Zilla::Plugin::Git::Check: '2.023' + Dist::Zilla::Plugin::Git::Commit: '2.023' + Dist::Zilla::Plugin::Git::CommitBuild: '2.023' + Dist::Zilla::Plugin::Git::GatherDir: '2.023' + Dist::Zilla::Plugin::Git::NextRelease: '0.002011' + Dist::Zilla::Plugin::Git::Tag: '2.023' + Dist::Zilla::Plugin::GithubMeta: '0.46' + Dist::Zilla::Plugin::License: '5.020' + Dist::Zilla::Plugin::MakeMaker: '5.020' + Dist::Zilla::Plugin::Manifest: '5.020' + Dist::Zilla::Plugin::ManifestSkip: '5.020' + Dist::Zilla::Plugin::MetaConfig: '5.020' + Dist::Zilla::Plugin::MetaData::BuiltWith: '1.001000' + Dist::Zilla::Plugin::MetaJSON: '5.020' + Dist::Zilla::Plugin::MetaProvides::Package: '2.000003' + Dist::Zilla::Plugin::MetaTests: '5.020' + Dist::Zilla::Plugin::MetaYAML: '5.020' + Dist::Zilla::Plugin::MinimumPerl: '1.003' + Dist::Zilla::Plugin::PodCoverageTests: '5.020' + Dist::Zilla::Plugin::PodSyntaxTests: '5.020' + Dist::Zilla::Plugin::PodWeaver: '4.005' + Dist::Zilla::Plugin::Prereqs: '5.020' + Dist::Zilla::Plugin::Prereqs::Recommend::MatchInstalled: '0.002000' + Dist::Zilla::Plugin::ReadmeAnyFromPod: '0.141760' + Dist::Zilla::Plugin::ReadmeFromPod: '0.21' + Dist::Zilla::Plugin::RewriteVersion::Sanitized: '0.001001' + Dist::Zilla::Plugin::RunExtraTests: '0.022' + Dist::Zilla::Plugin::Test::CPAN::Changes: '0.008' + Dist::Zilla::Plugin::Test::Compile::PerFile: '0.002001' + Dist::Zilla::Plugin::Test::Kwalitee: '2.07' + Dist::Zilla::Plugin::Test::MinimumVersion: '2.000005' + Dist::Zilla::Plugin::Test::Perl::Critic: '2.112410' + Dist::Zilla::Plugin::Test::ReportPrereqs: '0.018' + Dist::Zilla::Plugin::TestRelease: '5.020' + Dist::Zilla::Plugin::Twitter: '0.025' + Dist::Zilla::Plugin::UploadToCPAN: '5.020' + Dist::Zilla::PluginBundle::Author::KENTNL: '2.016007' + ExtUtils::MakeMaker: '6.98' + File::Spec: '3.48' + Pod::Coverage::TrustPod: '0.100003' + Sub::Exporter::Progressive: '0.001011' + Test::CPAN::Changes: '0.30' + Test::CPAN::Meta: '0.23' + Test::Kwalitee: '1.19' + Test::More: '1.001003' + Test::Pod: '1.48' + Test::Pod::Coverage: '1.10' + Time::HiRes: '1.9726' + Time::Warp: '0.5' + strict: '1.08' + utf8: '1.14' + warnings: '1.24' + perl: + original: v5.21.1 + qv: 1 + version: + - 5 + - 21 + - 1 + perl-config: + gccversion: 4.8.3 + myarchname: x86_64-linux + osname: linux + platform: linux + uname: 'Linux 3.15.5-aufs x86_64 GenuineIntel GNU/Linux' +x_Dist_Zilla: + perl: + version: '5.021001' + plugins: + - + class: Dist::Zilla::Plugin::MetaConfig + name: '@Author::KENTNL/MetaConfig' + version: '5.020' + - + class: Dist::Zilla::Plugin::GithubMeta + name: '@Author::KENTNL/GithubMeta' + version: '0.46' + - + class: Dist::Zilla::Plugin::MetaProvides::Package + config: + Dist::Zilla::Plugin::MetaProvides::Package: + finder_objects: + - + class: Dist::Zilla::Plugin::FinderCode + name: '@Author::KENTNL/MetaProvides::Package/AUTOVIV/:InstallModulesPM' + version: '5.020' + Dist::Zilla::Role::MetaProvider::Provider: + inherit_missing: '1' + inherit_version: '1' + meta_noindex: '1' + name: '@Author::KENTNL/MetaProvides::Package' + version: '2.000003' + - + class: Dist::Zilla::Plugin::MetaData::BuiltWith + config: + Dist::Zilla::Plugin::MetaData::BuiltWith: + _stash_key: x_BuiltWith + show_config: '1' + show_uname: '1' + uname: + uname_args: + - -s + - -o + - -r + - -m + - -i + uname_call: uname + name: '@Author::KENTNL/MetaData::BuiltWith' + version: '1.001000' + - + class: Dist::Zilla::Plugin::Git::GatherDir + config: + Dist::Zilla::Plugin::Git::GatherDir: + include_untracked: '0' + Dist::Zilla::Role::Git::Repo: + repo_root: . + name: '@Author::KENTNL/Git::GatherDir' + version: '2.023' + - + class: Dist::Zilla::Plugin::License + name: '@Author::KENTNL/License' + version: '5.020' + - + class: Dist::Zilla::Plugin::MetaJSON + name: '@Author::KENTNL/MetaJSON' + version: '5.020' + - + class: Dist::Zilla::Plugin::MetaYAML + name: '@Author::KENTNL/MetaYAML' + version: '5.020' + - + class: Dist::Zilla::Plugin::Manifest + name: '@Author::KENTNL/Manifest' + version: '5.020' + - + class: Dist::Zilla::Plugin::CopyFilesFromBuild + name: '@Author::KENTNL/CopyXBuild' + version: '0.103510' + - + class: Dist::Zilla::Plugin::MetaTests + name: '@Author::KENTNL/MetaTests' + version: '5.020' + - + class: Dist::Zilla::Plugin::PodCoverageTests + name: '@Author::KENTNL/PodCoverageTests' + version: '5.020' + - + class: Dist::Zilla::Plugin::PodSyntaxTests + name: '@Author::KENTNL/PodSyntaxTests' + version: '5.020' + - + class: Dist::Zilla::Plugin::Test::ReportPrereqs + name: '@Author::KENTNL/Test::ReportPrereqs' + version: '0.018' + - + class: Dist::Zilla::Plugin::Test::Kwalitee + name: '@Author::KENTNL/Test::Kwalitee' + version: '2.07' + - + class: Dist::Zilla::Plugin::EOLTests + name: '@Author::KENTNL/EOLTests' + version: '0.02' + - + class: Dist::Zilla::Plugin::Test::MinimumVersion + name: '@Author::KENTNL/Test::MinimumVersion' + version: '2.000005' + - + class: Dist::Zilla::Plugin::FinderCode + name: '@Author::KENTNL/Test::Compile::PerFile/AUTOVIV/:InstallModulesPM' + version: '5.020' + - + class: Dist::Zilla::Plugin::Test::Compile::PerFile + config: + Dist::Zilla::Plugin::Test::Compile::PerFile: + file: + - lib/Acme/Time/Constant.pm + path_translator: base64_filter + prefix: t/00-compile + skip: [] + test_template: 01-basic.t.tpl + xt_mode: ~ + name: '@Author::KENTNL/Test::Compile::PerFile' + version: '0.002001' + - + class: Dist::Zilla::Plugin::Test::Perl::Critic + name: '@Author::KENTNL/Test::Perl::Critic' + version: '2.112410' + - + class: Dist::Zilla::Plugin::ManifestSkip + name: '@Author::KENTNL/ManifestSkip' + version: '5.020' + - + class: Dist::Zilla::Plugin::RewriteVersion::Sanitized + config: + Dist::Zilla::Role::Version::Sanitize: + mantissa: '6' + normal_form: numify + name: '@Author::KENTNL/RewriteVersion::Sanitized' + version: '0.001001' + - + class: Dist::Zilla::Plugin::PodWeaver + config: + Dist::Zilla::Plugin::PodWeaver: + finder: + - ':InstallModules' + - ':ExecFiles' + plugins: + - + class: Pod::Weaver::Plugin::EnsurePod5 + name: '@CorePrep/EnsurePod5' + version: '4.006' + - + class: Pod::Weaver::Plugin::H1Nester + name: '@CorePrep/H1Nester' + version: '4.006' + - + class: Pod::Weaver::Plugin::SingleEncoding + name: -SingleEncoding + version: '4.006' + - + class: Pod::Weaver::Section::Name + name: Name + version: '4.006' + - + class: Pod::Weaver::Section::Version + name: Version + version: '4.006' + - + class: Pod::Weaver::Section::Region + name: prelude + version: '4.006' + - + class: Pod::Weaver::Section::Generic + name: SYNOPSIS + version: '4.006' + - + class: Pod::Weaver::Section::Generic + name: DESCRIPTION + version: '4.006' + - + class: Pod::Weaver::Section::Generic + name: OVERVIEW + version: '4.006' + - + class: Pod::Weaver::Section::Collect + name: METHODS + version: '4.006' + - + class: Pod::Weaver::Section::Collect + name: ATTRIBUTES + version: '4.006' + - + class: Pod::Weaver::Section::Collect + name: PRIVATE_ATTRIBUTES + version: '4.006' + - + class: Pod::Weaver::Section::Collect + name: PRIVATE_METHODS + version: '4.006' + - + class: Pod::Weaver::Section::Leftovers + name: Leftovers + version: '4.006' + - + class: Pod::Weaver::Section::Region + name: postlude + version: '4.006' + - + class: Pod::Weaver::Section::Authors + name: Authors + version: '4.006' + - + class: Pod::Weaver::Section::Legal + name: Legal + version: '4.006' + name: '@Author::KENTNL/PodWeaver' + version: '4.005' + - + class: Dist::Zilla::Plugin::AutoPrereqs + name: '@Author::KENTNL/AutoPrereqs' + version: '5.020' + - + class: Dist::Zilla::Plugin::Prereqs + config: + Dist::Zilla::Plugin::Prereqs: + phase: develop + type: suggests + name: '@Author::KENTNL/BundleDevelSuggests' + version: '5.020' + - + class: Dist::Zilla::Plugin::MinimumPerl + name: '@Author::KENTNL/MinimumPerl' + version: '1.003' + - + class: Dist::Zilla::Plugin::Authority + name: '@Author::KENTNL/Authority' + version: '1.006' + - + class: Dist::Zilla::Plugin::MakeMaker + config: + Dist::Zilla::Role::TestRunner: + default_jobs: '10' + name: '@Author::KENTNL/MakeMaker' + version: '5.020' + - + class: Dist::Zilla::Plugin::ReadmeFromPod + name: '@Author::KENTNL/ReadmeFromPod' + version: '0.21' + - + class: Dist::Zilla::Plugin::ReadmeAnyFromPod + name: '@Author::KENTNL/ReadmeAnyFromPod' + version: '0.141760' + - + class: Dist::Zilla::Plugin::Test::CPAN::Changes + name: '@Author::KENTNL/Test::CPAN::Changes' + version: '0.008' + - + class: Dist::Zilla::Plugin::RunExtraTests + config: + Dist::Zilla::Role::TestRunner: + default_jobs: '10' + name: '@Author::KENTNL/RunExtraTests' + version: '0.022' + - + class: Dist::Zilla::Plugin::TestRelease + name: '@Author::KENTNL/TestRelease' + version: '5.020' + - + class: Dist::Zilla::Plugin::ConfirmRelease + name: '@Author::KENTNL/ConfirmRelease' + version: '5.020' + - + class: Dist::Zilla::Plugin::Git::Check + config: + Dist::Zilla::Plugin::Git::Check: + untracked_files: die + Dist::Zilla::Role::Git::DirtyFiles: + allow_dirty: + - dist.ini + - Changes + allow_dirty_match: [] + changelog: Changes + Dist::Zilla::Role::Git::Repo: + repo_root: . + name: '@Author::KENTNL/Git::Check' + version: '2.023' + - + class: Dist::Zilla::Plugin::Git::Commit + config: + Dist::Zilla::Plugin::Git::Commit: + add_files_in: [] + commit_msg: v%v%n%n%c + time_zone: local + Dist::Zilla::Role::Git::DirtyFiles: + allow_dirty: + - dist.ini + - Changes + allow_dirty_match: [] + changelog: Changes + Dist::Zilla::Role::Git::Repo: + repo_root: . + name: '@Author::KENTNL/commit_dirty_files' + version: '2.023' + - + class: Dist::Zilla::Plugin::Git::Tag + config: + Dist::Zilla::Plugin::Git::Tag: + branch: ~ + signed: '0' + tag: 0.001000-source + tag_format: '%v-source' + tag_message: v%v + time_zone: local + Dist::Zilla::Role::Git::Repo: + repo_root: . + name: '@Author::KENTNL/tag_master' + version: '2.023' + - + class: Dist::Zilla::Plugin::Git::NextRelease + name: '@Author::KENTNL/Git::NextRelease' + version: '0.002011' + - + class: Dist::Zilla::Plugin::BumpVersionAfterRelease + name: '@Author::KENTNL/BumpVersionAfterRelease' + version: '0.002' + - + class: Dist::Zilla::Plugin::Git::Commit + config: + Dist::Zilla::Plugin::Git::Commit: + add_files_in: [] + commit_msg: v%v%n%n%c + time_zone: local + Dist::Zilla::Role::Git::DirtyFiles: + allow_dirty: + - dist.ini + - Changes + allow_dirty_match: + - (?^u:^lib/) + changelog: Changes + Dist::Zilla::Role::Git::Repo: + repo_root: . + name: '@Author::KENTNL/commit_release_changes' + version: '2.023' + - + class: Dist::Zilla::Plugin::Git::CommitBuild + config: + Dist::Zilla::Plugin::Git::CommitBuild: + branch: build/%b + build_root: ~ + message: 'Build results of %h (on %b)' + multiple_inheritance: '0' + release_branch: releases + release_message: 'Build results of %h (on %b)' + Dist::Zilla::Role::Git::Repo: + repo_root: . + name: '@Author::KENTNL/Git::CommitBuild' + version: '2.023' + - + class: Dist::Zilla::Plugin::Git::Tag + config: + Dist::Zilla::Plugin::Git::Tag: + branch: releases + signed: '0' + tag: '0.001000' + tag_format: '%v' + tag_message: v%v + time_zone: local + Dist::Zilla::Role::Git::Repo: + repo_root: . + name: '@Author::KENTNL/tag_release' + version: '2.023' + - + class: Dist::Zilla::Plugin::UploadToCPAN + name: '@Author::KENTNL/UploadToCPAN' + version: '5.020' + - + class: Dist::Zilla::Plugin::Twitter + name: '@Author::KENTNL/Twitter' + version: '0.025' + - + class: Dist::Zilla::Plugin::Prereqs::Recommend::MatchInstalled + config: + Dist::Zilla::Plugin::Prereqs::Recommend::MatchInstalled: + applyto_map: + - 'build.requires = build.recommends' + - 'test.requires = test.recommends' + - 'runtime.requires = runtime.recommends' + - 'configure.requires = configure.recommends' + - 'develop.requires = develop.recommends' + applyto_phase: + - build + - test + - runtime + - configure + - develop + modules: + - ExtUtils::MakeMaker + - Test::More + name: '@Author::KENTNL/Prereqs::Recommend::MatchInstalled' + version: '0.002000' + - + class: Dist::Zilla::Plugin::Prereqs::Recommend::MatchInstalled + config: + Dist::Zilla::Plugin::Prereqs::Recommend::MatchInstalled: + applyto_map: + - 'develop.suggests = develop.suggests' + applyto_phase: + - develop + modules: + - Dist::Zilla::PluginBundle::Author::KENTNL + - Dist::Zilla::App::Command::bakeini + name: '@Author::KENTNL/always_latest_develop_bundle' + version: '0.002000' + - + class: Dist::Zilla::Plugin::Prereqs + config: + Dist::Zilla::Plugin::Prereqs: + phase: develop + type: requires + name: '@Author::KENTNL/::Role::BundleDeps' + version: '5.020' + - + class: Dist::Zilla::Plugin::Prereqs + config: + Dist::Zilla::Plugin::Prereqs: + phase: runtime + type: requires + name: Prereqs + version: '5.020' + - + class: Dist::Zilla::Plugin::FinderCode + name: ':InstallModules' + version: '5.020' + - + class: Dist::Zilla::Plugin::FinderCode + name: ':IncModules' + version: '5.020' + - + class: Dist::Zilla::Plugin::FinderCode + name: ':TestFiles' + version: '5.020' + - + class: Dist::Zilla::Plugin::FinderCode + name: ':ExecFiles' + version: '5.020' + - + class: Dist::Zilla::Plugin::FinderCode + name: ':ShareFiles' + version: '5.020' + - + class: Dist::Zilla::Plugin::FinderCode + name: ':MainModule' + version: '5.020' + - + class: Dist::Zilla::Plugin::FinderCode + name: ':AllFiles' + version: '5.020' + - + class: Dist::Zilla::Plugin::FinderCode + name: ':NoFiles' + version: '5.020' + - + class: Dist::Zilla::Plugin::FinderCode + name: '@Author::KENTNL/MetaProvides::Package/AUTOVIV/:InstallModulesPM' + version: '5.020' + zilla: + class: Dist::Zilla::Dist::Builder + config: + is_trial: '0' + version: '5.020' +x_authority: cpan:KENTNL diff --git a/Makefile.PL b/Makefile.PL new file mode 100644 index 0000000..4eb1a31 --- /dev/null +++ b/Makefile.PL @@ -0,0 +1,67 @@ + +# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.020. +use strict; +use warnings; + +use 5.008; + +use ExtUtils::MakeMaker ; + + + +my %WriteMakefileArgs = ( + "ABSTRACT" => "Run any code in constant time.", + "AUTHOR" => "Kent Fredric ", + "CONFIGURE_REQUIRES" => { + "ExtUtils::MakeMaker" => 0 + }, + "DISTNAME" => "Acme-Time-Constant", + "EXE_FILES" => [], + "LICENSE" => "perl", + "NAME" => "Acme::Time::Constant", + "PREREQ_PM" => { + "Sub::Exporter::Progressive" => 0, + "Time::HiRes" => 0, + "Time::Warp" => 0, + "strict" => 0, + "utf8" => 0, + "warnings" => 0 + }, + "TEST_REQUIRES" => { + "ExtUtils::MakeMaker" => 0, + "File::Spec" => 0, + "Test::More" => "0.89" + }, + "VERSION" => "0.001000", + "test" => { + "TESTS" => "t/*.t t/00-compile/*.t" + } +); + + +my %FallbackPrereqs = ( + "ExtUtils::MakeMaker" => 0, + "File::Spec" => 0, + "Sub::Exporter::Progressive" => 0, + "Test::More" => "0.89", + "Time::HiRes" => 0, + "Time::Warp" => 0, + "strict" => 0, + "utf8" => 0, + "warnings" => 0 +); + + +unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { + delete $WriteMakefileArgs{TEST_REQUIRES}; + delete $WriteMakefileArgs{BUILD_REQUIRES}; + $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; +} + +delete $WriteMakefileArgs{CONFIGURE_REQUIRES} + unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; + +WriteMakefile(%WriteMakefileArgs); + + + diff --git a/README b/README new file mode 100644 index 0000000..4e4ebff --- /dev/null +++ b/README @@ -0,0 +1,69 @@ +NAME + Acme::Time::Constant - Run any code in constant time. + +VERSION + version 0.001000 + +SYNOPSIS + This code contains within it, the golden calf of computer science: The + ability to execute any code in constant time. + + use Acme::Time::Constant qw( constant_time ); + + my $timestamp = time; + + constant_time( '1' => sub { + for ( 0 .. 10 ) { } + } ); + + print $timestamp - time; # 1 second + + constant_time( '1' => sub { + for ( 0 .. 10_000_000 ) { } + } ); + + print $timestamp - time; # 2 seconds + +BUGS + General relativity does not hold in the context of this code. + As such, observed time may differ greatly from the time relative to the + execution of this code. + + Workaround: Get closer to the speed of light. + + Measurements may not be exactly constant. + But Big O is OK with this. We care not that X takes 1.1 seconds and Y + takes 1.2 seconds, as long as the variation is not subject to the size + of Y or X. + + Random variation between 0.5 and 1.5 seconds is thus within the range of + "constant". + + Workaround: Imbibe a minimum of 1 Litre + of your favourite neurotoxic + substance before attempting to code. + + Time::HiRes cannot be trusted. + "Time::HiRes" is under the influence of the Illuminati and as such is + part of a conspiracy to prevent us from experiencing supernormal time. + + Using "Time::HiRes" in your code will subsequently give the illusion + that the code no longer executes in constant time. + + It is wrong. The constant time is simply functioning on an alternative + timeline which the Illuminati seek to repress knowledge of. + + One may note that this module depends on "Time::HiRes", but this is + simply our devilish tactic to make the conspirators think we're + willingly playing for them. You know better. ;) + +AUTHOR + Kent Fredric + +COPYRIGHT AND LICENSE + This software is copyright (c) 2014 by Kent Fredric + . + + This is free software; you can redistribute it and/or modify it under + the same terms as the Perl 5 programming language system itself. + diff --git a/dist.ini b/dist.ini new file mode 100644 index 0000000..63728a5 --- /dev/null +++ b/dist.ini @@ -0,0 +1,189 @@ +; This file is generated from dist.ini.meta by dzil bakeini. +; Edit that file or the bundles contained within for long-term changes. +name = Acme-Time-Constant +author = Kent Fredric +license = Perl_5 +copyright_holder = Kent Fredric + +[MetaConfig / @Author::KENTNL/MetaConfig] + +[GithubMeta / @Author::KENTNL/GithubMeta] +issues = 1 + +[MetaProvides::Package / @Author::KENTNL/MetaProvides::Package] +:version = 1.14000001 + +[MetaData::BuiltWith / @Author::KENTNL/MetaData::BuiltWith] +show_config = 1 +show_uname = 1 +uname_args = -s -o -r -m -i + +[Git::GatherDir / @Author::KENTNL/Git::GatherDir] +exclude_filename = README +exclude_filename = README.mkdn +exclude_filename = README.pod +exclude_filename = LICENSE +include_dotfiles = 1 + +[License / @Author::KENTNL/License] + +[MetaJSON / @Author::KENTNL/MetaJSON] + +[MetaYAML / @Author::KENTNL/MetaYAML] + +[Manifest / @Author::KENTNL/Manifest] + +[CopyFilesFromBuild / @Author::KENTNL/CopyXBuild] +copy = LICENSE + +[MetaTests / @Author::KENTNL/MetaTests] + +[PodCoverageTests / @Author::KENTNL/PodCoverageTests] + +[PodSyntaxTests / @Author::KENTNL/PodSyntaxTests] + +[Test::ReportPrereqs / @Author::KENTNL/Test::ReportPrereqs] + +[Test::Kwalitee / @Author::KENTNL/Test::Kwalitee] + +[EOLTests / @Author::KENTNL/EOLTests] +trailing_whitespace = 1 + +[Test::MinimumVersion / @Author::KENTNL/Test::MinimumVersion] + +[Test::Compile::PerFile / @Author::KENTNL/Test::Compile::PerFile] + +[Test::Perl::Critic / @Author::KENTNL/Test::Perl::Critic] + +[ManifestSkip / @Author::KENTNL/ManifestSkip] + +[RewriteVersion::Sanitized / @Author::KENTNL/RewriteVersion::Sanitized] +mantissa = 6 +normal_form = numify + +[PodWeaver / @Author::KENTNL/PodWeaver] +replacer = replace_with_blank + +[AutoPrereqs / @Author::KENTNL/AutoPrereqs] + +[Prereqs / @Author::KENTNL/BundleDevelSuggests] +-phase = develop +-type = suggests +Dist::Zilla::App::Command::bakeini = 0.001000 +Dist::Zilla::PluginBundle::Author::KENTNL = 2.016007 + +[MinimumPerl / @Author::KENTNL/MinimumPerl] + +[Authority / @Author::KENTNL/Authority] +:version = 1.006 +authority = cpan:KENTNL +do_metadata = 1 +locate_comment = 1 + +[MakeMaker / @Author::KENTNL/MakeMaker] +default_jobs = 10 + +[ReadmeFromPod / @Author::KENTNL/ReadmeFromPod] + +[ReadmeAnyFromPod / @Author::KENTNL/ReadmeAnyFromPod] +filename = README.mkdn +location = root +type = markdown + +[Test::CPAN::Changes / @Author::KENTNL/Test::CPAN::Changes] + +[RunExtraTests / @Author::KENTNL/RunExtraTests] +default_jobs = 10 + +[TestRelease / @Author::KENTNL/TestRelease] + +[ConfirmRelease / @Author::KENTNL/ConfirmRelease] + +[Git::Check / @Author::KENTNL/Git::Check] +filename = Changes + +[Git::Commit / @Author::KENTNL/commit_dirty_files] + +[Git::Tag / @Author::KENTNL/tag_master] +tag_format = %v-source + +[Git::NextRelease / @Author::KENTNL/Git::NextRelease] +format = %v %{yyyy-MM-dd'T'HH:mm:ss}dZ +time_zone = UTC + +[BumpVersionAfterRelease / @Author::KENTNL/BumpVersionAfterRelease] + +[Git::Commit / @Author::KENTNL/commit_release_changes] +allow_dirty_match = ^lib/ + +[Git::CommitBuild / @Author::KENTNL/Git::CommitBuild] +release_branch = releases + +[Git::Tag / @Author::KENTNL/tag_release] +branch = releases +tag_format = %v + +[UploadToCPAN / @Author::KENTNL/UploadToCPAN] + +[Twitter / @Author::KENTNL/Twitter] +hash_tags = #perl #cpan +tweet_url = https://metacpan.org/release/{{$AUTHOR_UC}}/{{$DIST}}-{{$VERSION}}{{$TRIAL}}#whatsnew +url_shortener = none + +[Prereqs::Recommend::MatchInstalled / @Author::KENTNL/Prereqs::Recommend::MatchInstalled] +modules = ExtUtils::MakeMaker +modules = Test::More + +[Prereqs::Recommend::MatchInstalled / @Author::KENTNL/always_latest_develop_bundle] +applyto_map = develop.suggests = develop.suggests +applyto_phase = develop +modules = Dist::Zilla::PluginBundle::Author::KENTNL +modules = Dist::Zilla::App::Command::bakeini + +[Prereqs / @Author::KENTNL/::Role::BundleDeps] +-phase = develop +-relationship = requires +Dist::Zilla::Plugin::Authority = 1.006 +Dist::Zilla::Plugin::AutoPrereqs = 0 +Dist::Zilla::Plugin::BumpVersionAfterRelease = 0 +Dist::Zilla::Plugin::ConfirmRelease = 0 +Dist::Zilla::Plugin::CopyFilesFromBuild = 0 +Dist::Zilla::Plugin::EOLTests = 0 +Dist::Zilla::Plugin::Git::Check = 0 +Dist::Zilla::Plugin::Git::Commit = 0 +Dist::Zilla::Plugin::Git::CommitBuild = 0 +Dist::Zilla::Plugin::Git::GatherDir = 0 +Dist::Zilla::Plugin::Git::NextRelease = 0 +Dist::Zilla::Plugin::Git::Tag = 0 +Dist::Zilla::Plugin::GithubMeta = 0 +Dist::Zilla::Plugin::License = 0 +Dist::Zilla::Plugin::MakeMaker = 0 +Dist::Zilla::Plugin::Manifest = 0 +Dist::Zilla::Plugin::ManifestSkip = 0 +Dist::Zilla::Plugin::MetaConfig = 0 +Dist::Zilla::Plugin::MetaData::BuiltWith = 0 +Dist::Zilla::Plugin::MetaJSON = 0 +Dist::Zilla::Plugin::MetaProvides::Package = 1.14000001 +Dist::Zilla::Plugin::MetaTests = 0 +Dist::Zilla::Plugin::MetaYAML = 0 +Dist::Zilla::Plugin::MinimumPerl = 0 +Dist::Zilla::Plugin::PodCoverageTests = 0 +Dist::Zilla::Plugin::PodSyntaxTests = 0 +Dist::Zilla::Plugin::PodWeaver = 0 +Dist::Zilla::Plugin::Prereqs = 0 +Dist::Zilla::Plugin::Prereqs::Recommend::MatchInstalled = 0 +Dist::Zilla::Plugin::ReadmeAnyFromPod = 0 +Dist::Zilla::Plugin::ReadmeFromPod = 0 +Dist::Zilla::Plugin::RewriteVersion::Sanitized = 0 +Dist::Zilla::Plugin::RunExtraTests = 0 +Dist::Zilla::Plugin::Test::CPAN::Changes = 0 +Dist::Zilla::Plugin::Test::Compile::PerFile = 0 +Dist::Zilla::Plugin::Test::Kwalitee = 0 +Dist::Zilla::Plugin::Test::MinimumVersion = 0 +Dist::Zilla::Plugin::Test::Perl::Critic = 0 +Dist::Zilla::Plugin::Test::ReportPrereqs = 0 +Dist::Zilla::Plugin::TestRelease = 0 +Dist::Zilla::Plugin::Twitter = 0 +Dist::Zilla::Plugin::UploadToCPAN = 0 + +[Prereqs] diff --git a/dist.ini.meta b/dist.ini.meta new file mode 100644 index 0000000..1836b5c --- /dev/null +++ b/dist.ini.meta @@ -0,0 +1,23 @@ +; Generated by Dist::Zilla::Plugin::Author::KENTNL::DistINI version 2.016007 at Mon Aug 4 15:27:02 2014 +name = Acme-Time-Constant +author = Kent Fredric +license = Perl_5 +copyright_holder = Kent Fredric + +; Uncomment this to bootstrap via self +; [Bootstrap::lib] + +[@Author::KENTNL] +:version = 2.016007 +git_versions = 1 +normal_form = numify +mantissa = 6 +toolkit = eumm +toolkit_hardness = soft +bumpversions = 1 +copyfiles = LICENSE +srcreadme = mkdn +twitter_hash_tags = #perl #cpan +; auto_prereqs_skip = File::Find + +[Prereqs] diff --git a/lib/Acme/Time/Constant.pm b/lib/Acme/Time/Constant.pm new file mode 100644 index 0000000..c0de513 --- /dev/null +++ b/lib/Acme/Time/Constant.pm @@ -0,0 +1,184 @@ +use 5.008; # utf8 +use strict; +use warnings; +use utf8; + +package Acme::Time::Constant; + +our $VERSION = '0.001000'; + +# ABSTRACT: Run any code in constant time. + +our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY + +use Sub::Exporter::Progressive -setup => { exports => [qw( constant_time )] }; + + + + + + + + + + + + + + + + + + + + + + + +use Time::HiRes qw( gettimeofday ); +use Time::Warp qw( to time ); + +my $old_import; +BEGIN { $old_import = \&import } + +{ + ## no critic (TestingAndDebugging::ProhibitNoWarnings) + no warnings 'redefine'; + + sub import { + *CORE::GLOBAL::time = *Time::Warp::time; + goto $old_import; + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +sub constant_time { + my $nargs = ( my ( $time, $callback ) = @_ ); + + if ( $nargs < 2 ) { + $callback = $time; + $time = 1; + } + my $now = time; + $callback->(); + to( $now + $time ); + return; +} + +1; + +__END__ + +=pod + +=encoding UTF-8 + +=head1 NAME + +Acme::Time::Constant - Run any code in constant time. + +=head1 VERSION + +version 0.001000 + +=head1 SYNOPSIS + +This code contains within it, the golden calf of computer science: The ability to execute any code in constant time. + + use Acme::Time::Constant qw( constant_time ); + + my $timestamp = time; + + constant_time( '1' => sub { + for ( 0 .. 10 ) { } + } ); + + print $timestamp - time; # 1 second + + constant_time( '1' => sub { + for ( 0 .. 10_000_000 ) { } + } ); + + print $timestamp - time; # 2 seconds + +=head1 BUGS + +=head4 General relativity does not hold in the context of this code. + +As such, observed time may differ greatly from the time relative to the execution of this code. + +B Get closer to the speed of light. + +=head4 Measurements may not be exactly constant. + +But Big O is OK with this. We care not that X takes 1.1 seconds and Y takes 1.2 seconds, as long as the variation +is not subject to the size of Y or X. + +Random variation between 0.5 and 1.5 seconds is thus within the range of "constant". + +B Imbibe a minimum of 1 L<< Litre|https://en.wikipedia.org/wiki/Litre >> of your favourite neurotoxic substance +before attempting to code. + +=head4 Time::HiRes cannot be trusted. + +C is under the influence of the Illuminati and as such is part of a conspiracy to prevent us from experiencing +supernormal time. + +Using C in your code will subsequently give the illusion that the code no longer executes in constant time. + +It is wrong. The constant time is simply functioning on an alternative timeline which the Illuminati seek to repress +knowledge of. + +One may note that this module depends on C, but this is simply our devilish tactic to make the conspirators +think we're willingly playing for them. You know better. ;) + +=for Pod::Coverage constant_time + +=head1 AUTHOR + +Kent Fredric + +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2014 by Kent Fredric . + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. + +=cut diff --git a/maint/perlcritic.rc.gen.pl b/maint/perlcritic.rc.gen.pl new file mode 100644 index 0000000..f3da23b --- /dev/null +++ b/maint/perlcritic.rc.gen.pl @@ -0,0 +1,62 @@ +#!/usr/bin/env perl +## no critic (Modules::RequireVersionVar) + +# ABSTRACT: Write an INI file from a bundle + +use 5.008; # utf8 +use strict; +use warnings; +use utf8; + +our $VERSION = 0.001; + +use Carp qw( croak carp ); +use Perl::Critic::ProfileCompiler::Util qw( create_bundle ); +use Path::Tiny qw(path); + +## no critic (ErrorHandling::RequireUseOfExceptions) +my $bundle = create_bundle('Example::Author::KENTNL'); +$bundle->configure; + +my @stopwords = ( + qw( + neurotoxic supernormal timeline + ) +); +for my $wordlist (@stopwords) { + $bundle->add_or_append_policy_field( 'Documentation::PodSpelling' => ( 'stop_words' => $wordlist ) ); +} +$bundle->add_or_replace_policy_field( 'Documentation::PodSpelling' => ( 'spell_command' => 'aspell list --lang en_GB' ) ); + +#$bundle->add_or_append_policy_field( +# 'Subroutines::ProhibitCallsToUndeclaredSubs' => ( 'exempt_subs' => 'String::Formatter::str_rf' ), ); + +$bundle->remove_policy('ErrorHandling::RequireUseOfExceptions'); + +#$bundle->remove_policy('CodeLayout::RequireUseUTF8'); + +#$bundle->remove_policy('ErrorHandling::RequireCarping'); +#$bundle->remove_policy('NamingConventions::Capitalization'); + +my $inf = $bundle->actionlist->get_inflated; + +my $config = $inf->apply_config; + +{ + my $rcfile = path('./perlcritic.rc')->openw_utf8; + $rcfile->print( $config->as_ini, "\n" ); + close $rcfile or croak 'Something fubared closing perlcritic.rc'; +} +my $deps = $inf->own_deps; +{ + my $target = path('./misc'); + $target->mkpath if not $target->is_dir; + + my $depsfile = $target->child('perlcritic.deps')->openw_utf8; + for my $key ( sort keys %{$deps} ) { + $depsfile->printf( "%s~%s\n", $key, $deps->{$key} ); + *STDERR->printf( "%s => %s\n", $key, $deps->{$key} ); + } + close $depsfile or carp 'Something fubared closing perlcritic.deps'; +} + diff --git a/misc/perlcritic.deps b/misc/perlcritic.deps new file mode 100644 index 0000000..7152ec0 --- /dev/null +++ b/misc/perlcritic.deps @@ -0,0 +1,15 @@ +Perl::Critic::Policy::Documentation::PodSpelling~0 +Perl::Critic::Policy::Lax::RequireExplicitPackage::ExceptForPragmata~0 +Perl::Critic::Policy::Variables::ProhibitUnusedVarsStricter~0 +Perl::Critic::ProfileCompiler::Bundle::Bangs~0 +Perl::Critic::ProfileCompiler::Bundle::Compatibility~0 +Perl::Critic::ProfileCompiler::Bundle::Core~0 +Perl::Critic::ProfileCompiler::Bundle::Deprecated~0 +Perl::Critic::ProfileCompiler::Bundle::Itch~0 +Perl::Critic::ProfileCompiler::Bundle::Lax~0 +Perl::Critic::ProfileCompiler::Bundle::Moose~0 +Perl::Critic::ProfileCompiler::Bundle::More~0 +Perl::Critic::ProfileCompiler::Bundle::Pulp~0 +Perl::Critic::ProfileCompiler::Bundle::StricterSubs~0 +Perl::Critic::ProfileCompiler::Bundle::Swift~0 +Perl::Critic::ProfileCompiler::Bundle::Tics~0 diff --git a/perlcritic.rc b/perlcritic.rc new file mode 100644 index 0000000..c91285a --- /dev/null +++ b/perlcritic.rc @@ -0,0 +1,456 @@ +color = 1 +color-severity-low = green +color-severity-medium = yellow +only = 1 +severity = 1 +verbose = 9 + +[Bangs::ProhibitBitwiseOperators] + +[Bangs::ProhibitCommentedOutCode] + +[Bangs::ProhibitDebuggingModules] + +[-Bangs::ProhibitFlagComments] + +[Bangs::ProhibitNoPlan] + +[Bangs::ProhibitNumberedNames] + +[Bangs::ProhibitRefProtoOrProto] + +[Bangs::ProhibitUselessRegexModifiers] + +[Bangs::ProhibitVagueNames] + +[BuiltinFunctions::ProhibitBooleanGrep] + +[BuiltinFunctions::ProhibitComplexMappings] + +[BuiltinFunctions::ProhibitLvalueSubstr] + +[BuiltinFunctions::ProhibitReverseSortBlock] + +[BuiltinFunctions::ProhibitSleepViaSelect] + +[BuiltinFunctions::ProhibitStringyEval] +allow_includes = 1 + +[BuiltinFunctions::ProhibitStringySplit] + +[BuiltinFunctions::ProhibitUniversalCan] + +[BuiltinFunctions::ProhibitUniversalIsa] + +[BuiltinFunctions::ProhibitVoidGrep] + +[BuiltinFunctions::ProhibitVoidMap] + +[BuiltinFunctions::RequireBlockGrep] + +[BuiltinFunctions::RequireBlockMap] + +[BuiltinFunctions::RequireGlobFunction] + +[BuiltinFunctions::RequireSimpleSortBlock] + +[ClassHierarchies::ProhibitAutoloading] + +[ClassHierarchies::ProhibitExplicitISA] + +[ClassHierarchies::ProhibitOneArgBless] + +[CodeLayout::ProhibitFatCommaNewline] + +[CodeLayout::ProhibitHardTabs] + +[-CodeLayout::ProhibitHashBarewords] + +[CodeLayout::ProhibitIfIfSameLine] + +[CodeLayout::ProhibitParensWithBuiltins] + +[CodeLayout::ProhibitQuotedWordLists] + +[CodeLayout::ProhibitTrailingWhitespace] + +[-CodeLayout::RequireASCII] + +[CodeLayout::RequireConsistentNewlines] + +[CodeLayout::RequireFinalSemicolon] + +[-CodeLayout::RequireTidyCode] + +[CodeLayout::RequireTrailingCommaAtNewline] + +[CodeLayout::RequireTrailingCommas] + +[CodeLayout::RequireUseUTF8] + +[Compatibility::ConstantLeadingUnderscore] + +[Compatibility::ConstantPragmaHash] + +[Compatibility::Gtk2Constants] + +[Compatibility::PerlMinimumVersionAndWhy] + +[-Compatibility::PodMinimumVersion] + +[Compatibility::ProhibitThreeArgumentOpen] + +[Compatibility::ProhibitUnixDevNull] + +[ControlStructures::ProhibitCStyleForLoops] + +[ControlStructures::ProhibitCascadingIfElse] + +[ControlStructures::ProhibitDeepNests] + +[ControlStructures::ProhibitLabelsWithSpecialBlockNames] + +[ControlStructures::ProhibitMutatingListFunctions] + +[ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions] + +[-ControlStructures::ProhibitPostfixControls] + +[ControlStructures::ProhibitUnlessBlocks] + +[ControlStructures::ProhibitUnreachableCode] + +[ControlStructures::ProhibitUntilBlocks] + +[Documentation::PodSpelling] +spell_command = aspell list --lang en_GB +stop_words = neurotoxic supernormal timeline + +[Documentation::ProhibitAdjacentLinks] + +[Documentation::ProhibitBadAproposMarkup] + +[Documentation::ProhibitDuplicateHeadings] + +[Documentation::ProhibitDuplicateSeeAlso] + +[Documentation::ProhibitLinkToSelf] + +[Documentation::ProhibitParagraphEndComma] + +[Documentation::ProhibitParagraphTwoDots] + +[Documentation::ProhibitUnbalancedParens] + +[Documentation::ProhibitVerbatimMarkup] + +[Documentation::RequireEndBeforeLastPod] + +[Documentation::RequireFinalCut] + +[Documentation::RequireLinkedURLs] + +[-Documentation::RequirePODUseEncodingUTF8] + +[Documentation::RequirePackageMatchesPodName] + +[Documentation::RequirePodAtEnd] + +[Documentation::RequirePodLinksIncludeText] + +[-Documentation::RequirePodSections] + +[-Editor::RequireEmacsFileVariables] + +[ErrorHandling::RequireCarping] + +[ErrorHandling::RequireCheckingReturnValueOfEval] + +[-ErrorHandling::RequireUseOfExceptions] + +[InputOutput::ProhibitBacktickOperators] + +[InputOutput::ProhibitBarewordFileHandles] + +[InputOutput::ProhibitExplicitStdin] + +[InputOutput::ProhibitInteractiveTest] + +[InputOutput::ProhibitJoinedReadline] + +[InputOutput::ProhibitOneArgSelect] + +[InputOutput::ProhibitReadlineInForLoop] + +[InputOutput::ProhibitTwoArgOpen] + +[InputOutput::RequireBracedFileHandleWithPrint] + +[InputOutput::RequireBriefOpen] + +[InputOutput::RequireCheckedClose] + +[InputOutput::RequireCheckedOpen] + +[InputOutput::RequireCheckedSyscalls] + +[InputOutput::RequireEncodingWithUTF8Layer] + +[Lax::ProhibitComplexMappings::LinesNotStatements] + +[Lax::ProhibitEmptyQuotes::ExceptAsFallback] + +[Lax::ProhibitLeadingZeros::ExceptChmod] + +[Lax::ProhibitStringyEval::ExceptForRequire] + +[Lax::RequireEndWithTrueConst] + +[Lax::RequireExplicitPackage::ExceptForPragmata] +allowed_pragmata = diagnostics feature perlversion strict warnings utf8 + +[Miscellanea::ProhibitFormats] + +[Miscellanea::ProhibitTies] + +[Miscellanea::ProhibitUnrestrictedNoCritic] + +[-Miscellanea::ProhibitUselessNoCritic] + +[-Miscellanea::RequireRcsKeywords] + +[Miscellanea::TextDomainPlaceholders] + +[Miscellanea::TextDomainUnused] + +[Modules::PerlMinimumVersion] + +[Modules::ProhibitAutomaticExportation] + +[Modules::ProhibitConditionalUseStatements] + +[Modules::ProhibitEvilModules] + +[Modules::ProhibitExcessMainComplexity] + +[Modules::ProhibitModuleShebang] + +[Modules::ProhibitMultiplePackages] + +[Modules::ProhibitPOSIXimport] + +[Modules::ProhibitUseQuotedVersion] + +[Modules::RequireBarewordIncludes] + +[Modules::RequireEndWithOne] + +[-Modules::RequireExplicitInclusion] + +[-Modules::RequireExplicitPackage] + +[Modules::RequireFilenameMatchesPackage] + +[Modules::RequireNoMatchVarsWithUseEnglish] + +[Modules::RequirePerlVersion] + +[Modules::RequireVersionVar] + +[-Moose::ProhibitMultipleWiths] + +[Moose::ProhibitNewMethod] + +[Moose::RequireCleanNamespace] + +[Moose::RequireMakeImmutable] + +[NamingConventions::Capitalization] + +[NamingConventions::ProhibitAmbiguousNames] + +[NamingConventions::ProhibitMixedCaseSubs] + +[NamingConventions::ProhibitMixedCaseVars] + +[Objects::ProhibitIndirectSyntax] + +[References::ProhibitDoubleSigils] + +[RegularExpressions::ProhibitCaptureWithoutTest] + +[RegularExpressions::ProhibitComplexRegexes] + +[RegularExpressions::ProhibitEnumeratedClasses] + +[RegularExpressions::ProhibitEscapedMetacharacters] + +[RegularExpressions::ProhibitFixedStringMatches] + +[RegularExpressions::ProhibitSingleCharAlternation] + +[RegularExpressions::ProhibitUnusedCapture] + +[RegularExpressions::ProhibitUnusualDelimiters] + +[RegularExpressions::RequireBracesForMultiline] + +[RegularExpressions::RequireDotMatchAnything] + +[RegularExpressions::RequireExtendedFormatting] + +[RegularExpressions::RequireLineBoundaryMatching] + +[Subroutines::ProhibitAmpersandSigils] + +[Subroutines::ProhibitBuiltinHomonyms] + +[Subroutines::ProhibitCallsToUndeclaredSubs] + +[Subroutines::ProhibitCallsToUnexportedSubs] + +[Subroutines::ProhibitExcessComplexity] + +[Subroutines::ProhibitExplicitReturnUndef] + +[Subroutines::ProhibitExportingUndeclaredSubs] + +[Subroutines::ProhibitManyArgs] + +[Subroutines::ProhibitNestedSubs] + +[Subroutines::ProhibitQualifiedSubDeclarations] + +[Subroutines::ProhibitReturnSort] + +[Subroutines::ProhibitSubroutinePrototypes] + +[Subroutines::ProhibitUnusedPrivateSubroutines] +private_name_regex = _(?!build_)\w + +[Subroutines::ProtectPrivateSubs] + +[Subroutines::RequireArgUnpacking] + +[Subroutines::RequireFinalReturn] + +[TestingAndDebugging::ProhibitNoStrict] + +[TestingAndDebugging::ProhibitNoWarnings] + +[TestingAndDebugging::ProhibitProlongedStrictureOverride] + +[TestingAndDebugging::RequireTestLabels] + +[TestingAndDebugging::RequireUseStrict] +equivalent_modules = Moose Moo + +[TestingAndDebugging::RequireUseWarnings] +equivalent_modules = Moose Moo + +[Tics::ProhibitLongLines] +base_max = 130 + +[Tics::ProhibitManyArrows] + +[Tics::ProhibitUseBase] + +[ValuesAndExpressions::ConstantBeforeLt] + +[ValuesAndExpressions::NotWithCompare] + +[ValuesAndExpressions::ProhibitArrayAssignAref] + +[ValuesAndExpressions::ProhibitBarewordDoubleColon] + +[ValuesAndExpressions::ProhibitCommaSeparatedStatements] + +[ValuesAndExpressions::ProhibitComplexVersion] + +[ValuesAndExpressions::ProhibitConstantPragma] + +[ValuesAndExpressions::ProhibitDuplicateHashKeys] + +[-ValuesAndExpressions::ProhibitEmptyCommas] + +[ValuesAndExpressions::ProhibitEmptyQuotes] + +[ValuesAndExpressions::ProhibitEscapedCharacters] + +[ValuesAndExpressions::ProhibitFiletest_f] + +[ValuesAndExpressions::ProhibitImplicitNewlines] + +[ValuesAndExpressions::ProhibitInterpolationOfLiterals] + +[ValuesAndExpressions::ProhibitLeadingZeros] + +[ValuesAndExpressions::ProhibitLongChainsOfMethodCalls] + +[-ValuesAndExpressions::ProhibitMagicNumbers] + +[ValuesAndExpressions::ProhibitMismatchedOperators] + +[ValuesAndExpressions::ProhibitMixedBooleanOperators] + +[ValuesAndExpressions::ProhibitNoisyQuotes] + +[ValuesAndExpressions::ProhibitNullStatements] + +[ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters] + +[ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator] + +[ValuesAndExpressions::ProhibitUnknownBackslash] + +[ValuesAndExpressions::ProhibitVersionStrings] + +[ValuesAndExpressions::RequireConstantOnLeftSideOfEquality] + +[ValuesAndExpressions::RequireConstantVersion] + +[ValuesAndExpressions::RequireInterpolationOfMetachars] + +[ValuesAndExpressions::RequireNumberSeparators] + +[ValuesAndExpressions::RequireNumericVersion] + +[ValuesAndExpressions::RequireQuotedHeredocTerminator] + +[ValuesAndExpressions::RequireUpperCaseHeredocTerminator] + +[ValuesAndExpressions::RestrictLongStrings] + +[ValuesAndExpressions::UnexpandedSpecialLiteral] + +[Variables::ProhibitAugmentedAssignmentInDeclaration] + +[Variables::ProhibitConditionalDeclarations] + +[Variables::ProhibitEvilVariables] + +[Variables::ProhibitLocalVars] + +[Variables::ProhibitMatchVars] + +[Variables::ProhibitPackageVars] + +[Variables::ProhibitPerl4PackageNames] + +[-Variables::ProhibitPunctuationVars] + +[Variables::ProhibitReusedNames] + +[Variables::ProhibitUnusedVariables] + +[Variables::ProhibitUnusedVarsStricter] + +[Variables::ProtectPrivateVars] + +[Variables::RequireInitializationForLocalVars] + +[Variables::RequireLexicalLoopIterators] + +[Variables::RequireLocalizedPunctuationVars] + +[Variables::RequireNegativeIndices] diff --git a/t/00-compile/lib_Acme_Time_Constant_pm.t b/t/00-compile/lib_Acme_Time_Constant_pm.t new file mode 100644 index 0000000..fb1a429 --- /dev/null +++ b/t/00-compile/lib_Acme_Time_Constant_pm.t @@ -0,0 +1,11 @@ +use strict; +use warnings; + +# This test was generated for +# using by Dist::Zilla::Plugin::Test::Compile::PerFile ( @Author::KENTNL/Test::Compile::PerFile ) version 0.002001 +# with template 01-basic.t.tpl + +use Test::More 0.89 tests => 1; + +require_ok("lib/Acme/Time/Constant.pm"); + diff --git a/t/00-report-prereqs.dd b/t/00-report-prereqs.dd new file mode 100644 index 0000000..86021e1 --- /dev/null +++ b/t/00-report-prereqs.dd @@ -0,0 +1,91 @@ +do { my $x = { + 'configure' => { + 'recommends' => { + 'ExtUtils::MakeMaker' => '6.98' + }, + 'requires' => { + 'ExtUtils::MakeMaker' => '0' + } + }, + 'develop' => { + 'requires' => { + 'Dist::Zilla::Plugin::Authority' => '1.006', + 'Dist::Zilla::Plugin::AutoPrereqs' => '0', + 'Dist::Zilla::Plugin::BumpVersionAfterRelease' => '0', + 'Dist::Zilla::Plugin::ConfirmRelease' => '0', + 'Dist::Zilla::Plugin::CopyFilesFromBuild' => '0', + 'Dist::Zilla::Plugin::EOLTests' => '0', + 'Dist::Zilla::Plugin::Git::Check' => '0', + 'Dist::Zilla::Plugin::Git::Commit' => '0', + 'Dist::Zilla::Plugin::Git::CommitBuild' => '0', + 'Dist::Zilla::Plugin::Git::GatherDir' => '0', + 'Dist::Zilla::Plugin::Git::NextRelease' => '0', + 'Dist::Zilla::Plugin::Git::Tag' => '0', + 'Dist::Zilla::Plugin::GithubMeta' => '0', + 'Dist::Zilla::Plugin::License' => '0', + 'Dist::Zilla::Plugin::MakeMaker' => '0', + 'Dist::Zilla::Plugin::Manifest' => '0', + 'Dist::Zilla::Plugin::ManifestSkip' => '0', + 'Dist::Zilla::Plugin::MetaConfig' => '0', + 'Dist::Zilla::Plugin::MetaData::BuiltWith' => '0', + 'Dist::Zilla::Plugin::MetaJSON' => '0', + 'Dist::Zilla::Plugin::MetaProvides::Package' => '1.14000001', + 'Dist::Zilla::Plugin::MetaTests' => '0', + 'Dist::Zilla::Plugin::MetaYAML' => '0', + 'Dist::Zilla::Plugin::MinimumPerl' => '0', + 'Dist::Zilla::Plugin::PodCoverageTests' => '0', + 'Dist::Zilla::Plugin::PodSyntaxTests' => '0', + 'Dist::Zilla::Plugin::PodWeaver' => '0', + 'Dist::Zilla::Plugin::Prereqs' => '0', + 'Dist::Zilla::Plugin::Prereqs::Recommend::MatchInstalled' => '0', + 'Dist::Zilla::Plugin::ReadmeAnyFromPod' => '0', + 'Dist::Zilla::Plugin::ReadmeFromPod' => '0', + 'Dist::Zilla::Plugin::RewriteVersion::Sanitized' => '0', + 'Dist::Zilla::Plugin::RunExtraTests' => '0', + 'Dist::Zilla::Plugin::Test::CPAN::Changes' => '0', + 'Dist::Zilla::Plugin::Test::Compile::PerFile' => '0', + 'Dist::Zilla::Plugin::Test::Kwalitee' => '0', + 'Dist::Zilla::Plugin::Test::MinimumVersion' => '0', + 'Dist::Zilla::Plugin::Test::Perl::Critic' => '0', + 'Dist::Zilla::Plugin::Test::ReportPrereqs' => '0', + 'Dist::Zilla::Plugin::TestRelease' => '0', + 'Dist::Zilla::Plugin::Twitter' => '0', + 'Dist::Zilla::Plugin::UploadToCPAN' => '0', + 'Pod::Coverage::TrustPod' => '0', + 'Test::CPAN::Changes' => '0.19', + 'Test::CPAN::Meta' => '0', + 'Test::Kwalitee' => '1.12', + 'Test::Pod' => '1.41', + 'Test::Pod::Coverage' => '1.08' + }, + 'suggests' => { + 'Dist::Zilla::App::Command::bakeini' => '0.001001', + 'Dist::Zilla::PluginBundle::Author::KENTNL' => '2.016007' + } + }, + 'runtime' => { + 'requires' => { + 'Sub::Exporter::Progressive' => '0', + 'Time::HiRes' => '0', + 'Time::Warp' => '0', + 'perl' => '5.008', + 'strict' => '0', + 'utf8' => '0', + 'warnings' => '0' + } + }, + 'test' => { + 'recommends' => { + 'CPAN::Meta' => '2.120900', + 'ExtUtils::MakeMaker' => '6.98', + 'Test::More' => '1.001003' + }, + 'requires' => { + 'ExtUtils::MakeMaker' => '0', + 'File::Spec' => '0', + 'Test::More' => '0.89' + } + } + }; + $x; + } \ No newline at end of file diff --git a/t/00-report-prereqs.t b/t/00-report-prereqs.t new file mode 100644 index 0000000..6e46540 --- /dev/null +++ b/t/00-report-prereqs.t @@ -0,0 +1,177 @@ +#!perl + +use strict; +use warnings; + +# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.018 + +use Test::More tests => 1; + +use ExtUtils::MakeMaker; +use File::Spec; + +# from $version::LAX +my $lax_version_re = + qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? + | + (?:\.[0-9]+) (?:_[0-9]+)? + ) | (?: + v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? + | + (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? + ) + )/x; + +# hide optional CPAN::Meta modules from prereq scanner +# and check if they are available +my $cpan_meta = "CPAN::Meta"; +my $cpan_meta_pre = "CPAN::Meta::Prereqs"; +my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic + +# Verify requirements? +my $DO_VERIFY_PREREQS = 1; + +sub _max { + my $max = shift; + $max = ( $_ > $max ) ? $_ : $max for @_; + return $max; +} + +sub _merge_prereqs { + my ($collector, $prereqs) = @_; + + # CPAN::Meta::Prereqs object + if (ref $collector eq $cpan_meta_pre) { + return $collector->with_merged_prereqs( + CPAN::Meta::Prereqs->new( $prereqs ) + ); + } + + # Raw hashrefs + for my $phase ( keys %$prereqs ) { + for my $type ( keys %{ $prereqs->{$phase} } ) { + for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { + $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; + } + } + } + + return $collector; +} + +my @include = qw( + +); + +my @exclude = qw( + +); + +# Add static prereqs to the included modules list +my $static_prereqs = do 't/00-report-prereqs.dd'; + +### XXX: Assume these are Runtime Requires +my $static_prereqs_requires = $static_prereqs->{runtime}{requires}; +for my $mod (@include) { + $static_prereqs_requires->{$mod} = 0 unless exists $static_prereqs_requires->{$mod}; +} + +# Merge all prereqs (either with ::Prereqs or a hashref) +my $full_prereqs = _merge_prereqs( + ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), + $static_prereqs +); + +# Add dynamic prereqs to the included modules list (if we can) +my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; +if ( $source && $HAS_CPAN_META ) { + if ( my $meta = eval { CPAN::Meta->load_file($source) } ) { + $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); + } +} +else { + $source = 'static metadata'; +} + +my @full_reports; +my @dep_errors; +my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; + +for my $phase ( qw(configure build test runtime develop) ) { + next unless $req_hash->{$phase}; + next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); + + for my $type ( qw(requires recommends suggests conflicts) ) { + next unless $req_hash->{$phase}{$type}; + + my $title = ucfirst($phase).' '.ucfirst($type); + my @reports = [qw/Module Want Have/]; + + for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { + next if $mod eq 'perl'; + next if grep { $_ eq $mod } @exclude; + + my $file = $mod; + $file =~ s{::}{/}g; + $file .= ".pm"; + my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; + + my $want = $req_hash->{$phase}{$type}{$mod}; + $want = "undef" unless defined $want; + $want = "any" if !$want && $want == 0; + + my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; + + if ($prefix) { + my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); + $have = "undef" unless defined $have; + push @reports, [$mod, $want, $have]; + + if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { + if ( $have !~ /\A$lax_version_re\z/ ) { + push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; + } + elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { + push @dep_errors, "$mod version '$have' is not in required range '$want'"; + } + } + } + else { + push @reports, [$mod, $want, "missing"]; + + if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { + push @dep_errors, "$mod is not installed ($req_string)"; + } + } + } + + if ( @reports ) { + push @full_reports, "=== $title ===\n\n"; + + my $ml = _max( map { length $_->[0] } @reports ); + my $wl = _max( map { length $_->[1] } @reports ); + my $hl = _max( map { length $_->[2] } @reports ); + splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; + + push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; + push @full_reports, "\n"; + } + } +} + +if ( @full_reports ) { + diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; +} + +if ( @dep_errors ) { + diag join("\n", + "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n", + "The following REQUIRED prerequisites were not satisfied:\n", + @dep_errors, + "\n" + ); +} + +pass; + +# vim: ts=4 sts=4 sw=4 et: diff --git a/t/basic.t b/t/basic.t new file mode 100644 index 0000000..2e1053c --- /dev/null +++ b/t/basic.t @@ -0,0 +1,39 @@ +use strict; +use warnings; + +use Test::More; + +# FILENAME: basic.t +# CREATED: 08/04/14 15:40:32 by Kent Fredric (kentnl) +# ABSTRACT: Test the continuum + +use Acme::Time::Constant qw( constant_time ); + +my $timestamp = time; +constant_time( + 1 => sub { + my $j; + for my $i ( 0 .. 1 ) { + $j += $i; + } + } +); +my $delta = time - $timestamp; +cmp_ok( $delta, '>', 0.5, 'Constant time fixed at at least 0.5 second pass 1' ); +cmp_ok( $delta, '<', 1.5, 'Constant time fixed at at most 1.5 second pass 1' ); + +$timestamp = time; +constant_time( + 1 => sub { + my $j; + for my $i ( 0 .. 50_000_000 ) { + $j += $i; + } + } +); +$delta = time - $timestamp; +cmp_ok( $delta, '>', 0.5, 'Constant time fixed at at least 0.5 second pass 2' ); +cmp_ok( $delta, '<', 1.5, 'Constant time fixed at at most 1.5 second pass 2' ); + +done_testing; + diff --git a/weaver.ini b/weaver.ini new file mode 100644 index 0000000..e6f2b37 --- /dev/null +++ b/weaver.ini @@ -0,0 +1,49 @@ +[@CorePrep] +[-SingleEncoding] + +[Name] +[Version] + +[Region / prelude] + +[Generic / SYNOPSIS] +[Generic / DESCRIPTION] +[Generic / OVERVIEW] + +;[Generic / METHODS] +;[Collect / METHODS] +[Collect / METHODS] +command = method + + +[Collect / ATTRIBUTES] +command = attr + +;[Collect / FILTER_METHODS] +;header = FILTER METHODS +;command = filter + +;[Collect / TERMINATOR_LIST_METHODS] +;header = TERMINATOR LIST METHODS +;command = terminator + +;[Collect / MIRROR_LIST_METHODS] +;header = MIRROR LIST METHODS +;command = mirrorlist + +[Collect / PRIVATE_ATTRIBUTES] +header = PRIVATE ATTRIBUTES +command = p_attr + +[Collect / PRIVATE_METHODS] +header = PRIVATE METHODS +command = p_method + +[Leftovers] + +[Region / postlude] + +[Authors] +[Legal] + + diff --git a/xt/author/critic.t b/xt/author/critic.t new file mode 100644 index 0000000..d5b4c96 --- /dev/null +++ b/xt/author/critic.t @@ -0,0 +1,12 @@ +#!perl + +use strict; +use warnings; + +use Test::More; +use English qw(-no_match_vars); + +eval "use Test::Perl::Critic"; +plan skip_all => 'Test::Perl::Critic required to criticise code' if $@; +Test::Perl::Critic->import( -profile => "perlcritic.rc" ) if -e "perlcritic.rc"; +all_critic_ok(); diff --git a/xt/release/cpan-changes.t b/xt/release/cpan-changes.t new file mode 100644 index 0000000..8e6e413 --- /dev/null +++ b/xt/release/cpan-changes.t @@ -0,0 +1,11 @@ +#!perl + +use strict; +use warnings; + +use Test::More 0.96 tests => 2; +use_ok('Test::CPAN::Changes'); +subtest 'changes_ok' => sub { + changes_file_ok('Changes'); +}; +done_testing(); diff --git a/xt/release/distmeta.t b/xt/release/distmeta.t new file mode 100644 index 0000000..c2280dc --- /dev/null +++ b/xt/release/distmeta.t @@ -0,0 +1,6 @@ +#!perl +# This file was automatically generated by Dist::Zilla::Plugin::MetaTests. + +use Test::CPAN::Meta; + +meta_yaml_ok(); diff --git a/xt/release/eol.t b/xt/release/eol.t new file mode 100644 index 0000000..d13c49d --- /dev/null +++ b/xt/release/eol.t @@ -0,0 +1,8 @@ +use strict; +use warnings; +use Test::More; + +eval 'use Test::EOL'; +plan skip_all => 'Test::EOL required' if $@; + +all_perl_files_ok({ trailing_whitespace => 1 }); diff --git a/xt/release/kwalitee.t b/xt/release/kwalitee.t new file mode 100644 index 0000000..13cecfa --- /dev/null +++ b/xt/release/kwalitee.t @@ -0,0 +1,4 @@ +# this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.07 +use strict; +use warnings; +use Test::Kwalitee; diff --git a/xt/release/minimum-version.t b/xt/release/minimum-version.t new file mode 100644 index 0000000..d108c79 --- /dev/null +++ b/xt/release/minimum-version.t @@ -0,0 +1,8 @@ +#!perl + +use Test::More; + +eval "use Test::MinimumVersion"; +plan skip_all => "Test::MinimumVersion required for testing minimum versions" + if $@; +all_minimum_version_from_metayml_ok(); diff --git a/xt/release/pod-coverage.t b/xt/release/pod-coverage.t new file mode 100644 index 0000000..66b3b64 --- /dev/null +++ b/xt/release/pod-coverage.t @@ -0,0 +1,7 @@ +#!perl +# This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests. + +use Test::Pod::Coverage 1.08; +use Pod::Coverage::TrustPod; + +all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); diff --git a/xt/release/pod-syntax.t b/xt/release/pod-syntax.t new file mode 100644 index 0000000..f0468f1 --- /dev/null +++ b/xt/release/pod-syntax.t @@ -0,0 +1,6 @@ +#!perl +# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. +use Test::More; +use Test::Pod 1.41; + +all_pod_files_ok();