Dist-Zilla-Plugin-OurPkgVersion-0.21000755001750001750 013514111764 17367 5ustar00ollisgollisg000000000000README100644001750001750 1452013514111764 20352 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21NAME Dist::Zilla::Plugin::OurPkgVersion - No line insertion and does Package version with our VERSION version 0.21 SYNOPSIS in dist.ini [OurPkgVersion] in your modules # VERSION DESCRIPTION This module was created as an alternative to Dist::Zilla::Plugin::PkgVersion and uses some code from that module. This module is designed to use a the more readable format our $VERSION = $version; as well as not change then number of lines of code in your files, which will keep your repository more in sync with your CPAN release. It also allows you slightly more freedom in how you specify your version. EXAMPLES in dist.ini ... version = 0.01; [OurPkgVersion] in lib/My/Module.pm package My::Module; # VERSION ... output lib/My/Module.pm package My::Module; our $VERSION = '0.01'; # VERSION ... please note that whitespace before the comment is significant so package My::Module; BEGIN { # VERSION } ... becomes package My::Module; BEGIN { our $VERSION = '0.01'; # VERSION } ... while package My::Module; BEGIN { # VERSION } ... becomes package My::Module; BEGIN { our $VERSION = '0.01'; # VERSION } ... you can also add additional comments to your comment ... # VERSION: generated by DZP::OurPkgVersion ... becomes ... our $VERSION = '0.1.0'; # VERSION: generated by DZP::OurPkgVersion ... you can also use perltidy's default static side comments (##) ... ## VERSION ... becomes ... our $VERSION = '0.1.0'; ## VERSION ... Also note, the package line is not in any way significant, it will insert the our $VERSION line anywhere in the file before # VERSION as many times as you've written # VERSION regardless of whether or not inserting it there is a good idea. OurPkgVersion will not insert a version unless you have # VERSION so it is a bit more work. If you make a trial release, the comment will be altered to say so: # VERSION becomes our $VERSION = '0.01'; # TRIAL VERSION METHODS BUILD Provides validations after object creation. munge_files Override the default provided by Dist::Zilla::Role::FileMunger to limit the number of files to search to only be modules and executables. munge_file tells which files to munge, see Dist::Zilla::Role::FileMunger. finder Override the default FileFinder for finding files to check and update. The default value is :InstallModules and :PerlExecFiles (when available; otherwise :ExecFiles) -- see also Dist::Zilla::Plugin::ExecDir, to make sure the script files are properly marked as executables for the installer. PROPERTIES underscore_eval_version For version numbers that have an underscore in them, add this line immediately after the our version assignment: $VERSION = eval $VERSION; This is arguably the correct thing to do, but changes the line numbering of the generated Perl module or source, and thus optional. semantic_version Setting this property to "true" (1) will set the version of the module/distribution to properly use semantic versioning. It will also expect that you setup version with a v-string, without adding quotes. For example: version = v0.0.1 Beware you can't setup both underscore_eval_version and semantic_version since both are mutually exclusive: if you try, your code is going to die. For more details, check this blog for more details about using semantic version with Perl. skip_main_module Set to true to ignore the main module in the distribution. This prevents a warning when using Dist::Zilla::Plugin::VersionFromMainModule to obtain the version number instead of the dist.ini file. overwrite When enabled, this option causes any match of the # VERSION comment to first check for an existing our $VERSION = ...; on the same line, and if found, overwrite the value in the existing statement. (the comment still gets modified for trial releases) Currently, the value must be a single Perl token such as a string or number. no_critic When underscore_eval_version is used the generated code for dev versions may not technically be Perl::Critic compliant due to string eval, but is nevertheless pretty safe. This option will add the appropriate no critic directive to save you the hassle. BUGS Please report any bugs or feature requests on the bugtracker website https://github.com/plicease/dist-zilla-plugin-ourpkgversion/issues When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. CONTRIBUTORS * Alceu Rodrigues de Freitas Junior * Ian Sealy * Michael Conrad * Michael Jemmeson * Stephan Loyd * Alceu Rodrigues de Freitas Junior * Alexandr Ciornii * Alexei Znamensky * Christian Walde * Christopher J. Madsen * David Golden * Graham Ollis * Graham Ollis * Graham✈️✈️ AUTHORS * Caleb Cushing * Grahan Ollis COPYRIGHT AND LICENSE This software is Copyright (c) 2019 by Caleb Cushing. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) Changes100644001750001750 717313514111764 20753 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21Revision history for Dist-Zilla-Plugin-OurPkgVersion 0.21 2019-07-18 - Add no_critic option (gh#18) 0.20 2019-05-24 - Fix git deploy snafoo (plicease--) 0.19 2019-05-24 - Fix regression related to version_provider plugins (gh#15, gh#16) 0.18 2019-05-22 - Fix git deploy snafoo (plicease--) 0.17 2019-05-22 - Fix prereqs: some developer prereqs were leaking into the list of test prereqs (gh#13, gh#14) 0.16 2019-05-21 - Add semantic_version option. 0.15 2019-04-16 - Add overwrite option (gh#9, gh#10, nrdvana++) - Require Dist::Zilla 6.00 and perl 5.14 (gh#5, gh#11) 0.14 2019-02-06 - Fix bug where nw underscore_eval_version may fail - add skip_main_module option for compatibility with VersionFromMainModule 0.12 2017-07-11 - Add underscore_eval_version property 0.11 2017-07-02 - use :PerlExecFiles filefinder whenever possible 0.10 2016-06-21 - Production release identical to 0.09_01 0.09_01 2016-06-20 - Also accept perltidy "special side comments" syntax. Please note that things may break if your dist has the pattern '## VERSION' in a .pm file (iansealy GH# 2) 0.08 2016-04-24 - Dist::Zilla 5.x / 6.x and future 7.x compatability 0.07 2016-03-07 - Use Dist::Zilla::Role::PPI to avoid reparsing documents (new GH #1) 0.06 2015-05-04 - Use [Test::ReportPrereqs] instead of [ReportVersions::Tiny] to remove deprecation warning during dzil build. - Use new github repository in meta 0.005001 2013-12-16 - update compile test so that it doesn't hang on windows GH #11 ( chorny ) - add contributors plugins 0.005000 2013-09-07 - allow comment to be #VERSION - Github Issue #9 - Reported by Jakob Voss ( nichtich ) 0.004000 2012-05-31 - skip parsing .pod files Github Issue #6 - Change comment to read TRIAL VERSION for trial releases Github Issue #7 Patch by Christopher J. Madsen 0.003002 2012-01-02 - skip if PPI unable to parse 0.003001 2012-01-01 - Provide a better error message if PPI fails v0.3.0 2011-08-10 - Allow text after # VERSION comment, see docs for example Github Issue #5 Reported by David Golden 0.2.0 2011-07-31 - Add debug logging of successfully adding versions Github Issue #4 Patch by Christian Walde 0.1.9 2011-07-23 - Always warn about missing # VERSION comment Github Issue #3 Patch by David Golden 0.1.8 2011-06-01 - Testing depends on Test::Version 0.04 or later 0.1.7 2011-05-31 - use Test::Version::version_ok to regression test gh issue #1 0.1.6 2011-05-09 - version sanity checking now done the same way as PkgVersion - above allows for vstring, e.g 'v3.3.2', style versions, Github Issue #2 Reported by Mike Doherty - use TestMania - add MetaJSON 0.1.5 2011-02-21 - CRITICAL: fix bug where version number wasn't quoted. This would make multipart versions (e.g. 0.1.0) not evaluate correctly, if you've used a multipart version with OurPkgVersion, please re-release your module. - make module conform to l3 strictness of Perl::Critic - make changes conform to CPAN::Changes::Spec 0.1.4 2010-11-06 - Remove AutoPrereqs from corpus, don't want to depend on that 0.1.3 2010-11-06 - Add basic tests specific to this distribution - Add better error handling if no comments present GitHub Issue #1 Reported by Stephen Clouse - remove cruft copied from PkgVersion that wasn't necessary 0.1.2 2010-08-07 - All Prerequisites were not properly defined, this is corrected. 0.1.1 2010-08-07 - override munges files to narrow which files will even be looked at 0.1.0 2010-08-03 - initial release LICENSE100644001750001750 2152213514111764 20477 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21This software is Copyright (c) 2019 by Caleb Cushing. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) The Artistic License 2.0 Copyright (c) 2000-2006, The Perl Foundation. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble This license establishes the terms under which a given free software Package may be copied, modified, distributed, and/or redistributed. The intent is that the Copyright Holder maintains some artistic control over the development of that Package while still keeping the Package available as open source and free software. You are always permitted to make arrangements wholly outside of this license directly with the Copyright Holder of a given Package. If the terms of this license do not permit the full use that you propose to make of the Package, you should contact the Copyright Holder and seek a different licensing arrangement. Definitions "Copyright Holder" means the individual(s) or organization(s) named in the copyright notice for the entire Package. "Contributor" means any party that has contributed code or other material to the Package, in accordance with the Copyright Holder's procedures. "You" and "your" means any person who would like to copy, distribute, or modify the Package. "Package" means the collection of files distributed by the Copyright Holder, and derivatives of that collection and/or of those files. A given Package may consist of either the Standard Version, or a Modified Version. "Distribute" means providing a copy of the Package or making it accessible to anyone else, or in the case of a company or organization, to others outside of your company or organization. "Distributor Fee" means any fee that you charge for Distributing this Package or providing support for this Package to another party. It does not mean licensing fees. "Standard Version" refers to the Package if it has not been modified, or has been modified only in ways explicitly requested by the Copyright Holder. "Modified Version" means the Package, if it has been changed, and such changes were not explicitly requested by the Copyright Holder. "Original License" means this Artistic License as Distributed with the Standard Version of the Package, in its current version or as it may be modified by The Perl Foundation in the future. "Source" form means the source code, documentation source, and configuration files for the Package. "Compiled" form means the compiled bytecode, object code, binary, or any other form resulting from mechanical transformation or translation of the Source form. Permission for Use and Modification Without Distribution (1) You are permitted to use the Standard Version and create and use Modified Versions for any purpose without restriction, provided that you do not Distribute the Modified Version. Permissions for Redistribution of the Standard Version (2) You may Distribute verbatim copies of the Source form of the Standard Version of this Package in any medium without restriction, either gratis or for a Distributor Fee, provided that you duplicate all of the original copyright notices and associated disclaimers. At your discretion, such verbatim copies may or may not include a Compiled form of the Package. (3) You may apply any bug fixes, portability changes, and other modifications made available from the Copyright Holder. The resulting Package will still be considered the Standard Version, and as such will be subject to the Original License. Distribution of Modified Versions of the Package as Source (4) You may Distribute your Modified Version as Source (either gratis or for a Distributor Fee, and with or without a Compiled form of the Modified Version) provided that you clearly document how it differs from the Standard Version, including, but not limited to, documenting any non-standard features, executables, or modules, and provided that you do at least ONE of the following: (a) make the Modified Version available to the Copyright Holder of the Standard Version, under the Original License, so that the Copyright Holder may include your modifications in the Standard Version. (b) ensure that installation of your Modified Version does not prevent the user installing or running the Standard Version. In addition, the Modified Version must bear a name that is different from the name of the Standard Version. (c) allow anyone who receives a copy of the Modified Version to make the Source form of the Modified Version available to others under (i) the Original License or (ii) a license that permits the licensee to freely copy, modify and redistribute the Modified Version using the same licensing terms that apply to the copy that the licensee received, and requires that the Source form of the Modified Version, and of any works derived from it, be made freely available in that license fees are prohibited but Distributor Fees are allowed. Distribution of Compiled Forms of the Standard Version or Modified Versions without the Source (5) You may Distribute Compiled forms of the Standard Version without the Source, provided that you include complete instructions on how to get the Source of the Standard Version. Such instructions must be valid at the time of your distribution. If these instructions, at any time while you are carrying out such distribution, become invalid, you must provide new instructions on demand or cease further distribution. If you provide valid instructions or cease distribution within thirty days after you become aware that the instructions are invalid, then you do not forfeit any of your rights under this license. (6) You may Distribute a Modified Version in Compiled form without the Source, provided that you comply with Section 4 with respect to the Source of the Modified Version. Aggregating or Linking the Package (7) You may aggregate the Package (either the Standard Version or Modified Version) with other packages and Distribute the resulting aggregation provided that you do not charge a licensing fee for the Package. Distributor Fees are permitted, and licensing fees for other components in the aggregation are permitted. The terms of this license apply to the use and Distribution of the Standard or Modified Versions as included in the aggregation. (8) You are permitted to link Modified and Standard Versions with other works, to embed the Package in a larger work of your own, or to build stand-alone binary or bytecode versions of applications that include the Package, and Distribute the result without restriction, provided the result does not expose a direct interface to the Package. Items That are Not Considered Part of a Modified Version (9) Works (including, but not limited to, modules and scripts) that merely extend or make use of the Package, do not, by themselves, cause the Package to be a Modified Version. In addition, such works are not considered parts of the Package itself, and are not subject to the terms of this license. General Provisions (10) Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license. (11) If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license. (12) This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder. (13) This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed. (14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. dist.ini100644001750001750 374413514111764 21124 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21name = Dist-Zilla-Plugin-OurPkgVersion author = Caleb Cushing author = Grahan Ollis version = 0.21 license = Artistic_2_0 copyright_holder = Caleb Cushing ; authordep Dist::Zilla::Plugin::ContributorsFromGit ; authordep Pod::Weaver::Section::Contributors ; authordep Test::EOL [ReadmeAnyFromPod] type = text filename = README location = build [ReadmeAnyFromPod / ReadMePodInRoot] type = markdown filename = README.md location = root ; begin: [@Basic] - Readme, s/MakeMaker/Author::Plicease::MakeMaker/; ; s/UploadToCPAN/Author::Plicease::Upload/; [GatherDir] [PruneCruft] [ManifestSkip] [MetaYAML] [License] [ExecDir] [ShareDir] [Author::Plicease::MakeMaker] [Manifest] [TestRelease] [ConfirmRelease] [Author::Plicease::Upload] cpan = 1 ; end [AutoPrereqs] [Prereqs] Dist::Zilla = 6.00 Dist::Zilla::Role::FileMunger = 0 Dist::Zilla::Role::FileFinderUser = 0 [Prereqs / TestRequires] Test::Version = 0.04 [Prereqs / DevelopRequires] Test::Pod::Coverage = 1.10 Perl::Critic::More = 1.003 Perl::Critic::Pulp = 96 [OurPkgVersion] [PodWeaver] [AutoMetaResources] homepage = https://metacpan.org/dist/%{dist} bugtracker.github = user:plicease repository.github = user:plicease [MetaNoIndex] directory = corpus file = perlcritic.rc [MetaJSON] [NextRelease] format = %-9v %{yyyy-MM-dd}d [Test::ReportPrereqs] [@TestingMania] disable = NoTabsTests,Test::Synopsis,Test::Compile,Test::Pod::LinkCheck [Test::Compile] :version = 2.033 [ExtraTests] [Test::PodSpelling] stopwords = SubmittingPatches stopwords = dzil stopwords = OurPkgVersion stopwords = ini stopwords = executables stopwords = perltidy stopwords = FileFinder stopwords = dev [@Git] tag_format = %v tag_message = %v commit_msg = %v%n%n%c allow_dirty = README.md allow_dirty = Changes allow_dirty = dist.ini [ContributorsFromGit] [CheckChangesHasContent] [Author::Plicease::Core] [Author::Plicease::MarkDownCleanup] travis_status = 1 [Author::Plicease::SpecialPrereqs] META.yml100644001750001750 360013514111764 20720 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21--- abstract: 'No line insertion and does Package version with our' author: - 'Caleb Cushing ' - 'Grahan Ollis ' build_requires: Dist::Zilla::Role::VersionProvider: '0' ExtUtils::MakeMaker: '0' Path::Tiny: '0' Test::DZil: '0' Test::Exception: '0' Test::Version: '0.04' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010' license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Dist-Zilla-Plugin-OurPkgVersion no_index: directory: - corpus file: - perlcritic.rc requires: Dist::Zilla: '6.00' Dist::Zilla::Role::FileFinderUser: '0' Dist::Zilla::Role::FileMunger: '0' Dist::Zilla::Role::PPI: '0' Moose: '0' MooseX::Types::Perl: '0' PPI: '0' namespace::autoclean: '0' perl: '5.014' resources: bugtracker: https://github.com/plicease/dist-zilla-plugin-ourpkgversion/issues homepage: https://metacpan.org/dist/Dist-Zilla-Plugin-OurPkgVersion repository: git://github.com/plicease/dist-zilla-plugin-ourpkgversion.git version: '0.21' x_contributors: - 'Alceu Rodrigues de Freitas Junior ' - 'Alceu Rodrigues de Freitas Junior ' - 'Alexandr Ciornii ' - 'Alexei Znamensky ' - 'Christian Walde ' - 'Christopher J. Madsen ' - 'David Golden ' - 'Graham Ollis ' - 'Graham Ollis ' - 'Graham✈️✈️ ' - 'Ian Sealy ' - 'Michael Conrad ' - 'Michael Jemmeson ' - 'Stephan Loyd ' x_generated_by_perl: v5.28.1 x_serialization_backend: 'YAML::Tiny version 1.73' MANIFEST100644001750001750 271413514111764 20605 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.012. Changes LICENSE MANIFEST META.json META.yml Makefile.PL README corpus/DZT/dist.ini corpus/DZT/lib/DZT0.pm corpus/DZT/lib/DZT1.pm corpus/DZT/lib/DZT2.pm corpus/DZT/lib/DZT3.pm corpus/DZT/lib/DZT4.pm corpus/DZT/lib/DZT5.pm corpus/DZT/lib/DZT6.pm corpus/DZT/lib/DZT7.pm corpus/DZT/lib/DZT8.pm corpus/DZT/t/basic.t corpus/eDZT/dist.ini corpus/eDZT/lib/DZT0.pm corpus/error1/dist.ini corpus/error1/lib/DZT0.pm corpus/error2/dist.ini corpus/error2/lib/DZT0.pm corpus/oDZT/dist.ini corpus/oDZT/lib/oDZT.pm corpus/sDZT/dist.ini corpus/sDZT/lib/DZT0.pm corpus/sDZT/lib/DZT1.pm corpus/semanticDZT/dist.ini corpus/semanticDZT/lib/semanticDZT.pm corpus/vDZT/dist.ini corpus/vDZT/lib/vDZT.pm corpus/version_provider/dist.ini corpus/version_provider/lib/DZT0.pm dist.ini lib/Dist/Zilla/Plugin/OurPkgVersion.pm maint/cip-before-install perlcritic.rc t/00-compile.t t/00-report-prereqs.dd t/00-report-prereqs.t t/01-basic.t t/02-vstring.t t/03-trial.t t/04-underscore.t t/05-skip_main_module.t t/06-overwrite.t t/07-semantic.t t/08-build_exceptions.t t/09-version_provider.t t/author-critic.t t/author-eol.t t/author-minimum-version.t t/author-mojibake.t t/author-pod-coverage.t t/author-pod-spell.t t/author-pod-syntax.t t/author-portability.t t/author-test-version.t t/release-cpan-changes.t t/release-dist-manifest.t t/release-distmeta.t t/release-kwalitee.t t/release-meta-json.t t/release-unused-vars.t weaver.ini META.json100644001750001750 702613514111764 21076 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21{ "abstract" : "No line insertion and does Package version with our", "author" : [ "Caleb Cushing ", "Grahan Ollis " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010", "license" : [ "artistic_2" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Dist-Zilla-Plugin-OurPkgVersion", "no_index" : { "directory" : [ "corpus" ], "file" : [ "perlcritic.rc" ] }, "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "develop" : { "requires" : { "Perl::Critic::More" : "1.003", "Perl::Critic::Pulp" : "96", "Pod::Coverage::TrustPod" : "0", "Test::CPAN::Changes" : "0.19", "Test::CPAN::Meta" : "0", "Test::CPAN::Meta::JSON" : "0.16", "Test::EOL" : "0", "Test::Kwalitee" : "1.21", "Test::MinimumVersion" : "0", "Test::Mojibake" : "0", "Test::More" : "0.88", "Test::Perl::Critic" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.10", "Test::Portability::Files" : "0", "Test::Spelling" : "0.12", "Test::Version" : "1" } }, "runtime" : { "requires" : { "Dist::Zilla" : "6.00", "Dist::Zilla::Role::FileFinderUser" : "0", "Dist::Zilla::Role::FileMunger" : "0", "Dist::Zilla::Role::PPI" : "0", "Moose" : "0", "MooseX::Types::Perl" : "0", "PPI" : "0", "namespace::autoclean" : "0", "perl" : "5.014" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "Dist::Zilla::Role::VersionProvider" : "0", "ExtUtils::MakeMaker" : "0", "Path::Tiny" : "0", "Test::DZil" : "0", "Test::Exception" : "0", "Test::Version" : "0.04" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/plicease/dist-zilla-plugin-ourpkgversion/issues" }, "homepage" : "https://metacpan.org/dist/Dist-Zilla-Plugin-OurPkgVersion", "repository" : { "type" : "git", "url" : "git://github.com/plicease/dist-zilla-plugin-ourpkgversion.git", "web" : "https://github.com/plicease/dist-zilla-plugin-ourpkgversion" } }, "version" : "0.21", "x_contributors" : [ "Alceu Rodrigues de Freitas Junior ", "Alceu Rodrigues de Freitas Junior ", "Alexandr Ciornii ", "Alexei Znamensky ", "Christian Walde ", "Christopher J. Madsen ", "David Golden ", "Graham Ollis ", "Graham Ollis ", "Graham\u2708\ufe0f\u2708\ufe0f ", "Ian Sealy ", "Michael Conrad ", "Michael Jemmeson ", "Stephan Loyd " ], "x_generated_by_perl" : "v5.28.1", "x_serialization_backend" : "Cpanel::JSON::XS version 4.12" } weaver.ini100644001750001750 42113514111764 21417 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21[@CorePrep] [Name] [Version] [Region / prelude] [Generic / SYNOPSIS] [Generic / DESCRIPTION] [Generic / OVERVIEW] [Collect / ATTRIBUTES] command = attr [Collect / METHODS] command = method [Leftovers] [Region / postlude] [Bugs] [Contributors] [Authors] [Legal] Makefile.PL100644001750001750 705413514111764 21430 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21BEGIN { use strict; use warnings; unless(eval q{ use 5.014; 1}) { print "Perl 5.014 or better required\n"; exit; } } BEGIN { use strict; use warnings; my %missing = map { eval qq{ require $_ }; $@ ? ($_=>1) : () } qw( Carp File::Spec IO::Handle IPC::Open3 Test::More strict warnings ); if(%missing) { print "Your Perl is missing core modules: @{[ sort keys %missing ]}\n"; print "Ideally if you are using the system Perl you can install the appropriate\n"; print "package which includes the core Perl modules. On at least some versions\n"; print "of Fedora, CentOS and RHEL, this is the `perl-core` package.\n"; print "\n"; print " % dnf install perl-core\n"; print " ~ or ~\n"; print " % yum install perl-core\n"; print "\n"; print "If you really want to install dual-life modules from CPAN, then you can\n"; print "use cpanm:\n"; print "\n"; print " % cpanm @{[ sort keys %missing ]}\n"; print "\n"; print "Note that some core modules are not available from CPAN.\n"; exit; } } # This file was automatically generated by Dist::Zilla::Plugin::Author::Plicease::MakeMaker v2.36. use strict; use warnings; use 5.014; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "No line insertion and does Package version with our", "AUTHOR" => "Caleb Cushing , Grahan Ollis ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "Dist-Zilla-Plugin-OurPkgVersion", "LICENSE" => "artistic_2", "MIN_PERL_VERSION" => "5.014", "NAME" => "Dist::Zilla::Plugin::OurPkgVersion", "PM" => { "lib/Dist/Zilla/Plugin/OurPkgVersion.pm" => "\$(INST_LIB)/Dist/Zilla/Plugin/OurPkgVersion.pm" }, "PREREQ_PM" => { "Dist::Zilla" => "6.00", "Dist::Zilla::Role::FileFinderUser" => 0, "Dist::Zilla::Role::FileMunger" => 0, "Dist::Zilla::Role::PPI" => 0, "Moose" => 0, "MooseX::Types::Perl" => 0, "PPI" => 0, "namespace::autoclean" => 0 }, "TEST_REQUIRES" => { "Dist::Zilla::Role::VersionProvider" => 0, "ExtUtils::MakeMaker" => 0, "Path::Tiny" => 0, "Test::DZil" => 0, "Test::Exception" => 0, "Test::Version" => "0.04" }, "VERSION" => "0.21", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Dist::Zilla" => "6.00", "Dist::Zilla::Role::FileFinderUser" => 0, "Dist::Zilla::Role::FileMunger" => 0, "Dist::Zilla::Role::PPI" => 0, "Dist::Zilla::Role::VersionProvider" => 0, "ExtUtils::MakeMaker" => 0, "Moose" => 0, "MooseX::Types::Perl" => 0, "PPI" => 0, "Path::Tiny" => 0, "Test::DZil" => 0, "Test::Exception" => 0, "Test::Version" => "0.04", "namespace::autoclean" => 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);t000755001750001750 013514111764 17553 5ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.2103-trial.t100644001750001750 470513514111764 21441 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/t#!/usr/bin/perl use strict; use warnings; use Test::More; use Test::DZil; use Test::Version qw( version_ok ); use Path::Tiny qw( path ); $ENV{TRIAL} = 1; my $tzil = Builder->from_config({ dist_root => 'corpus/DZT' }); $tzil->build; version_ok( path($tzil->tempdir)->child('build/lib/DZT0.pm')); version_ok( path($tzil->tempdir)->child('build/lib/DZT1.pm')); my $lib_0 = $tzil->slurp_file('build/lib/DZT0.pm'); my $lib_1 = $tzil->slurp_file('build/lib/DZT1.pm'); my $lib_2 = $tzil->slurp_file('build/lib/DZT2.pm'); my $lib_3 = $tzil->slurp_file('build/lib/DZT3.pm'); my $lib_4 = $tzil->slurp_file('build/lib/DZT4.pm'); my $lib_5 = $tzil->slurp_file('build/lib/DZT5.pm'); my $lib_7 = $tzil->slurp_file('build/lib/DZT7.pm'); my $tst_0 = $tzil->slurp_file('build/t/basic.t' ); # e short for expected files # ------------------------------------------------------------------- my $elib_0 = <<'END LIB0'; use strict; use warnings; package DZT0; our $VERSION = '0.1.0'; # TRIAL VERSION # ABSTRACT: my abstract 1; END LIB0 my $elib_1 = <<'END LIB1'; use strict; use warnings; package DZT1; BEGIN { our $VERSION = '0.1.0'; # TRIAL VERSION } # ABSTRACT: my abstract 1; END LIB1 my $elib_2 = <<'END LIB2'; use strict; use warnings; package DZT2; 1; END LIB2 my $elib_3 = <<'END LIB3'; use strict; use warnings; package DZT3; # This is a comment 1; END LIB3 my $elib_4 = <<'END LIB4'; use strict; use warnings; package DZT4; our $VERSION = '0.1.0'; # TRIAL VERSION package DZT4::Inner; our $VERSION = '0.1.0'; # TRIAL VERSION 1; END LIB4 my $elib_5 = <<'END LIB5'; package DZT5; use strict; use warnings; our $VERSION = '0.1.0'; # TRIAL VERSION: foo 1; END LIB5 my $elib_7 = <<'END LIB7'; use strict; use warnings; package DZT7; our $VERSION = '0.1.0'; ## TRIAL VERSION # ABSTRACT: my abstract 1; END LIB7 my $etst_0 = <<'END TST0'; #!/usr/bin/perl # VERSION END TST0 # ------------------------------------------------------------------- is ( $lib_0, $elib_0, 'check DZT0.pm' ); is ( $lib_1, $elib_1, 'check DZT1.pm' ); is ( $lib_2, $elib_2, 'check DZT2.pm' ); is ( $lib_3, $elib_3, 'check DZT3.pm' ); is ( $lib_4, $elib_4, 'check DZT4.pm' ); is ( $lib_5, $elib_5, 'check DZT5.pm' ); is ( $lib_7, $elib_7, 'check DZT7.pm' ); is ( $tst_0, $etst_0, 'check basic.t' ); for my $file ( qw/DZT2 DZT3/ ) { like ( join( "\n", map { $_->{message} } @{ $tzil->chrome->logger->events } ), qr{Skipping: "lib/$file\.pm" has no "# VERSION" comment}, "warn no #VERSION in $file.pm" ); } done_testing; 01-basic.t100644001750001750 557713514111764 21415 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/t#!/usr/bin/perl use strict; use warnings; use Test::More; use Test::DZil; use Test::Version qw( version_ok ); use Path::Tiny qw( path ); my $tzil = Builder->from_config({ dist_root => 'corpus/DZT' }); $tzil->build; version_ok( path($tzil->tempdir)->child('build/lib/DZT0.pm')); version_ok( path($tzil->tempdir)->child('build/lib/DZT1.pm')); my $lib_0 = $tzil->slurp_file('build/lib/DZT0.pm'); my $lib_1 = $tzil->slurp_file('build/lib/DZT1.pm'); my $lib_2 = $tzil->slurp_file('build/lib/DZT2.pm'); my $lib_3 = $tzil->slurp_file('build/lib/DZT3.pm'); my $lib_4 = $tzil->slurp_file('build/lib/DZT4.pm'); my $lib_5 = $tzil->slurp_file('build/lib/DZT5.pm'); my $lib_6 = $tzil->slurp_file('build/lib/DZT6.pm'); my $lib_7 = $tzil->slurp_file('build/lib/DZT7.pm'); my $lib_8 = $tzil->slurp_file('build/lib/DZT8.pm'); my $tst_0 = $tzil->slurp_file('build/t/basic.t' ); # e short for expected files # ------------------------------------------------------------------- my $elib_0 = <<'END LIB0'; use strict; use warnings; package DZT0; our $VERSION = '0.1.0'; # VERSION # ABSTRACT: my abstract 1; END LIB0 my $elib_1 = <<'END LIB1'; use strict; use warnings; package DZT1; BEGIN { our $VERSION = '0.1.0'; # VERSION } # ABSTRACT: my abstract 1; END LIB1 my $elib_2 = <<'END LIB2'; use strict; use warnings; package DZT2; 1; END LIB2 my $elib_3 = <<'END LIB3'; use strict; use warnings; package DZT3; # This is a comment 1; END LIB3 my $elib_4 = <<'END LIB4'; use strict; use warnings; package DZT4; our $VERSION = '0.1.0'; # VERSION package DZT4::Inner; our $VERSION = '0.1.0'; # VERSION 1; END LIB4 my $elib_5 = <<'END LIB5'; package DZT5; use strict; use warnings; our $VERSION = '0.1.0'; # VERSION: foo 1; END LIB5 my $elib_6 = <<'END LIB6'; package DZT6; use strict; use warnings; our $VERSION = '0.1.0'; #VERSION 1; END LIB6 my $elib_7 = <<'END LIB7'; use strict; use warnings; package DZT7; our $VERSION = '0.1.0'; ## VERSION # ABSTRACT: my abstract 1; END LIB7 my $elib_8 = <<'END LIB8'; use strict; use warnings; package DZT8; <{message} } @{ $tzil->chrome->logger->events } ), qr{Skipping: "lib/$file\.pm" has no "# VERSION" comment}, "warn no #VERSION in $file.pm" ); } done_testing; perlcritic.rc100644001750001750 40013514111764 22110 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21severity = 3 verbose = 9 exclude = ValuesAndExpressions::ProhibitImplicitNewlines [Subroutines::ProhibitCallsToUndeclaredSubs] exempt_subs = Moose::with Moose::has [-ErrorHandling::RequireUseOfExceptions] [-ValuesAndExpressions::RequireNumericVersion] 02-vstring.t100644001750001750 77713514111764 22006 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/t#!/usr/bin/perl use strict; use warnings; use Test::More; use Test::DZil; use Test::Version qw( version_ok ); use Path::Tiny qw( path ); my $tzil = Builder->from_config({ dist_root => 'corpus/vDZT' }); $tzil->build; version_ok( path($tzil->tempdir)->child('build/lib/vDZT.pm')); my $lib = $tzil->slurp_file('build/lib/vDZT.pm'); my $expected_lib = <<'END LIB'; package vDZT; our $VERSION = 'v0.1.0'; # VERSION 1; # ABSTRACT: my abstract END LIB is ( $lib, $expected_lib, 'check vDZT.pm' ); done_testing; author-eol.t100644001750001750 130513514111764 22156 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/t BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.19 use Test::More 0.88; use Test::EOL; my @files = ( 'lib/Dist/Zilla/Plugin/OurPkgVersion.pm', 't/00-compile.t', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/01-basic.t', 't/02-vstring.t', 't/03-trial.t', 't/04-underscore.t', 't/05-skip_main_module.t', 't/06-overwrite.t', 't/07-semantic.t', 't/08-build_exceptions.t', 't/09-version_provider.t' ); eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; done_testing; 00-compile.t100644001750001750 266013514111764 21751 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/tuse 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.058 use Test::More; plan tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0); my @module_files = ( 'Dist/Zilla/Plugin/OurPkgVersion.pm' ); # no fake home requested my @switches = ( -d 'blib' ? '-Mblib' : '-Ilib', ); use File::Spec; use IPC::Open3; use IO::Handle; open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my @warnings; for my $lib (@module_files) { # see L my $stderr = IO::Handle->new; diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} } $^X, @switches, '-e', "require q[$lib]")) if $ENV{PERL_COMPILE_TEST_DEBUG}; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ and not eval { +require blib; blib->VERSION('1.01') }; if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ) if $ENV{AUTHOR_TESTING}; 07-semantic.t100644001750001750 142013514111764 22124 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/t#!/usr/bin/perl use strict; use warnings; use Test::More; use Test::DZil; use Test::Version qw( version_ok ); use Path::Tiny qw( path ); my $package = 'semanticDZT'; my $module = "$package.pm"; my $tzil = Builder->from_config( { dist_root => "corpus/$package" } ); $tzil->build; version_ok( path( $tzil->tempdir )->child("build/lib/$module") ); my $lib_0 = $tzil->slurp_file("build/lib/$module"); # e short for expected files # ------------------------------------------------------------------- my $elib_0 = <<"END LIB0"; package $package; use warnings; use strict; use version; our \$VERSION = 'v0.0.1'; # VERSION # ABSTRACT: my abstract 1; END LIB0 # ------------------------------------------------------------------- is( $lib_0, $elib_0, "check $module" ); done_testing; 06-overwrite.t100644001750001750 156613514111764 22361 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/t#!/usr/bin/perl use strict; use warnings; use Test::More; use Test::DZil; use Test::Version qw( version_ok ); use Path::Tiny qw( path ); my $tzil = Builder->from_config({ dist_root => 'corpus/oDZT' }); $tzil->build; version_ok( path($tzil->tempdir)->child('build/lib/oDZT.pm')); my $lib_0 = $tzil->slurp_file('build/lib/oDZT.pm'); # e short for expected files # ------------------------------------------------------------------- my $elib_0 = <<'END LIB8'; use strict; use warnings; package oDZT; # ABSTRACT: lots of false leads here <from_config({ dist_root => 'corpus/eDZT' }); $tzil->build; version_ok( path($tzil->tempdir)->child('build/lib/DZT0.pm')); my $lib_0 = $tzil->slurp_file('build/lib/DZT0.pm'); # e short for expected files # ------------------------------------------------------------------- my $elib_0 = <<'END LIB0'; use strict; use warnings; package DZT0; our $VERSION = '0.01_02'; # TRIAL VERSION $VERSION = eval $VERSION; # ABSTRACT: my abstract 1; END LIB0 # ------------------------------------------------------------------- is ( $lib_0, $elib_0, 'check DZT0.pm' ); done_testing; author-critic.t100644001750001750 40313514111764 22632 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/t#!perl BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } use strict; use warnings; use Test::Perl::Critic (-profile => "perlcritic.rc") x!! -e "perlcritic.rc"; all_critic_ok(); DZT000755001750001750 013514111764 21264 5ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpusdist.ini100644001750001750 31013514111764 23042 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/DZTname = DZT0 author = Caleb Cushing license = Artistic_2_0 version = 0.1.0 copyright_holder = Caleb Cushing [@Filter] -bundle = @Basic -remove = Readme [OurPkgVersion] author-mojibake.t100644001750001750 35313514111764 23142 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/t#!perl BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } use strict; use warnings qw(all); use Test::More; use Test::Mojibake; all_files_encoding_ok(); oDZT000755001750001750 013514111764 21443 5ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpusdist.ini100644001750001750 26313514111764 23230 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/oDZTname = oDZT author = Caleb Cushing license = Artistic_2_0 version = v0.1.0 copyright_holder = Caleb Cushing [@Basic] [OurPkgVersion] overwrite = 1 eDZT000755001750001750 013514111764 21431 5ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpusdist.ini100644001750001750 37713514111764 23224 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/eDZTname = DZT0 author = Caleb Cushing license = Artistic_2_0 version = 0.01_02 copyright_holder = Caleb Cushing release_status = testing [@Filter] -bundle = @Basic -remove = Readme [OurPkgVersion] underscore_eval_version = 1 t000755001750001750 013514111764 21527 5ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/DZTbasic.t100644001750001750 3213514111764 23070 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/DZT/t#!/usr/bin/perl # VERSION vDZT000755001750001750 013514111764 21452 5ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpusdist.ini100644001750001750 24513514111764 23237 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/vDZTname = vDZT author = Caleb Cushing license = Artistic_2_0 version = v0.1.0 copyright_holder = Caleb Cushing [@Basic] [OurPkgVersion] sDZT000755001750001750 013514111764 21447 5ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpusdist.ini100644001750001750 33613514111764 23235 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/sDZTname = DZT0 author = Caleb Cushing license = Artistic_2_0 version = 0.1.0 copyright_holder = Caleb Cushing [@Filter] -bundle = @Basic -remove = Readme [OurPkgVersion] skip_main_module = 1 release-distmeta.t100644001750001750 40113514111764 23303 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/t#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { print qq{1..0 # SKIP these tests are for release candidate testing\n}; exit } } # This file was automatically generated by Dist::Zilla::Plugin::MetaTests. use Test::CPAN::Meta; meta_yaml_ok(); release-kwalitee.t100644001750001750 50413514111764 23302 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/t BEGIN { unless ($ENV{RELEASE_TESTING}) { print qq{1..0 # SKIP these tests are for release candidate testing\n}; exit } } # this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.12 use strict; use warnings; use Test::More 0.88; use Test::Kwalitee 1.21 'kwalitee_ok'; kwalitee_ok(); done_testing; author-pod-spell.t100644001750001750 137313514111764 23303 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/t BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } use strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::PodSpelling 2.007005 use Test::Spelling 0.12; use Pod::Wordlist; add_stopwords(); all_pod_files_spelling_ok( qw( bin lib ) ); __DATA__ Alceu Alexandr Alexei Caleb Christian Christopher Ciornii Conrad Cushing David Dist FileFinder Freitas Golden Graham Grahan Ian Jemmeson Junior Loyd Madsen Michael Ollis OurPkgVersion Plugin Rodrigues Sealy Stephan SubmittingPatches Walde Zilla Znamensky alceu alexchorny arfreitas dagolden de dev dzil executables git ini lib mike mjemmeson perl perltidy plicease russoz stephanloyd9 walde xenoterracide 00-report-prereqs.t100644001750001750 1342613514111764 23335 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/t#!perl use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.027 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'; # 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'; my $cpan_meta_error; if ( $source && $HAS_CPAN_META && (my $meta = eval { CPAN::Meta->load_file($source) } ) ) { $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); } else { $cpan_meta_error = $@; # capture error from CPAN::Meta->load_file($source) $source = 'static metadata'; } my @full_reports; my @dep_errors; my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; # Add static includes into a fake section for my $mod (@include) { $req_hash->{other}{modules}{$mod} = 0; } for my $phase ( qw(configure build test runtime develop other) ) { next unless $req_hash->{$phase}; next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); for my $type ( qw(requires recommends suggests conflicts modules) ) { 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 ); if ($type eq 'modules') { splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; } else { 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 ( $cpan_meta_error || @dep_errors ) { diag "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n"; } if ( $cpan_meta_error ) { my ($orig_source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; diag "\nCPAN::Meta->load_file('$orig_source') failed with: $cpan_meta_error\n"; } if ( @dep_errors ) { diag join("\n", "\nThe following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); } pass; # vim: ts=4 sts=4 sw=4 et: author-pod-syntax.t100644001750001750 45413514111764 23471 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/t#!perl BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); release-meta-json.t100644001750001750 27313514111764 23375 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/t#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { print qq{1..0 # SKIP these tests are for release candidate testing\n}; exit } } use Test::CPAN::Meta::JSON; meta_json_ok(); error2000755001750001750 013514111764 22036 5ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpusdist.ini100644001750001750 30113514111764 23614 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/error2name = semanticDZT author = Caleb Cushing license = Artistic_2_0 version = v0.0;1 copyright_holder = Caleb Cushing [@Basic] [OurPkgVersion] semantic_version = 1 error1000755001750001750 013514111764 22035 5ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpusdist.ini100644001750001750 33513514111764 23622 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/error1name = semanticDZT author = Caleb Cushing license = Artistic_2_0 version = v0.0.1 copyright_holder = Caleb Cushing [@Basic] [OurPkgVersion] semantic_version = 1 underscore_eval_version = 1 lib000755001750001750 013514111764 22032 5ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/DZTDZT2.pm100644001750001750 5313514111764 23211 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/DZT/libuse strict; use warnings; package DZT2; 1; DZT4.pm100644001750001750 12413514111764 23232 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/DZT/libuse strict; use warnings; package DZT4; # VERSION package DZT4::Inner; # VERSION 1; DZT7.pm100644001750001750 11613514111764 23236 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/DZT/libuse strict; use warnings; package DZT7; ## VERSION # ABSTRACT: my abstract 1; DZT8.pm100644001750001750 21013514111764 23232 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/DZT/libuse strict; use warnings; package DZT8; < { 'requires' => { 'ExtUtils::MakeMaker' => '0' } }, 'develop' => { 'requires' => { 'Perl::Critic::More' => '1.003', 'Perl::Critic::Pulp' => '96', 'Pod::Coverage::TrustPod' => '0', 'Test::CPAN::Changes' => '0.19', 'Test::CPAN::Meta' => '0', 'Test::CPAN::Meta::JSON' => '0.16', 'Test::EOL' => '0', 'Test::Kwalitee' => '1.21', 'Test::MinimumVersion' => '0', 'Test::Mojibake' => '0', 'Test::More' => '0.88', 'Test::Perl::Critic' => '0', 'Test::Pod' => '1.41', 'Test::Pod::Coverage' => '1.10', 'Test::Portability::Files' => '0', 'Test::Spelling' => '0.12', 'Test::Version' => '1' } }, 'runtime' => { 'requires' => { 'Dist::Zilla' => '6.00', 'Dist::Zilla::Role::FileFinderUser' => '0', 'Dist::Zilla::Role::FileMunger' => '0', 'Dist::Zilla::Role::PPI' => '0', 'Moose' => '0', 'MooseX::Types::Perl' => '0', 'PPI' => '0', 'namespace::autoclean' => '0', 'perl' => '5.014' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'Dist::Zilla::Role::VersionProvider' => '0', 'ExtUtils::MakeMaker' => '0', 'Path::Tiny' => '0', 'Test::DZil' => '0', 'Test::Exception' => '0', 'Test::Version' => '0.04' } } }; $x; }author-portability.t100644001750001750 47113514111764 23724 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/t BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } use strict; use warnings; use Test::More; eval 'use Test::Portability::Files'; plan skip_all => 'Test::Portability::Files required for testing portability' if $@; run_tests(); 09-version_provider.t100644001750001750 73413514111764 23711 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/t#!/usr/bin/perl use strict; use warnings; use 5.014; use Test::More; use Test::DZil; use Test::Version qw( version_ok ); use Path::Tiny qw( path ); package Dist::Zilla::Plugin::MyVersionProvider { use Moose; with 'Dist::Zilla::Role::VersionProvider'; sub provide_version { '1.00'; } } my $tzil = Builder->from_config({ dist_root => 'corpus/version_provider' }); $tzil->build; version_ok( path($tzil->tempdir)->child('build/lib/DZT0.pm')); done_testing; 05-skip_main_module.t100644001750001750 174313514111764 23646 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/t#!/usr/bin/perl # test that skip_main_module ignores the main module (DZT0.pm in this case) use strict; use warnings; use Test::More; use Test::DZil; use Test::Version qw( version_ok ); use Path::Tiny qw( path ); my $tzil = Builder->from_config({ dist_root => 'corpus/sDZT' }); $tzil->build; version_ok( path($tzil->tempdir)->child('build/lib/DZT1.pm')); my $lib_0 = $tzil->slurp_file('build/lib/DZT0.pm'); my $lib_1 = $tzil->slurp_file('build/lib/DZT1.pm'); # e short for expected files # ------------------------------------------------------------------- my $elib_0 = <<'END LIB0'; use strict; use warnings; package DZT0; # VERSION # ABSTRACT: my abstract 1; END LIB0 my $elib_1 = <<'END LIB1'; use strict; use warnings; package DZT1; BEGIN { our $VERSION = '0.1.0'; # VERSION } # ABSTRACT: my abstract 1; END LIB1 # ------------------------------------------------------------------- is ( $lib_0, $elib_0, 'check DZT0.pm' ); is ( $lib_1, $elib_1, 'check DZT1.pm' ); done_testing; 08-build_exceptions.t100644001750001750 70113514111764 23643 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/tuse strict; use warnings; use Test::More; use Test::Exception; use Test::DZil; my $package = 'error1'; my $module = "$package.pm"; dies_ok { Builder->from_config( { dist_root => "corpus/$package" } ) } 'cannot use both underscore_eval_version and semantic_version attributes'; $package = 'error2'; $module = "$package.pm"; dies_ok { Builder->from_config( { dist_root => "corpus/$package" } ) } 'rejects invalid version number'; done_testing; lib000755001750001750 013514111764 22211 5ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/oDZToDZT.pm100644001750001750 41213514111764 23504 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/oDZT/libuse strict; use warnings; package oDZT; # ABSTRACT: lots of false leads here < 0, has_version => 1, multiple => 0, }; push @imports, $params if version->parse( $Test::Version::VERSION ) >= version->parse('1.002'); Test::Version->import(@imports); version_all_ok; done_testing; release-unused-vars.t100644001750001750 57113514111764 23755 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/t#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { print qq{1..0 # SKIP these tests are for release candidate testing\n}; exit } } use Test::More 0.96 tests => 1; eval { require Test::Vars }; SKIP: { skip 1 => 'Test::Vars required for testing for unused vars' if $@; Test::Vars->import; subtest 'unused vars' => sub { all_vars_ok(); }; }; author-pod-coverage.t100644001750001750 53613514111764 23737 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/t#!perl BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } # 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' }); maint000755001750001750 013514111764 20420 5ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21cip-before-install100755001750001750 34613514111764 24150 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/maint#!/bin/bash set -ex cip sudo apt-get update cip sudo apt-get -y install git cip exec cpanm -n Test::Perl::Critic Test::EOL Test::MinimumVersion Test::Mojibake Test::Pod::Coverage Test::Spelling Test::Pod Pod::Coverage::TrustPod release-cpan-changes.t100644001750001750 55313514111764 24030 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/t BEGIN { unless ($ENV{RELEASE_TESTING}) { print qq{1..0 # SKIP these tests are for release candidate testing\n}; exit } } use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::CPAN::Changes 0.012 use Test::More 0.96 tests => 1; use Test::CPAN::Changes; subtest 'changes_ok' => sub { changes_file_ok('Changes'); }; lib000755001750001750 013514111764 22604 5ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/error2DZT0.pm100644001750001750 11513514111764 24000 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/error2/libuse strict; use warnings; package DZT0; # VERSION # ABSTRACT: my abstract 1; lib000755001750001750 013514111764 22603 5ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/error1DZT0.pm100644001750001750 11513514111764 23777 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/error1/libuse strict; use warnings; package DZT0; # VERSION # ABSTRACT: my abstract 1; release-dist-manifest.t100644001750001750 43713514111764 24251 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/t#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { print qq{1..0 # SKIP these tests are for release candidate testing\n}; exit } } use Test::More; eval "use Test::DistManifest"; plan skip_all => "Test::DistManifest required for testing the manifest" if $@; manifest_ok(); author-minimum-version.t100644001750001750 35613514111764 24522 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/t BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } use strict; use warnings; use Test::More; use Test::MinimumVersion; all_minimum_version_from_metayml_ok(); semanticDZT000755001750001750 013514111764 23010 5ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpusdist.ini100644001750001750 30113514111764 24566 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/semanticDZTname = semanticDZT author = Caleb Cushing license = Artistic_2_0 version = v0.0.1 copyright_holder = Caleb Cushing [@Basic] [OurPkgVersion] semantic_version = 1 version_provider000755001750001750 013514111764 24222 5ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpusdist.ini100644001750001750 34613514111764 26011 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/version_providername = DZT0 author = Caleb Cushing license = Artistic_2_0 copyright_holder = Caleb Cushing release_status = testing [@Filter] -bundle = @Basic -remove = Readme [OurPkgVersion] [MyVersionProvider] lib000755001750001750 013514111764 24770 5ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/version_providerDZT0.pm100644001750001750 11513514111764 26164 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/version_provider/libuse strict; use warnings; package DZT0; # VERSION # ABSTRACT: my abstract 1; lib000755001750001750 013514111764 23556 5ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/semanticDZTsemanticDZT.pm100644001750001750 12413514111764 26416 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/corpus/semanticDZT/libpackage semanticDZT; use warnings; use strict; # VERSION # ABSTRACT: my abstract 1; Plugin000755001750001750 013514111764 23272 5ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/lib/Dist/ZillaOurPkgVersion.pm100644001750001750 2562713514111764 26601 0ustar00ollisgollisg000000000000Dist-Zilla-Plugin-OurPkgVersion-0.21/lib/Dist/Zilla/Pluginpackage Dist::Zilla::Plugin::OurPkgVersion; use 5.014; use strict; use warnings; our $VERSION = '0.21'; # VERSION use Moose; with ( 'Dist::Zilla::Role::FileMunger', 'Dist::Zilla::Role::FileFinderUser' => { default_finders => [ ':InstallModules', ':PerlExecFiles', ], }, 'Dist::Zilla::Role::PPI', ); use Carp qw( confess ); use PPI; use MooseX::Types::Perl qw( LaxVersionStr ); use namespace::autoclean; has underscore_eval_version => ( is => 'ro', isa => 'Bool', default => 0, ); has semantic_version => ( is => 'ro', isa => 'Bool', default => 0, ); has skip_main_module => ( is => 'ro', isa => 'Bool', default => 0, ); has overwrite => ( is => 'ro', isa => 'Bool', default => 0, ); has no_critic => ( is => 'ro', isa => 'Bool', default => 0, ); sub munge_files { my $self = shift; $self->munge_file($_) for grep { $self->skip_main_module ? $_->name ne $self->zilla->main_module->name : 1 } @{ $self->found_files }; return; } sub BUILD { my $self = shift; if ($self->underscore_eval_version && $self->semantic_version) { confess 'You cannot setup both underscore_eval_version and semantic_version'; } return 1; } sub munge_file { ## no critic (Subroutines::ProhibitExcessComplexity) my ( $self, $file ) = @_; if ( $file->name =~ m/\.pod$/ixms ) { $self->log_debug( 'Skipping: "' . $file->name . '" is pod only'); return; } my $version = $self->zilla->version; confess 'invalid characters in version' unless LaxVersionStr->check( $version ); ## no critic (Modules::RequireExplicitInclusion) my $doc = $self->ppi_document_for_file($file); return unless defined $doc; $doc->index_locations if $self->overwrite; # optimize calls to check line numbers my $comments = $doc->find('PPI::Token::Comment'); my $version_regex = q{ ^ (\s*) # capture leading whitespace for whole-line comments ( \#\#?\s*VERSION # capture # VERSION or ## VERSION \b # and ensure it ends on a word boundary [ # conditionally [:print:] # all printable characters after VERSION \s # any whitespace including newlines - GH #5 ]* # as many of the above as there are ) $ # until the EOL} ; my $munged_version = 0; if ( ref($comments) eq 'ARRAY' ) { foreach ( @{ $comments } ) { if ( /$version_regex/xms ) { my ( $ws, $comment ) = ( $1, $2 ); $comment =~ s/(?=\bVERSION\b)/TRIAL /x if $self->zilla->is_trial; my $code = "$ws" . q{our $VERSION = '} . $version . qq{'; $comment} ; if ( $self->semantic_version ) { confess 'Invalid semantic version syntax declaration in INI file' unless ( $version =~ /^v\d+\.\d+\.\d+$/x ); $code = "use version;\n" . $code; } # If the comment is not a whole-line comment, and if the user wants to overwrite # existing "our $VERSION=...;", then find the other tokens from this line, looking # for our $VERSION = $VALUE. If found, edit only the VALUE. if ( $self->overwrite && !$_->line ) { my $line_no = $_->line_number; my $nodes = $doc->find( sub { $_[1]->line_number == $line_no } ); my $version_value_token = $nodes && $self->_identify_version_value_token(@$nodes); if ( $version_value_token ) { $version_value_token->set_content(qq{'$version'}); $code = $ws . $comment; $munged_version++; } } if ( $version =~ /_/ && $self->underscore_eval_version ) { my $eval = "\$VERSION = eval \$VERSION;"; $eval .= " ## no critic (BuiltinFunctions::ProhibitStringyEval)" if $self->no_critic; $code .= $_->line? "$eval\n" : "\n$eval"; } $_->set_content($code); $munged_version++; } } } if ( $munged_version ) { $self->save_ppi_document_to_file( $doc, $file); $self->log_debug([ 'adding $VERSION assignment to %s', $file->name ]); } else { $self->log( 'Skipping: "' . $file->name . '" has no "# VERSION" comment' ); } return; } sub _identify_version_value_token { my ( $self, @tokens ) = @_; my $val_tok; my @want = ('our', '$VERSION', '=', undef, ';'); my $i = 0; for ( @tokens ) { next if $_->isa('PPI::Token::Whitespace'); # If the next thing we want is "undef", this is where we capture the value token. if (!defined $want[$i]) { $val_tok = $_; ++$i; } # Else if the token matches the current step in the sequence, advance the sequence # If sequence completely matched, return. elsif ($want[$i] eq $_->content) { ++$i; return $val_tok if $i >= $#want; } # A mismatch restarts the search elsif ($i) { $i = 0; } } return; # no match } __PACKAGE__->meta->make_immutable; 1; # ABSTRACT: No line insertion and does Package version with our __END__ =pod =head1 NAME Dist::Zilla::Plugin::OurPkgVersion - No line insertion and does Package version with our =head1 VERSION version 0.21 =head1 SYNOPSIS in dist.ini [OurPkgVersion] in your modules # VERSION =head1 DESCRIPTION This module was created as an alternative to L and uses some code from that module. This module is designed to use a the more readable format C as well as not change then number of lines of code in your files, which will keep your repository more in sync with your CPAN release. It also allows you slightly more freedom in how you specify your version. =head2 EXAMPLES in dist.ini ... version = 0.01; [OurPkgVersion] in lib/My/Module.pm package My::Module; # VERSION ... output lib/My/Module.pm package My::Module; our $VERSION = '0.01'; # VERSION ... please note that whitespace before the comment is significant so package My::Module; BEGIN { # VERSION } ... becomes package My::Module; BEGIN { our $VERSION = '0.01'; # VERSION } ... while package My::Module; BEGIN { # VERSION } ... becomes package My::Module; BEGIN { our $VERSION = '0.01'; # VERSION } ... you can also add additional comments to your comment ... # VERSION: generated by DZP::OurPkgVersion ... becomes ... our $VERSION = '0.1.0'; # VERSION: generated by DZP::OurPkgVersion ... you can also use perltidy's default static side comments (##) ... ## VERSION ... becomes ... our $VERSION = '0.1.0'; ## VERSION ... Also note, the package line is not in any way significant, it will insert the C line anywhere in the file before C<# VERSION> as many times as you've written C<# VERSION> regardless of whether or not inserting it there is a good idea. OurPkgVersion will not insert a version unless you have C<# VERSION> so it is a bit more work. If you make a trial release, the comment will be altered to say so: # VERSION becomes our $VERSION = '0.01'; # TRIAL VERSION =encoding UTF-8 =head1 METHODS =over =item BUILD Provides validations after object creation. =item munge_files Override the default provided by L to limit the number of files to search to only be modules and executables. =item munge_file tells which files to munge, see L. =item finder Override the default L for finding files to check and update. The default value is C<:InstallModules> and C<:PerlExecFiles> (when available; otherwise C<:ExecFiles>) -- see also L, to make sure the script files are properly marked as executables for the installer. =back =head1 PROPERTIES =over =item underscore_eval_version For version numbers that have an underscore in them, add this line immediately after the our version assignment: $VERSION = eval $VERSION; This is arguably the correct thing to do, but changes the line numbering of the generated Perl module or source, and thus optional. =item semantic_version Setting this property to "true" (1) will set the version of the module/distribution to properly use semantic versioning. It will also expect that you setup C with a v-string, without adding quotes. For example: version = v0.0.1 Beware you can't setup both C and C since both are mutually exclusive: if you try, your code is going to C. For more details, check L for more details about using semantic version with Perl. =item skip_main_module Set to true to ignore the main module in the distribution. This prevents a warning when using L to obtain the version number instead of the C file. =item overwrite When enabled, this option causes any match of the C<< # VERSION >> comment to first check for an existing C<< our $VERSION = ...; >> on the same line, and if found, overwrite the value in the existing statement. (the comment still gets modified for trial releases) Currently, the value must be a single Perl token such as a string or number. =item no_critic When C is used the generated code for dev versions may not technically be L compliant due to string eval, but is nevertheless pretty safe. This option will add the appropriate C directive to save you the hassle. =back =head1 BUGS Please report any bugs or feature requests on the bugtracker website L When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =head1 CONTRIBUTORS =for stopwords Alceu Rodrigues de Freitas Junior Ian Sealy Michael Conrad Jemmeson Stephan Loyd Alexandr Ciornii Alexei Znamensky Christian Walde Christopher J. Madsen David Golden Graham Ollis Graham✈️✈️ =over 4 =item * Alceu Rodrigues de Freitas Junior =item * Ian Sealy =item * Michael Conrad =item * Michael Jemmeson =item * Stephan Loyd =item * Alceu Rodrigues de Freitas Junior =item * Alexandr Ciornii =item * Alexei Znamensky =item * Christian Walde =item * Christopher J. Madsen =item * David Golden =item * Graham Ollis =item * Graham Ollis =item * Graham✈️✈️ =back =head1 AUTHORS =over 4 =item * Caleb Cushing =item * Grahan Ollis =back =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2019 by Caleb Cushing. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) =cut