Dist-Zilla-Plugin-OurPkgVersion-0.12/0000755000175000017500000000000013131105223016752 5ustar ollisgollisgDist-Zilla-Plugin-OurPkgVersion-0.12/lib/0000755000175000017500000000000013131105223017520 5ustar ollisgollisgDist-Zilla-Plugin-OurPkgVersion-0.12/lib/Dist/0000755000175000017500000000000013131105223020423 5ustar ollisgollisgDist-Zilla-Plugin-OurPkgVersion-0.12/lib/Dist/Zilla/0000755000175000017500000000000013131105223021476 5ustar ollisgollisgDist-Zilla-Plugin-OurPkgVersion-0.12/lib/Dist/Zilla/Plugin/0000755000175000017500000000000013131105223022734 5ustar ollisgollisgDist-Zilla-Plugin-OurPkgVersion-0.12/lib/Dist/Zilla/Plugin/OurPkgVersion.pm0000644000175000017500000001550413131105223026054 0ustar ollisgollisgpackage Dist::Zilla::Plugin::OurPkgVersion; use 5.008; use strict; use warnings; our $VERSION = '0.12'; # VERSION use Moose; with ( 'Dist::Zilla::Role::FileMunger', 'Dist::Zilla::Role::FileFinderUser' => { default_finders => [ ':InstallModules', ( eval { Dist::Zilla::Dist::Builder->VERSION('5.038'); 1 } ? ':PerlExecFiles' : ':ExecFiles' ) ], }, '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 => 'Int', default => 0, ); sub munge_files { my $self = shift; $self->munge_file($_) for @{ $self->found_files }; return; } sub munge_file { 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; my $comments = $doc->find('PPI::Token::Comment'); my $version_regex = q{ ^ (\s*) # capture all whitespace before comment ( \#\#?\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 ( $version =~ /_/ && $self->underscore_eval_version ) { $code.= "\$VERSION = eval \$VERSION;\n"; } $_->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; } __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.12 =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 =head1 METHODS =over =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. =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 Alexandr Ciornii Alexei Znamensky Christian Walde Christopher J. Madsen David Golden Graham Ollis Ian Sealy Stephan Loyd =over 4 =item * Alexandr Ciornii =item * Alexei Znamensky =item * Christian Walde =item * Christopher J. Madsen =item * David Golden =item * Graham Ollis =item * Graham Ollis =item * Ian Sealy =item * Stephan Loyd =back =head1 AUTHORS =over 4 =item * Caleb Cushing =item * Grahan Ollis =back =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2017 by Caleb Cushing. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) =cut Dist-Zilla-Plugin-OurPkgVersion-0.12/META.json0000644000175000017500000000642413131105223020401 0ustar ollisgollisg{ "abstract" : "No line insertion and does Package version with our", "author" : [ "Caleb Cushing ", "Grahan Ollis " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.009, 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" : { "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.08", "Test::Pod::LinkCheck" : "0", "Test::Portability::Files" : "0", "Test::Spelling" : "0.12", "Test::Version" : "1" } }, "runtime" : { "requires" : { "Carp" : "0", "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.008", "strict" : "0", "warnings" : "0" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "ExtUtils::MakeMaker" : "0", "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Path::Tiny" : "0", "Test::DZil" : "0", "Test::More" : "0", "Test::Version" : "0.04", "blib" : "1.01" } } }, "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.12", "x_contributors" : [ "Alexandr Ciornii ", "Alexei Znamensky ", "Christian Walde ", "Christopher J. Madsen ", "David Golden ", "Graham Ollis ", "Graham Ollis ", "Ian Sealy ", "Stephan Loyd " ], "x_serialization_backend" : "Cpanel::JSON::XS version 3.0233" } Dist-Zilla-Plugin-OurPkgVersion-0.12/Changes0000644000175000017500000000564113131105223020253 0ustar ollisgollisgRevision history for Dist-Zilla-Plugin-OurPkgVersion 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 Dist-Zilla-Plugin-OurPkgVersion-0.12/LICENSE0000644000175000017500000002152213131105223017761 0ustar ollisgollisgThis software is Copyright (c) 2017 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-Zilla-Plugin-OurPkgVersion-0.12/README0000644000175000017500000001067213131105223017640 0ustar ollisgollisgNAME Dist::Zilla::Plugin::OurPkgVersion - No line insertion and does Package version with our VERSION version 0.12 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 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. 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 * Alexandr Ciornii * Alexei Znamensky * Christian Walde * Christopher J. Madsen * David Golden * Graham Ollis * Graham Ollis * Ian Sealy * Stephan Loyd AUTHORS * Caleb Cushing * Grahan Ollis COPYRIGHT AND LICENSE This software is Copyright (c) 2017 by Caleb Cushing. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) Dist-Zilla-Plugin-OurPkgVersion-0.12/corpus/0000755000175000017500000000000013131105223020265 5ustar ollisgollisgDist-Zilla-Plugin-OurPkgVersion-0.12/corpus/vDZT/0000755000175000017500000000000013131105223021114 5ustar ollisgollisgDist-Zilla-Plugin-OurPkgVersion-0.12/corpus/vDZT/lib/0000755000175000017500000000000013131105223021662 5ustar ollisgollisgDist-Zilla-Plugin-OurPkgVersion-0.12/corpus/vDZT/lib/vDZT.pm0000644000175000017500000000006313131105223023046 0ustar ollisgollisgpackage vDZT; # VERSION 1; # ABSTRACT: my abstract Dist-Zilla-Plugin-OurPkgVersion-0.12/corpus/vDZT/dist.ini0000644000175000017500000000024513131105223022561 0ustar ollisgollisgname = vDZT author = Caleb Cushing license = Artistic_2_0 version = v0.1.0 copyright_holder = Caleb Cushing [@Basic] [OurPkgVersion] Dist-Zilla-Plugin-OurPkgVersion-0.12/corpus/eDZT/0000755000175000017500000000000013131105223021073 5ustar ollisgollisgDist-Zilla-Plugin-OurPkgVersion-0.12/corpus/eDZT/lib/0000755000175000017500000000000013131105223021641 5ustar ollisgollisgDist-Zilla-Plugin-OurPkgVersion-0.12/corpus/eDZT/lib/DZT0.pm0000644000175000017500000000011513131105223022715 0ustar ollisgollisguse strict; use warnings; package DZT0; # VERSION # ABSTRACT: my abstract 1; Dist-Zilla-Plugin-OurPkgVersion-0.12/corpus/eDZT/dist.ini0000644000175000017500000000034613131105223022542 0ustar ollisgollisgname = DZT0 author = Caleb Cushing license = Artistic_2_0 version = 0.01_02 copyright_holder = Caleb Cushing [@Filter] -bundle = @Basic -remove = Readme [OurPkgVersion] underscore_eval_version = 1 Dist-Zilla-Plugin-OurPkgVersion-0.12/corpus/DZT/0000755000175000017500000000000013131105223020726 5ustar ollisgollisgDist-Zilla-Plugin-OurPkgVersion-0.12/corpus/DZT/lib/0000755000175000017500000000000013131105223021474 5ustar ollisgollisgDist-Zilla-Plugin-OurPkgVersion-0.12/corpus/DZT/lib/DZT3.pm0000644000175000017500000000007713131105223022562 0ustar ollisgollisguse strict; use warnings; package DZT3; # This is a comment 1; Dist-Zilla-Plugin-OurPkgVersion-0.12/corpus/DZT/lib/DZT7.pm0000644000175000017500000000011613131105223022560 0ustar ollisgollisguse strict; use warnings; package DZT7; ## VERSION # ABSTRACT: my abstract 1; Dist-Zilla-Plugin-OurPkgVersion-0.12/corpus/DZT/lib/DZT4.pm0000644000175000017500000000012413131105223022554 0ustar ollisgollisguse strict; use warnings; package DZT4; # VERSION package DZT4::Inner; # VERSION 1; Dist-Zilla-Plugin-OurPkgVersion-0.12/corpus/DZT/lib/DZT6.pm0000644000175000017500000000006413131105223022561 0ustar ollisgollisgpackage DZT6; use strict; use warnings; #VERSION 1; Dist-Zilla-Plugin-OurPkgVersion-0.12/corpus/DZT/lib/DZT5.pm0000644000175000017500000000007213131105223022557 0ustar ollisgollisgpackage DZT5; use strict; use warnings; # VERSION: foo 1; Dist-Zilla-Plugin-OurPkgVersion-0.12/corpus/DZT/lib/DZT2.pm0000644000175000017500000000005313131105223022553 0ustar ollisgollisguse strict; use warnings; package DZT2; 1; Dist-Zilla-Plugin-OurPkgVersion-0.12/corpus/DZT/lib/DZT0.pm0000644000175000017500000000011513131105223022550 0ustar ollisgollisguse strict; use warnings; package DZT0; # VERSION # ABSTRACT: my abstract 1; Dist-Zilla-Plugin-OurPkgVersion-0.12/corpus/DZT/lib/DZT1.pm0000644000175000017500000000013013131105223022546 0ustar ollisgollisguse strict; use warnings; package DZT1; BEGIN { # VERSION } # ABSTRACT: my abstract 1; Dist-Zilla-Plugin-OurPkgVersion-0.12/corpus/DZT/dist.ini0000644000175000017500000000031013131105223022364 0ustar ollisgollisgname = DZT0 author = Caleb Cushing license = Artistic_2_0 version = 0.1.0 copyright_holder = Caleb Cushing [@Filter] -bundle = @Basic -remove = Readme [OurPkgVersion] Dist-Zilla-Plugin-OurPkgVersion-0.12/corpus/DZT/t/0000755000175000017500000000000013131105223021171 5ustar ollisgollisgDist-Zilla-Plugin-OurPkgVersion-0.12/corpus/DZT/t/basic.t0000644000175000017500000000003213131105223022432 0ustar ollisgollisg#!/usr/bin/perl # VERSION Dist-Zilla-Plugin-OurPkgVersion-0.12/t/0000755000175000017500000000000013131105223017215 5ustar ollisgollisgDist-Zilla-Plugin-OurPkgVersion-0.12/t/author-test-version.t0000644000175000017500000000104113131105223023340 0ustar ollisgollisg 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::Version 1.09 use Test::Version; my @imports = qw( version_all_ok ); my $params = { is_strict => 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; Dist-Zilla-Plugin-OurPkgVersion-0.12/t/author-pod-syntax.t0000644000175000017500000000045413131105223023013 0ustar ollisgollisg#!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(); Dist-Zilla-Plugin-OurPkgVersion-0.12/t/author-portability.t0000644000175000017500000000047113131105223023246 0ustar ollisgollisg 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(); Dist-Zilla-Plugin-OurPkgVersion-0.12/t/00-report-prereqs.t0000644000175000017500000001342613131105223022617 0ustar ollisgollisg#!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: Dist-Zilla-Plugin-OurPkgVersion-0.12/t/00-compile.t0000644000175000017500000000265713131105223021261 0ustar ollisgollisguse 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.056 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}; Dist-Zilla-Plugin-OurPkgVersion-0.12/t/release-unused-vars.t0000644000175000017500000000057113131105223023277 0ustar ollisgollisg#!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(); }; }; Dist-Zilla-Plugin-OurPkgVersion-0.12/t/author-pod-spell.t0000644000175000017500000000123613131105223022603 0ustar ollisgollisg 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.007004 use Test::Spelling 0.12; use Pod::Wordlist; add_stopwords(); all_pod_files_spelling_ok( qw( bin lib ) ); __DATA__ Alexandr Alexei Caleb Christian Christopher Ciornii Cushing David Dist FileFinder Golden Graham Grahan Ian Loyd Madsen Ollis OurPkgVersion Plugin Sealy Stephan SubmittingPatches Walde Zilla Znamensky alexchorny dagolden dzil executables git ini lib perl perltidy plicease russoz stephanloyd9 walde xenoterracide Dist-Zilla-Plugin-OurPkgVersion-0.12/t/release-cpan-changes.t0000644000175000017500000000055313131105223023352 0ustar ollisgollisg 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'); }; Dist-Zilla-Plugin-OurPkgVersion-0.12/t/author-mojibake.t0000644000175000017500000000035313131105223022464 0ustar ollisgollisg#!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(); Dist-Zilla-Plugin-OurPkgVersion-0.12/t/author-eol.t0000644000175000017500000000202013131105223021453 0ustar ollisgollisg 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/author-critic.t', 't/author-eol.t', 't/author-mojibake.t', 't/author-pod-coverage.t', 't/author-pod-linkcheck.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-minimum-version.t', 't/release-unused-vars.t' ); eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; done_testing; Dist-Zilla-Plugin-OurPkgVersion-0.12/t/release-meta-json.t0000644000175000017500000000027313131105223022717 0ustar ollisgollisg#!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(); Dist-Zilla-Plugin-OurPkgVersion-0.12/t/02-vstring.t0000644000175000017500000000077713131105223021330 0ustar ollisgollisg#!/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; Dist-Zilla-Plugin-OurPkgVersion-0.12/t/04-underscore.t0000644000175000017500000000133613131105223021777 0ustar ollisgollisg#!/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/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; Dist-Zilla-Plugin-OurPkgVersion-0.12/t/03-trial.t0000644000175000017500000000470513131105223020743 0ustar ollisgollisg#!/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; Dist-Zilla-Plugin-OurPkgVersion-0.12/t/release-minimum-version.t0000644000175000017500000000047713131105223024166 0ustar ollisgollisg#!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::MinimumVersion"; plan skip_all => "Test::MinimumVersion required for testing minimum versions" if $@; all_minimum_version_from_metayml_ok(); Dist-Zilla-Plugin-OurPkgVersion-0.12/t/author-pod-coverage.t0000644000175000017500000000053613131105223023261 0ustar ollisgollisg#!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' }); Dist-Zilla-Plugin-OurPkgVersion-0.12/t/01-basic.t0000644000175000017500000000513513131105223020705 0ustar ollisgollisg#!/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 $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 $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_6, $elib_6, 'check DZT6.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; Dist-Zilla-Plugin-OurPkgVersion-0.12/t/author-pod-linkcheck.t0000644000175000017500000000074113131105223023417 0ustar ollisgollisg#!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::More; foreach my $env_skip ( qw( SKIP_POD_LINKCHECK ) ){ plan skip_all => "\$ENV{$env_skip} is set, skipping" if $ENV{$env_skip}; } eval "use Test::Pod::LinkCheck"; if ( $@ ) { plan skip_all => 'Test::Pod::LinkCheck required for testing POD'; } else { Test::Pod::LinkCheck->new->all_pod_ok; } Dist-Zilla-Plugin-OurPkgVersion-0.12/t/release-distmeta.t0000644000175000017500000000040113131105223022625 0ustar ollisgollisg#!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(); Dist-Zilla-Plugin-OurPkgVersion-0.12/t/00-report-prereqs.dd0000644000175000017500000000566413131105223022750 0ustar ollisgollisgdo { my $x = { 'configure' => { 'requires' => { 'ExtUtils::MakeMaker' => '0' } }, 'develop' => { 'requires' => { '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.08', 'Test::Pod::LinkCheck' => '0', 'Test::Portability::Files' => '0', 'Test::Spelling' => '0.12', 'Test::Version' => '1' } }, 'runtime' => { 'requires' => { 'Carp' => '0', '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.008', 'strict' => '0', 'warnings' => '0' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'ExtUtils::MakeMaker' => '0', 'File::Spec' => '0', 'IO::Handle' => '0', 'IPC::Open3' => '0', 'Path::Tiny' => '0', 'Test::DZil' => '0', 'Test::More' => '0', 'Test::Version' => '0.04', 'blib' => '1.01' } } }; $x; }Dist-Zilla-Plugin-OurPkgVersion-0.12/t/release-kwalitee.t0000644000175000017500000000050413131105223022624 0ustar ollisgollisg 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; Dist-Zilla-Plugin-OurPkgVersion-0.12/t/release-dist-manifest.t0000644000175000017500000000043713131105223023573 0ustar ollisgollisg#!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(); Dist-Zilla-Plugin-OurPkgVersion-0.12/t/author-critic.t0000644000175000017500000000040313131105223022154 0ustar ollisgollisg#!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(); Dist-Zilla-Plugin-OurPkgVersion-0.12/perlcritic.rc0000644000175000017500000000036513131105223021444 0ustar ollisgollisgseverity = 3 verbose = 9 exclude = ValuesAndExpressions::ProhibitImplicitNewlines [Subroutines::ProhibitCallsToUndeclaredSubs] exempt_subs = Moose::with [-ErrorHandling::RequireUseOfExceptions] [-ValuesAndExpressions::RequireNumericVersion] Dist-Zilla-Plugin-OurPkgVersion-0.12/META.yml0000644000175000017500000000320513131105223020223 0ustar ollisgollisg--- abstract: 'No line insertion and does Package version with our' author: - 'Caleb Cushing ' - 'Grahan Ollis ' build_requires: ExtUtils::MakeMaker: '0' File::Spec: '0' IO::Handle: '0' IPC::Open3: '0' Path::Tiny: '0' Test::DZil: '0' Test::More: '0' Test::Version: '0.04' blib: '1.01' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.009, 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: Carp: '0' 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.008' strict: '0' warnings: '0' 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.12' x_contributors: - 'Alexandr Ciornii ' - 'Alexei Znamensky ' - 'Christian Walde ' - 'Christopher J. Madsen ' - 'David Golden ' - 'Graham Ollis ' - 'Graham Ollis ' - 'Ian Sealy ' - 'Stephan Loyd ' x_serialization_backend: 'YAML::Tiny version 1.70' Dist-Zilla-Plugin-OurPkgVersion-0.12/MANIFEST0000644000175000017500000000173613131105223020112 0ustar ollisgollisg# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.009. 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/t/basic.t corpus/eDZT/dist.ini corpus/eDZT/lib/DZT0.pm corpus/vDZT/dist.ini corpus/vDZT/lib/vDZT.pm lib/Dist/Zilla/Plugin/OurPkgVersion.pm 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/author-critic.t t/author-eol.t t/author-mojibake.t t/author-pod-coverage.t t/author-pod-linkcheck.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-minimum-version.t t/release-unused-vars.t Dist-Zilla-Plugin-OurPkgVersion-0.12/Makefile.PL0000644000175000017500000000374213131105223020732 0ustar ollisgollisg# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.009. use strict; use warnings; use 5.008; 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.008", "NAME" => "Dist::Zilla::Plugin::OurPkgVersion", "PREREQ_PM" => { "Carp" => 0, "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, "strict" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "Path::Tiny" => 0, "Test::DZil" => 0, "Test::More" => 0, "Test::Version" => "0.04", "blib" => "1.01" }, "VERSION" => "0.12", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Carp" => 0, "Dist::Zilla::Role::FileFinderUser" => 0, "Dist::Zilla::Role::FileMunger" => 0, "Dist::Zilla::Role::PPI" => 0, "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "Moose" => 0, "MooseX::Types::Perl" => 0, "PPI" => 0, "Path::Tiny" => 0, "Test::DZil" => 0, "Test::More" => 0, "Test::Version" => "0.04", "blib" => "1.01", "namespace::autoclean" => 0, "strict" => 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);