Module-Metadata-1.000027/000755 000766 000024 00000000000 12512064415 015161 5ustar00etherstaff000000 000000 Module-Metadata-1.000027/Changes000644 000766 000024 00000012026 12512064415 016455 0ustar00etherstaff000000 000000 Revision history for Module-Metadata 1.000027 2015-04-11 00:21:26Z - work around issues with an unconfigured Log::Contextual (Kent Fredric) - allow tests to pass in a perl with no taint support (James Raspass) 1.000026 2015-01-17 19:22:34Z - patched tests to be less noisy in blead builds (Dave Mitchell, RT#101491) 1.000025 2015-01-04 18:56:00Z - evaluate version assignment in a clean environment, to fix assignment in a block (RT#101095) 1.000024 2014-06-03 01:52:46Z - fix inaccurate prerequisite declaration on Test::More (in 1.000023) 1.000023 2014-06-02 02:37:17Z - support installations on older perls with an ExtUtils::MakeMaker earlier than 6.63_03 1.000022 - 2014-04-29 - work around change in comparison behaviour in Test::More 0.95_01 by being more explicit with our tests - now explicitly checking the string form of the extracted version, rather than the entire version object - ensure the extracted version is returned as a version object in all cases (RT#87782, Randy Stauner) 1.000021 - 2014-04-29 - fix use of newer interface from File::Path, to avoid another prereq on older perls (Graham Knop, PR#7) - fixed all out of date prereq declarations 1.000020 - 2014-04-27 - new is_indexable() object method (ether, RT#84357) - eliminated dependency on IO::File (and by virtue, XS) - thanks, leont! - removed cruft in test infrastructure left behind from separation from Module::Build (ether) - repository moved to https://github.com/Perl-Toolchain-Gang/Module-Metadata - .pm file is now wholly ascii, for nicer fatpacking (RT#95086) - some code micro-optimizations (Olivier Mengué, PR#4) 1.000019 - 2013-10-06 - warnings now disabled inside during the evaluation of generated version sub (BinGOs, RT#89282) 1.000018 - 2013-09-11 - re-release of detainting fix without unstated non-core test dependencies 1.000017 - 2013-09-10 - detaint version, if needed (RT#88576, Chris Williams) 1.000016 - 2013-08-21 - Re-release to fix prereqs and other metadata 1.000015 - 2013-08-21 - Change wording about safety/security to satisfy CVE-2013-1437 1.000014 - 2013-05-09 - Remove "now installs to 'site' for perl 5.12+" from last version 1.000013 - 2013-05-08 - Fix reliance on recent Test::Builder - Make tests perl 5.6 compatible - now installs to 'site' for perl 5.12+, as per p5p recommendation 1.000012 - 2013-05-04 - improved package detection heuristics (thanks, Edward Zborowski!) - fix ->contains_pod (RT#84932, Tokuhiro Matsuno) - fix detection of pod after __END__ (RT79656, Tokuhiro Matsuno) 1.000011 - 2012-08-16 - LEONT++ hasn't found any issues with my changes; mark it done (or at least ready for smoking). (APEIRON) 1.000010_003 - 2012-08-16 01:00:00 - Remove other spurious message (APEIRON) 1.000010_002 - 2012-08-15 20:15:00 - APEIRON is an idiot (APEIRON) 1.000010_001 - 2012-08-15 20:00:00 - Dev release to test removing a warning about modules not using the 'eval $VERSION' syntax which causes lots of spew. (APEIRON) 1.000010 - 2012-07-29 19:30:00 - Performance improvement: the creation of a Module::Metadata object for a typical module file has been sped up by about 40% (VPIT) - Fix t/metadata.t failure under Cygwin (JDHEDDEN) - Portability fix-ups for new_from_module() and test failures on VMS (CBERRY) 1.000009 - 2012-02-08 12:00:00 - API of 'provides' changed to require a 'version' argument to future proof the function against CPAN Meta Spec changes (DAGOLDEN) - Fatal errors now use 'croak' instead of 'die'; Carp added as prerequisite (DAGOLDEN) 1.000008 - 2012-02-07 22:30:00 - Adds 'provides' method to generate a CPAN META provides data structure correctly; use of package_versions_from_directory is discouraged (DAGOLDEN) 1.000007 - 2011-09-07 12:00:00 - Apply VMS fixes backported from blead (Craig A. Berry) 1.000006 - 2011-08-29 04:00:00 - Support PACKAGE BLOCK syntax (VPIT) 1.000005 - 2011-08-02 09:45:00 - Localize $package::VERSION during version discovery (MIYAGAWA) - Fix references to Module::Build::ModuleInfo [RT #66133] (DAGOLDEN) - Added 'new_from_handle()' method [RT #68875] (DAGOLDEN) - Improved documentation (SYNOPSIS, broke out class/object method, and other minor edits) (DAGOLDEN) 1.000004 - 2011-02-03 07:55:00 - Fix broken metadata.t when @INC has relative paths (JJORE) 1.000003 - 2011-01-06 21:35:00 - Pod cleanup (DAGOLDEN) 1.000002 - 2010-12-10 12:00:00 - Remove Module::Metadata::Version and depend directly on version.pm (DAGOLDEN) - Munge versions that fail even "lax" version number rules to try to return something sensible (DAGOLDEN) 1.000001 - 2010-07-09 00:52:37 - fix build code to prevent Author.PL being mistakenly run during make and add some extra author-side tools (MSTROUT) 1.000000 - 2010-07-07 - Initial release (MSTROUT) - Code extracted from Module::Build + Module::Build::Version (MSTROUT) - Tests extracted from Module::Build (DAGOLDEN) - POD coverage (MSTROUT) - Use of Log::Contextual when loaded with fallback to warn() (MSTROUT) Module-Metadata-1.000027/CONTRIBUTING000644 000766 000024 00000007315 12512064415 017021 0ustar00etherstaff000000 000000 CONTRIBUTING Thank you for considering contributing to this distribution. This file contains instructions that will help you work with the source code. PLEASE NOTE that if you have any questions or difficulties, you can reach the maintainer(s) through the bug queue described later in this document (preferred), or by emailing the releaser directly. You are not required to follow any of the steps in this document to submit a patch or bug report; these are just recommendations, intended to help you (and help us help you faster). The distribution is managed with Dist::Zilla (https://metacpan.org/release/Dist-Zilla). This means than many of the usual files you might expect are not in the repository, but are generated at release time (e.g. Makefile.PL). However, you can run tests directly using the 'prove' tool: $ prove -l $ prove -lv t/some_test_file.t $ prove -lvr t/ In most cases, 'prove' is entirely sufficent for you to test any patches you have. You may need to satisfy some dependencies. The easiest way to satisfy dependencies is to install the last release -- this is available at https://metacpan.org/release/Module-Metadata. If you use cpanminus, you can do it without downloading the tarball first: $ cpanm --reinstall --installdeps --with-recommends Module::Metadata Dist::Zilla is a very powerful authoring tool, but requires a number of author-specific plugins. If you would like to use it for contributing, install it from CPAN, then run one of the following commands, depending on your CPAN client: $ cpan `dzil authordeps --missing` or $ dzil authordeps --missing | cpanm You should then also install any additional requirements not needed by the dzil build but may be needed by tests or other development: $ cpan `dzil listdeps --author --missing` or $ dzil listdeps --author --missing | cpanm Or, you can use the 'dzil stale' command to install all requirements at once: $ cpan Dist::Zilla::App::Command::stale $ cpan `dzil stale --all` or $ cpanm Dist::Zilla::App::Command::stale $ dzil stale --all | cpanm You can also do this via cpanm directly: $ cpanm --reinstall --installdeps --with-develop --with-recommends Module::Metadata Once installed, here are some dzil commands you might try: $ dzil build $ dzil test $ dzil test --release $ dzil xtest $ dzil listdeps --json $ dzil build --notgz You can learn more about Dist::Zilla at http://dzil.org/. The code for this distribution is hosted at GitHub. The repository is: https://github.com/Perl-Toolchain-Gang/Module-Metadata You can submit code changes by forking the repository, pushing your code changes to your clone, and then submitting a pull request. Detailed instructions for doing that is available here: https://help.github.com/articles/creating-a-pull-request If you have found a bug, but do not have an accompanying patch to fix it, you can submit an issue report here: https://rt.cpan.org/Public/Dist/Display.html?Name=Module-Metadata or via bug-Module-Metadata@rt.cpan.org. There is also a mailing list available for users of this distribution, at http://lists.perl.org/list/cpan-workers.html. There is also an irc channel available for users of this distribution, at irc://irc.perl.org/#toolchain. If you send me a patch or pull request, your name and email address will be included in the documentation as a contributor (using the attribution on the commit or patch), unless you specifically request for it not to be. If you wish to be listed under a different name or address, you should submit a pull request to the .mailmap file to contain the correct mapping. This file was generated via Dist::Zilla::Plugin::GenerateFile::ShareDir 0.005 from a template file originating in Dist-Zilla-PluginBundle-Author-ETHER-0.091. Module-Metadata-1.000027/corpus/000755 000766 000024 00000000000 12512064415 016474 5ustar00etherstaff000000 000000 Module-Metadata-1.000027/dist.ini000644 000766 000024 00000001610 12512064415 016623 0ustar00etherstaff000000 000000 name = Module-Metadata author = Ken Williams author = Randy W. Sims license = Perl_5 copyright_holder = Perl Toolchain Gang copyright_year = 2010 [@Author::ETHER] :version = 0.086 installer = MakeMaker Authority.authority = cpan:MSTROUT Test::MinimumVersion.max_target_perl = 5.006 AutoPrereqs.skip = ^Foo$ -remove = PodWeaver -remove = Test::PodSpelling -remove = Test::CleanNamespaces [Encoding] match = ^corpus encoding = bytes [MetaResources] x_IRC = irc://irc.perl.org/#toolchain x_MailingList = http://lists.perl.org/list/cpan-workers.html [OnlyCorePrereqs] :version = 0.014 check_dual_life_versions = 0 [Prereqs / DevelopRequires] Test::Builder = 0.90 ; for is_passing [DynamicPrereqs] :version = 0.007 -delimiter = | -raw = |$WriteMakefileArgs{PREREQ_PM}{'IO::Scalar'} = $FallbackPrereqs{'IO::Scalar'} = 0 -raw = | if $] < 5.008; Module-Metadata-1.000027/INSTALL000644 000766 000024 00000001716 12512064415 016217 0ustar00etherstaff000000 000000 This is the Perl distribution Module-Metadata. Installing Module-Metadata is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm Module::Metadata If you are installing into a system-wide directory, you may need to pass the "-S" flag to cpanm, which uses sudo to install the module: % cpanm -S Module::Metadata ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan Module::Metadata ## Manual installation As a last resort, you can manually install it. Download the tarball, untar it, then build it: % perl Makefile.PL % make && make test Then install it: % make install If you are installing into a system-wide directory, you may need to run: % sudo make install ## Documentation Module-Metadata documentation is available as POD. You can run perldoc from a shell to read the documentation: % perldoc Module::Metadata Module-Metadata-1.000027/lib/000755 000766 000024 00000000000 12512064415 015727 5ustar00etherstaff000000 000000 Module-Metadata-1.000027/LICENSE000644 000766 000024 00000043702 12512064415 016174 0ustar00etherstaff000000 000000 This software is copyright (c) 2010 by Perl Toolchain Gang. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2010 by Perl Toolchain Gang. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2010 by Perl Toolchain Gang. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End Module-Metadata-1.000027/Makefile.PL000644 000766 000024 00000003565 12512064415 017144 0ustar00etherstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.034. use strict; use warnings; use 5.006; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "Gather package and POD information from perl module files", "AUTHOR" => "Ken Williams , Randy W. Sims ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "Module-Metadata", "EXE_FILES" => [], "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.006", "NAME" => "Module::Metadata", "PREREQ_PM" => { "Carp" => 0, "Fcntl" => 0, "File::Find" => 0, "File::Spec" => 0, "strict" => 0, "version" => "0.87", "warnings" => 0 }, "TEST_REQUIRES" => { "Cwd" => 0, "Data::Dumper" => 0, "ExtUtils::MakeMaker" => 0, "File::Basename" => 0, "File::Path" => 0, "File::Spec" => 0, "File::Temp" => 0, "IO::File" => 0, "Test::More" => "0.82", "lib" => 0 }, "VERSION" => "1.000027", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Carp" => 0, "Cwd" => 0, "Data::Dumper" => 0, "ExtUtils::MakeMaker" => 0, "Fcntl" => 0, "File::Basename" => 0, "File::Find" => 0, "File::Path" => 0, "File::Spec" => 0, "File::Temp" => 0, "IO::File" => 0, "Test::More" => "0.82", "lib" => 0, "strict" => 0, "version" => "0.87", "warnings" => 0 ); # inserted by Dist::Zilla::Plugin::DynamicPrereqs 0.009 $WriteMakefileArgs{PREREQ_PM}{'IO::Scalar'} = $FallbackPrereqs{'IO::Scalar'} = 0 if $] < 5.008; 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); Module-Metadata-1.000027/MANIFEST000644 000766 000024 00000001411 12512064415 016307 0ustar00etherstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.034. CONTRIBUTING Changes INSTALL LICENSE MANIFEST META.json META.yml Makefile.PL README corpus/BOMTest/UTF16BE.pm corpus/BOMTest/UTF16LE.pm corpus/BOMTest/UTF8.pm dist.ini lib/Module/Metadata.pm t/00-report-prereqs.dd t/00-report-prereqs.t t/contains_pod.t t/encoding.t t/endpod.t t/lib/0_1/Foo.pm t/lib/0_2/Foo.pm t/lib/ENDPOD.pm t/metadata.t t/taint.t t/version.t xt/author/00-compile.t xt/author/compat_lc.t xt/author/eol.t xt/author/no-tabs.t xt/release/changes_has_content.t xt/release/cpan-changes.t xt/release/distmeta.t xt/release/kwalitee.t xt/release/minimum-version.t xt/release/mojibake.t xt/release/pod-coverage.t xt/release/pod-no404s.t xt/release/pod-syntax.t xt/release/portability.t Module-Metadata-1.000027/META.json000644 000766 000024 00000103551 12512064415 016607 0ustar00etherstaff000000 000000 { "abstract" : "Gather package and POD information from perl module files", "author" : [ "Ken Williams ", "Randy W. Sims " ], "dynamic_config" : 1, "generated_by" : "Dist::Zilla version 5.034, CPAN::Meta::Converter version 2.150001", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Module-Metadata", "no_index" : { "directory" : [ "t", "xt", "corpus" ] }, "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0", "perl" : "5.006" } }, "develop" : { "recommends" : { "Dist::Zilla::PluginBundle::Author::ETHER" : "0.091" }, "requires" : { "Dist::Zilla" : "5", "Dist::Zilla::Plugin::Authority" : "0", "Dist::Zilla::Plugin::AuthorityFromModule" : "0.002", "Dist::Zilla::Plugin::AutoMetaResources" : "0", "Dist::Zilla::Plugin::AutoPrereqs" : "0", "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : "0.004", "Dist::Zilla::Plugin::CheckIssues" : "0", "Dist::Zilla::Plugin::CheckPrereqsIndexed" : "0", "Dist::Zilla::Plugin::CheckSelfDependency" : "0", "Dist::Zilla::Plugin::CheckStrictVersion" : "0", "Dist::Zilla::Plugin::ConfirmRelease" : "0", "Dist::Zilla::Plugin::CopyFilesFromRelease" : "0", "Dist::Zilla::Plugin::DynamicPrereqs" : "0.007", "Dist::Zilla::Plugin::Encoding" : "0", "Dist::Zilla::Plugin::ExecDir" : "0", "Dist::Zilla::Plugin::FileFinder::ByName" : "0", "Dist::Zilla::Plugin::GenerateFile::ShareDir" : "0", "Dist::Zilla::Plugin::Git::Check" : "2.025", "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch" : "0.004", "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts" : "0", "Dist::Zilla::Plugin::Git::Commit" : "2.020", "Dist::Zilla::Plugin::Git::Contributors" : "0.004", "Dist::Zilla::Plugin::Git::Describe" : "0.004", "Dist::Zilla::Plugin::Git::GatherDir" : "2.016", "Dist::Zilla::Plugin::Git::Push" : "0", "Dist::Zilla::Plugin::Git::Remote::Check" : "0", "Dist::Zilla::Plugin::Git::Tag" : "0", "Dist::Zilla::Plugin::GitHub::Update" : "0.40", "Dist::Zilla::Plugin::GithubMeta" : "0", "Dist::Zilla::Plugin::InstallGuide" : "0", "Dist::Zilla::Plugin::Keywords" : "0.004", "Dist::Zilla::Plugin::License" : "0", "Dist::Zilla::Plugin::MakeMaker" : "0", "Dist::Zilla::Plugin::Manifest" : "0", "Dist::Zilla::Plugin::MetaConfig" : "0", "Dist::Zilla::Plugin::MetaJSON" : "0", "Dist::Zilla::Plugin::MetaNoIndex" : "0", "Dist::Zilla::Plugin::MetaProvides::Package" : "1.15000002", "Dist::Zilla::Plugin::MetaResources" : "0", "Dist::Zilla::Plugin::MetaTests" : "0", "Dist::Zilla::Plugin::MetaYAML" : "0", "Dist::Zilla::Plugin::MinimumPerl" : "1.006", "Dist::Zilla::Plugin::MojibakeTests" : "0", "Dist::Zilla::Plugin::NextRelease" : "5.033", "Dist::Zilla::Plugin::OnlyCorePrereqs" : "0.014", "Dist::Zilla::Plugin::PodCoverageTests" : "0", "Dist::Zilla::Plugin::PodSyntaxTests" : "0", "Dist::Zilla::Plugin::Prereqs" : "0", "Dist::Zilla::Plugin::Prereqs::AuthorDeps" : "0", "Dist::Zilla::Plugin::PromptIfStale" : "0", "Dist::Zilla::Plugin::Readme" : "0", "Dist::Zilla::Plugin::ReadmeAnyFromPod" : "0.142180", "Dist::Zilla::Plugin::RewriteVersion::Transitional" : "0.004", "Dist::Zilla::Plugin::Run::AfterBuild" : "0.028", "Dist::Zilla::Plugin::Run::AfterRelease" : "0.031", "Dist::Zilla::Plugin::RunExtraTests" : "0.024", "Dist::Zilla::Plugin::ShareDir" : "0", "Dist::Zilla::Plugin::Test::CPAN::Changes" : "0.008", "Dist::Zilla::Plugin::Test::ChangesHasContent" : "0", "Dist::Zilla::Plugin::Test::Compile" : "2.039", "Dist::Zilla::Plugin::Test::EOL" : "0.14", "Dist::Zilla::Plugin::Test::Kwalitee" : "2.06", "Dist::Zilla::Plugin::Test::MinimumVersion" : "2.000003", "Dist::Zilla::Plugin::Test::NoTabs" : "0.08", "Dist::Zilla::Plugin::Test::Pod::No404s" : "0", "Dist::Zilla::Plugin::Test::Portability" : "0", "Dist::Zilla::Plugin::Test::ReportPrereqs" : "0.019", "Dist::Zilla::Plugin::TestRelease" : "0", "Dist::Zilla::Plugin::UploadToCPAN" : "0", "Dist::Zilla::PluginBundle::Author::ETHER" : "0.086", "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Pod::Coverage::TrustPod" : "0", "Test::Builder" : "0.90", "Test::CPAN::Changes" : "0.19", "Test::CPAN::Meta" : "0", "Test::EOL" : "0", "Test::Kwalitee" : "1.21", "Test::More" : "0.94", "Test::NoTabs" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08" } }, "runtime" : { "requires" : { "Carp" : "0", "Fcntl" : "0", "File::Find" : "0", "File::Spec" : "0", "perl" : "5.006", "strict" : "0", "version" : "0.87", "warnings" : "0" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "Cwd" : "0", "Data::Dumper" : "0", "ExtUtils::MakeMaker" : "0", "File::Basename" : "0", "File::Path" : "0", "File::Spec" : "0", "File::Temp" : "0", "IO::File" : "0", "Test::More" : "0.82", "lib" : "0", "perl" : "5.006" } } }, "provides" : { "Module::Metadata" : { "file" : "lib/Module/Metadata.pm", "version" : "1.000027" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-Module-Metadata@rt.cpan.org", "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=Module-Metadata" }, "homepage" : "https://github.com/Perl-Toolchain-Gang/Module-Metadata", "repository" : { "type" : "git", "url" : "https://github.com/Perl-Toolchain-Gang/Module-Metadata.git", "web" : "https://github.com/Perl-Toolchain-Gang/Module-Metadata" }, "x_IRC" : "irc://irc.perl.org/#toolchain", "x_MailingList" : "http://lists.perl.org/list/cpan-workers.html" }, "version" : "1.000027", "x_Dist_Zilla" : { "perl" : { "version" : "5.021010" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "@Author::ETHER/bundle_plugins", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::RewriteVersion::Transitional", "config" : { "Dist::Zilla::Plugin::RewriteVersion::Transitional" : { "_fallback_version_provider_args" : { "version_regexp" : "^v([\\d._]+)(-TRIAL)?$" }, "fallback_version_provider" : "Git::NextVersion" } }, "name" : "@Author::ETHER/RewriteVersion::Transitional", "version" : "0.004" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 0, "check_all_prereqs" : 0, "modules" : [ "Dist::Zilla::PluginBundle::Author::ETHER" ], "phase" : "build", "skip" : [] } }, "name" : "@Author::ETHER/stale modules, build", "version" : "0.041" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : "1", "check_all_prereqs" : "1", "modules" : [], "phase" : "release", "skip" : [] } }, "name" : "@Author::ETHER/stale modules, release", "version" : "0.041" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@Author::ETHER/ExecDir", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@Author::ETHER/ShareDir", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::FileFinder::ByName", "name" : "@Author::ETHER/Examples", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::FileFinder::ByName", "name" : "@Author::ETHER/ExtraTestFiles", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [ "README.pod", "CONTRIBUTING", "LICENSE" ], "exclude_match" : [], "follow_symlinks" : "0", "include_dotfiles" : "0", "prefix" : "", "prune_directory" : [], "root" : "." }, "Dist::Zilla::Plugin::Git::GatherDir" : { "include_untracked" : "0" } }, "name" : "@Author::ETHER/Git::GatherDir", "version" : "2.033" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Author::ETHER/MetaYAML", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@Author::ETHER/MetaJSON", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@Author::ETHER/License", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::Readme", "name" : "@Author::ETHER/Readme", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Author::ETHER/Manifest", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::GenerateFile::ShareDir", "config" : { "Dist::Zilla::Plugin::GenerateFile::ShareDir" : { "destination_filename" : "CONTRIBUTING", "dist" : "Dist-Zilla-PluginBundle-Author-ETHER", "encoding" : "UTF-8", "has_xs" : 0, "source_filename" : "CONTRIBUTING" } }, "name" : "@Author::ETHER/generate CONTRIBUTING", "version" : "0.005" }, { "class" : "Dist::Zilla::Plugin::InstallGuide", "name" : "@Author::ETHER/InstallGuide", "version" : "1.200006" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "config" : { "Dist::Zilla::Plugin::Test::Compile" : { "bail_out_on_fail" : "1", "fail_on_warning" : "author", "fake_home" : "0", "filename" : "xt/author/00-compile.t", "module_finder" : [ ":InstallModules" ], "needs_display" : "0", "phase" : "develop", "script_finder" : [ ":ExecFiles", "@Author::ETHER/Examples" ], "skips" : [] } }, "name" : "@Author::ETHER/Test::Compile", "version" : "2.052" }, { "class" : "Dist::Zilla::Plugin::Test::NoTabs", "config" : { "Dist::Zilla::Plugin::Test::NoTabs" : { "filename" : "xt/author/no-tabs.t", "finder" : [ ":InstallModules", ":ExecFiles", "@Author::ETHER/Examples", ":TestFiles", "@Author::ETHER/ExtraTestFiles" ] } }, "name" : "@Author::ETHER/Test::NoTabs", "version" : "0.13" }, { "class" : "Dist::Zilla::Plugin::Test::EOL", "config" : { "Dist::Zilla::Plugin::Test::EOL" : { "filename" : "xt/author/eol.t", "finder" : [ ":InstallModules", ":ExecFiles", ":TestFiles" ], "trailing_whitespace" : "1" } }, "name" : "@Author::ETHER/Test::EOL", "version" : "0.17" }, { "class" : "Dist::Zilla::Plugin::MetaTests", "name" : "@Author::ETHER/MetaTests", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", "name" : "@Author::ETHER/Test::CPAN::Changes", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::Test::ChangesHasContent", "name" : "@Author::ETHER/Test::ChangesHasContent", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", "name" : "@Author::ETHER/Test::MinimumVersion", "version" : "2.000006" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@Author::ETHER/PodSyntaxTests", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::PodCoverageTests", "name" : "@Author::ETHER/PodCoverageTests", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::Test::Pod::No404s", "name" : "@Author::ETHER/Test::Pod::No404s", "version" : "1.001" }, { "class" : "Dist::Zilla::Plugin::Test::Kwalitee", "config" : { "Dist::Zilla::Plugin::Test::Kwalitee" : { "filename" : "xt/release/kwalitee.t", "skiptest" : [] } }, "name" : "@Author::ETHER/Test::Kwalitee", "version" : "2.11" }, { "class" : "Dist::Zilla::Plugin::MojibakeTests", "name" : "@Author::ETHER/MojibakeTests", "version" : "0.7" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "@Author::ETHER/Test::ReportPrereqs", "version" : "0.021" }, { "class" : "Dist::Zilla::Plugin::Test::Portability", "name" : "@Author::ETHER/Test::Portability", "version" : "2.000006" }, { "class" : "Dist::Zilla::Plugin::Git::Describe", "name" : "@Author::ETHER/Git::Describe", "version" : "0.005" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "name" : "@Author::ETHER/ReadmeAnyFromPod", "version" : "0.150250" }, { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "@Author::ETHER/GithubMeta", "version" : "0.48" }, { "class" : "Dist::Zilla::Plugin::AutoMetaResources", "name" : "@Author::ETHER/AutoMetaResources", "version" : "1.20" }, { "class" : "Dist::Zilla::Plugin::AuthorityFromModule", "config" : { "Dist::Zilla::Plugin::AuthorityFromModule" : { "module" : "Module::Metadata" }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000026", "version" : "0.003" } }, "name" : "@Author::ETHER/AuthorityFromModule", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Authority", "name" : "@Author::ETHER/Authority", "version" : "1.009" }, { "class" : "Dist::Zilla::Plugin::MetaNoIndex", "name" : "@Author::ETHER/MetaNoIndex", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : { "finder" : [ ":InstallModules" ], "finder_objects" : [ { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "5.034" } ] }, "Dist::Zilla::Role::MetaProvider::Provider" : { "inherit_missing" : "1", "inherit_version" : "1", "meta_noindex" : "1" } }, "name" : "@Author::ETHER/MetaProvides::Package", "version" : "2.003001" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@Author::ETHER/MetaConfig", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::Keywords", "config" : { "Dist::Zilla::Plugin::Keywords" : { "keywords" : [] } }, "name" : "@Author::ETHER/Keywords", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Git::Contributors", "config" : { "Dist::Zilla::Plugin::Git::Contributors" : { "include_authors" : "0", "include_releaser" : "1", "order_by" : "commits", "paths" : [] } }, "name" : "@Author::ETHER/Git::Contributors", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@Author::ETHER/AutoPrereqs", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::Prereqs::AuthorDeps", "name" : "@Author::ETHER/Prereqs::AuthorDeps", "version" : "0.004" }, { "class" : "Dist::Zilla::Plugin::MinimumPerl", "name" : "@Author::ETHER/MinimumPerl", "version" : "1.006" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "recommends" } }, "name" : "@Author::ETHER/pluginbundle_version", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::MakeMaker", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "@Author::ETHER/MakeMaker", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::RunExtraTests", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "@Author::ETHER/RunExtraTests", "version" : "0.026" }, { "class" : "Dist::Zilla::Plugin::CheckSelfDependency", "config" : { "Dist::Zilla::Plugin::CheckSelfDependency" : { "finder" : [ ":InstallModules" ] }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000026", "version" : "0.003" } }, "name" : "@Author::ETHER/CheckSelfDependency", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::Run::AfterBuild", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "fatal_errors" : 1, "run" : [ "bash -c \"test -e .ackrc && grep -q -- '--ignore-dir=.latest' .ackrc || echo '--ignore-dir=.latest' >> .ackrc; if [[ `dirname %d` != .build ]]; then test -e .ackrc && grep -q -- '--ignore-dir=%d' .ackrc || echo '--ignore-dir=%d' >> .ackrc; fi\"" ] } }, "name" : "@Author::ETHER/.ackrc", "version" : "0.035" }, { "class" : "Dist::Zilla::Plugin::Run::AfterBuild", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "eval" : [ "if ('%d' =~ /^%n-[.[:xdigit:]]+$/) { unlink '.latest'; symlink '%d', '.latest'; }" ], "fatal_errors" : 1 } }, "name" : "@Author::ETHER/.latest", "version" : "0.035" }, { "class" : "Dist::Zilla::Plugin::CheckStrictVersion", "name" : "@Author::ETHER/CheckStrictVersion", "version" : "0.001" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/initial check", "version" : "2.033" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts", "config" : { "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/Git::CheckFor::MergeConflicts", "version" : "0.013" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch", "config" : { "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/Git::CheckFor::CorrectBranch", "version" : "0.013" }, { "class" : "Dist::Zilla::Plugin::Git::Remote::Check", "name" : "@Author::ETHER/Git::Remote::Check", "version" : "0.1.2" }, { "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", "name" : "@Author::ETHER/CheckPrereqsIndexed", "version" : "0.015" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Author::ETHER/TestRelease", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/after tests", "version" : "2.033" }, { "class" : "Dist::Zilla::Plugin::CheckIssues", "name" : "@Author::ETHER/CheckIssues", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Author::ETHER/UploadToCPAN", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromRelease", "config" : { "Dist::Zilla::Plugin::CopyFilesFromRelease" : { "filename" : [ "LICENSE", "CONTRIBUTING", "Changes" ], "match" : [] } }, "name" : "@Author::ETHER/CopyFilesFromRelease", "version" : "0.005" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [ "." ], "commit_msg" : "%N-%v%t%n%n%c", "time_zone" : "local" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "README.pod", "LICENSE", "CONTRIBUTING", "Changes" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/release snapshot", "version" : "2.033" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "config" : { "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "signed" : 0, "tag" : "v1.000027", "tag_format" : "v%v", "tag_message" : "v%v%t", "time_zone" : "local" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/Git::Tag", "version" : "2.033" }, { "class" : "Dist::Zilla::Plugin::GitHub::Update", "name" : "@Author::ETHER/GitHub::Update", "version" : "0.40" }, { "class" : "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional", "config" : { "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : {} }, "name" : "@Author::ETHER/BumpVersionAfterRelease::Transitional", "version" : "0.004" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@Author::ETHER/NextRelease", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "increment $VERSION after release", "time_zone" : "local" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes" ], "allow_dirty_match" : [ "(?^:^lib/)" ], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/post-release commit", "version" : "2.033" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "config" : { "Dist::Zilla::Plugin::Git::Push" : { "push_to" : [ "origin" ], "remotes_must_exist" : 1 }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/Git::Push", "version" : "2.033" }, { "class" : "Dist::Zilla::Plugin::Run::AfterRelease", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "fatal_errors" : 0, "run" : [ "REDACTED" ] } }, "name" : "@Author::ETHER/install release", "version" : "0.035" }, { "class" : "Dist::Zilla::Plugin::Run::AfterRelease", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "eval" : [ "print \"release complete!\\xa\"" ], "fatal_errors" : 1 } }, "name" : "@Author::ETHER/release complete", "version" : "0.035" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Author::ETHER/ConfirmRelease", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::Encoding", "name" : "Encoding", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "MetaResources", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::OnlyCorePrereqs", "config" : { "Dist::Zilla::Plugin::OnlyCorePrereqs" : { "also_disallow" : [], "check_dual_life_versions" : "0", "deprecated_ok" : "0", "phases" : [ "configure", "build", "runtime", "test" ], "skips" : [], "starting_version" : "to be determined from perl prereq" } }, "name" : "OnlyCorePrereqs", "version" : "0.024" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "DevelopRequires", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::DynamicPrereqs", "name" : "DynamicPrereqs", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "5.034" }, { "class" : "Dist::Zilla::Plugin::VerifyPhases", "name" : "@Author::ETHER/PHASE VERIFICATION", "version" : "0.010" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : "0" }, "version" : "5.034" } }, "x_authority" : "cpan:MSTROUT", "x_authority_from_module" : "Module::Metadata", "x_contributors" : [ "Karen Etheridge ", "David Golden ", "Vincent Pit ", "Matt S Trout ", "Chris Nehren ", "Graham Knop ", "Olivier Mengué ", "Tomas Doran ", "Tatsuhiko Miyagawa ", "tokuhirom ", "Peter Rabbitson ", "Jerry D. Hedden ", "Craig A. Berry ", "David Mitchell ", "David Steinbrunner ", "Edward Zborowski ", "Gareth Harper ", "James Raspass ", "Chris 'BinGOs' Williams ", "Josh Jore ", "Kent Fredric " ], "x_permissions_from_module" : "Module::Metadata" } Module-Metadata-1.000027/META.yml000644 000766 000024 00000047002 12512064415 016435 0ustar00etherstaff000000 000000 --- abstract: 'Gather package and POD information from perl module files' author: - 'Ken Williams ' - 'Randy W. Sims ' build_requires: Cwd: '0' Data::Dumper: '0' ExtUtils::MakeMaker: '0' File::Basename: '0' File::Path: '0' File::Spec: '0' File::Temp: '0' IO::File: '0' Test::More: '0.82' lib: '0' perl: '5.006' configure_requires: ExtUtils::MakeMaker: '0' perl: '5.006' dynamic_config: 1 generated_by: 'Dist::Zilla version 5.034, CPAN::Meta::Converter version 2.150001' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Module-Metadata no_index: directory: - t - xt - corpus provides: Module::Metadata: file: lib/Module/Metadata.pm version: '1.000027' requires: Carp: '0' Fcntl: '0' File::Find: '0' File::Spec: '0' perl: '5.006' strict: '0' version: '0.87' warnings: '0' resources: IRC: irc://irc.perl.org/#toolchain MailingList: http://lists.perl.org/list/cpan-workers.html bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Module-Metadata homepage: https://github.com/Perl-Toolchain-Gang/Module-Metadata repository: https://github.com/Perl-Toolchain-Gang/Module-Metadata.git version: '1.000027' x_Dist_Zilla: perl: version: '5.021010' plugins: - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: '@Author::ETHER/bundle_plugins' version: '5.034' - class: Dist::Zilla::Plugin::RewriteVersion::Transitional config: Dist::Zilla::Plugin::RewriteVersion::Transitional: _fallback_version_provider_args: version_regexp: ^v([\d._]+)(-TRIAL)?$ fallback_version_provider: Git::NextVersion name: '@Author::ETHER/RewriteVersion::Transitional' version: '0.004' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 0 check_all_prereqs: 0 modules: - Dist::Zilla::PluginBundle::Author::ETHER phase: build skip: [] name: '@Author::ETHER/stale modules, build' version: '0.041' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: '1' check_all_prereqs: '1' modules: [] phase: release skip: [] name: '@Author::ETHER/stale modules, release' version: '0.041' - class: Dist::Zilla::Plugin::ExecDir name: '@Author::ETHER/ExecDir' version: '5.034' - class: Dist::Zilla::Plugin::ShareDir name: '@Author::ETHER/ShareDir' version: '5.034' - class: Dist::Zilla::Plugin::FileFinder::ByName name: '@Author::ETHER/Examples' version: '5.034' - class: Dist::Zilla::Plugin::FileFinder::ByName name: '@Author::ETHER/ExtraTestFiles' version: '5.034' - class: Dist::Zilla::Plugin::Git::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: - README.pod - CONTRIBUTING - LICENSE exclude_match: [] follow_symlinks: '0' include_dotfiles: '0' prefix: '' prune_directory: [] root: . Dist::Zilla::Plugin::Git::GatherDir: include_untracked: '0' name: '@Author::ETHER/Git::GatherDir' version: '2.033' - class: Dist::Zilla::Plugin::MetaYAML name: '@Author::ETHER/MetaYAML' version: '5.034' - class: Dist::Zilla::Plugin::MetaJSON name: '@Author::ETHER/MetaJSON' version: '5.034' - class: Dist::Zilla::Plugin::License name: '@Author::ETHER/License' version: '5.034' - class: Dist::Zilla::Plugin::Readme name: '@Author::ETHER/Readme' version: '5.034' - class: Dist::Zilla::Plugin::Manifest name: '@Author::ETHER/Manifest' version: '5.034' - class: Dist::Zilla::Plugin::GenerateFile::ShareDir config: Dist::Zilla::Plugin::GenerateFile::ShareDir: destination_filename: CONTRIBUTING dist: Dist-Zilla-PluginBundle-Author-ETHER encoding: UTF-8 has_xs: 0 source_filename: CONTRIBUTING name: '@Author::ETHER/generate CONTRIBUTING' version: '0.005' - class: Dist::Zilla::Plugin::InstallGuide name: '@Author::ETHER/InstallGuide' version: '1.200006' - class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: bail_out_on_fail: '1' fail_on_warning: author fake_home: '0' filename: xt/author/00-compile.t module_finder: - ':InstallModules' needs_display: '0' phase: develop script_finder: - ':ExecFiles' - '@Author::ETHER/Examples' skips: [] name: '@Author::ETHER/Test::Compile' version: '2.052' - class: Dist::Zilla::Plugin::Test::NoTabs config: Dist::Zilla::Plugin::Test::NoTabs: filename: xt/author/no-tabs.t finder: - ':InstallModules' - ':ExecFiles' - '@Author::ETHER/Examples' - ':TestFiles' - '@Author::ETHER/ExtraTestFiles' name: '@Author::ETHER/Test::NoTabs' version: '0.13' - class: Dist::Zilla::Plugin::Test::EOL config: Dist::Zilla::Plugin::Test::EOL: filename: xt/author/eol.t finder: - ':InstallModules' - ':ExecFiles' - ':TestFiles' trailing_whitespace: '1' name: '@Author::ETHER/Test::EOL' version: '0.17' - class: Dist::Zilla::Plugin::MetaTests name: '@Author::ETHER/MetaTests' version: '5.034' - class: Dist::Zilla::Plugin::Test::CPAN::Changes name: '@Author::ETHER/Test::CPAN::Changes' version: '0.009' - class: Dist::Zilla::Plugin::Test::ChangesHasContent name: '@Author::ETHER/Test::ChangesHasContent' version: '0.008' - class: Dist::Zilla::Plugin::Test::MinimumVersion name: '@Author::ETHER/Test::MinimumVersion' version: '2.000006' - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@Author::ETHER/PodSyntaxTests' version: '5.034' - class: Dist::Zilla::Plugin::PodCoverageTests name: '@Author::ETHER/PodCoverageTests' version: '5.034' - class: Dist::Zilla::Plugin::Test::Pod::No404s name: '@Author::ETHER/Test::Pod::No404s' version: '1.001' - class: Dist::Zilla::Plugin::Test::Kwalitee config: Dist::Zilla::Plugin::Test::Kwalitee: filename: xt/release/kwalitee.t skiptest: [] name: '@Author::ETHER/Test::Kwalitee' version: '2.11' - class: Dist::Zilla::Plugin::MojibakeTests name: '@Author::ETHER/MojibakeTests' version: '0.7' - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: '@Author::ETHER/Test::ReportPrereqs' version: '0.021' - class: Dist::Zilla::Plugin::Test::Portability name: '@Author::ETHER/Test::Portability' version: '2.000006' - class: Dist::Zilla::Plugin::Git::Describe name: '@Author::ETHER/Git::Describe' version: '0.005' - class: Dist::Zilla::Plugin::ReadmeAnyFromPod name: '@Author::ETHER/ReadmeAnyFromPod' version: '0.150250' - class: Dist::Zilla::Plugin::GithubMeta name: '@Author::ETHER/GithubMeta' version: '0.48' - class: Dist::Zilla::Plugin::AutoMetaResources name: '@Author::ETHER/AutoMetaResources' version: '1.20' - class: Dist::Zilla::Plugin::AuthorityFromModule config: Dist::Zilla::Plugin::AuthorityFromModule: module: Module::Metadata Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000026' version: '0.003' name: '@Author::ETHER/AuthorityFromModule' version: '0.006' - class: Dist::Zilla::Plugin::Authority name: '@Author::ETHER/Authority' version: '1.009' - class: Dist::Zilla::Plugin::MetaNoIndex name: '@Author::ETHER/MetaNoIndex' version: '5.034' - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: finder: - ':InstallModules' finder_objects: - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '5.034' Dist::Zilla::Role::MetaProvider::Provider: inherit_missing: '1' inherit_version: '1' meta_noindex: '1' name: '@Author::ETHER/MetaProvides::Package' version: '2.003001' - class: Dist::Zilla::Plugin::MetaConfig name: '@Author::ETHER/MetaConfig' version: '5.034' - class: Dist::Zilla::Plugin::Keywords config: Dist::Zilla::Plugin::Keywords: keywords: [] name: '@Author::ETHER/Keywords' version: '0.006' - class: Dist::Zilla::Plugin::Git::Contributors config: Dist::Zilla::Plugin::Git::Contributors: include_authors: '0' include_releaser: '1' order_by: commits paths: [] name: '@Author::ETHER/Git::Contributors' version: '0.011' - class: Dist::Zilla::Plugin::AutoPrereqs name: '@Author::ETHER/AutoPrereqs' version: '5.034' - class: Dist::Zilla::Plugin::Prereqs::AuthorDeps name: '@Author::ETHER/Prereqs::AuthorDeps' version: '0.004' - class: Dist::Zilla::Plugin::MinimumPerl name: '@Author::ETHER/MinimumPerl' version: '1.006' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: recommends name: '@Author::ETHER/pluginbundle_version' version: '5.034' - class: Dist::Zilla::Plugin::MakeMaker config: Dist::Zilla::Role::TestRunner: default_jobs: 9 name: '@Author::ETHER/MakeMaker' version: '5.034' - class: Dist::Zilla::Plugin::RunExtraTests config: Dist::Zilla::Role::TestRunner: default_jobs: 9 name: '@Author::ETHER/RunExtraTests' version: '0.026' - class: Dist::Zilla::Plugin::CheckSelfDependency config: Dist::Zilla::Plugin::CheckSelfDependency: finder: - ':InstallModules' Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000026' version: '0.003' name: '@Author::ETHER/CheckSelfDependency' version: '0.011' - class: Dist::Zilla::Plugin::Run::AfterBuild config: Dist::Zilla::Plugin::Run::Role::Runner: fatal_errors: 1 run: - "bash -c \"test -e .ackrc && grep -q -- '--ignore-dir=.latest' .ackrc || echo '--ignore-dir=.latest' >> .ackrc; if [[ `dirname %d` != .build ]]; then test -e .ackrc && grep -q -- '--ignore-dir=%d' .ackrc || echo '--ignore-dir=%d' >> .ackrc; fi\"" name: '@Author::ETHER/.ackrc' version: '0.035' - class: Dist::Zilla::Plugin::Run::AfterBuild config: Dist::Zilla::Plugin::Run::Role::Runner: eval: - "if ('%d' =~ /^%n-[.[:xdigit:]]+$/) { unlink '.latest'; symlink '%d', '.latest'; }" fatal_errors: 1 name: '@Author::ETHER/.latest' version: '0.035' - class: Dist::Zilla::Plugin::CheckStrictVersion name: '@Author::ETHER/CheckStrictVersion' version: '0.001' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: [] allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/initial check' version: '2.033' - class: Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts config: Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/Git::CheckFor::MergeConflicts' version: '0.013' - class: Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch config: Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/Git::CheckFor::CorrectBranch' version: '0.013' - class: Dist::Zilla::Plugin::Git::Remote::Check name: '@Author::ETHER/Git::Remote::Check' version: 0.1.2 - class: Dist::Zilla::Plugin::CheckPrereqsIndexed name: '@Author::ETHER/CheckPrereqsIndexed' version: '0.015' - class: Dist::Zilla::Plugin::TestRelease name: '@Author::ETHER/TestRelease' version: '5.034' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: [] allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/after tests' version: '2.033' - class: Dist::Zilla::Plugin::CheckIssues name: '@Author::ETHER/CheckIssues' version: '0.008' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Author::ETHER/UploadToCPAN' version: '5.034' - class: Dist::Zilla::Plugin::CopyFilesFromRelease config: Dist::Zilla::Plugin::CopyFilesFromRelease: filename: - LICENSE - CONTRIBUTING - Changes match: [] name: '@Author::ETHER/CopyFilesFromRelease' version: '0.005' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: - . commit_msg: '%N-%v%t%n%n%c' time_zone: local Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - README.pod - LICENSE - CONTRIBUTING - Changes allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/release snapshot' version: '2.033' - class: Dist::Zilla::Plugin::Git::Tag config: Dist::Zilla::Plugin::Git::Tag: branch: ~ signed: 0 tag: v1.000027 tag_format: v%v tag_message: v%v%t time_zone: local Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/Git::Tag' version: '2.033' - class: Dist::Zilla::Plugin::GitHub::Update name: '@Author::ETHER/GitHub::Update' version: '0.40' - class: Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional config: Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional: {} name: '@Author::ETHER/BumpVersionAfterRelease::Transitional' version: '0.004' - class: Dist::Zilla::Plugin::NextRelease name: '@Author::ETHER/NextRelease' version: '5.034' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: 'increment $VERSION after release' time_zone: local Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes allow_dirty_match: - (?^:^lib/) changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/post-release commit' version: '2.033' - class: Dist::Zilla::Plugin::Git::Push config: Dist::Zilla::Plugin::Git::Push: push_to: - origin remotes_must_exist: 1 Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/Git::Push' version: '2.033' - class: Dist::Zilla::Plugin::Run::AfterRelease config: Dist::Zilla::Plugin::Run::Role::Runner: fatal_errors: 0 run: - REDACTED name: '@Author::ETHER/install release' version: '0.035' - class: Dist::Zilla::Plugin::Run::AfterRelease config: Dist::Zilla::Plugin::Run::Role::Runner: eval: - 'print "release complete!\xa"' fatal_errors: 1 name: '@Author::ETHER/release complete' version: '0.035' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Author::ETHER/ConfirmRelease' version: '5.034' - class: Dist::Zilla::Plugin::Encoding name: Encoding version: '5.034' - class: Dist::Zilla::Plugin::MetaResources name: MetaResources version: '5.034' - class: Dist::Zilla::Plugin::OnlyCorePrereqs config: Dist::Zilla::Plugin::OnlyCorePrereqs: also_disallow: [] check_dual_life_versions: '0' deprecated_ok: '0' phases: - configure - build - runtime - test skips: [] starting_version: 'to be determined from perl prereq' name: OnlyCorePrereqs version: '0.024' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: DevelopRequires version: '5.034' - class: Dist::Zilla::Plugin::DynamicPrereqs name: DynamicPrereqs version: '0.009' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '5.034' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '5.034' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '5.034' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '5.034' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '5.034' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '5.034' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '5.034' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '5.034' - class: Dist::Zilla::Plugin::VerifyPhases name: '@Author::ETHER/PHASE VERIFICATION' version: '0.010' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: '0' version: '5.034' x_authority: cpan:MSTROUT x_authority_from_module: Module::Metadata x_contributors: - 'Karen Etheridge ' - 'David Golden ' - 'Vincent Pit ' - 'Matt S Trout ' - 'Chris Nehren ' - 'Graham Knop ' - 'Olivier Mengué ' - 'Tomas Doran ' - 'Tatsuhiko Miyagawa ' - 'tokuhirom ' - 'Peter Rabbitson ' - 'Jerry D. Hedden ' - 'Craig A. Berry ' - 'David Mitchell ' - 'David Steinbrunner ' - 'Edward Zborowski ' - 'Gareth Harper ' - 'James Raspass ' - "Chris 'BinGOs' Williams " - 'Josh Jore ' - 'Kent Fredric ' x_permissions_from_module: Module::Metadata Module-Metadata-1.000027/README000644 000766 000024 00000000627 12512064415 016046 0ustar00etherstaff000000 000000 This archive contains the distribution Module-Metadata, version 1.000027: Gather package and POD information from perl module files This software is copyright (c) 2010 by Perl Toolchain Gang. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. This README file was generated by Dist::Zilla::Plugin::Readme v5.034. Module-Metadata-1.000027/t/000755 000766 000024 00000000000 12512064415 015424 5ustar00etherstaff000000 000000 Module-Metadata-1.000027/xt/000755 000766 000024 00000000000 12512064415 015614 5ustar00etherstaff000000 000000 Module-Metadata-1.000027/xt/author/000755 000766 000024 00000000000 12512064415 017116 5ustar00etherstaff000000 000000 Module-Metadata-1.000027/xt/release/000755 000766 000024 00000000000 12512064415 017234 5ustar00etherstaff000000 000000 Module-Metadata-1.000027/xt/release/changes_has_content.t000644 000766 000024 00000002014 12512064415 023413 0ustar00etherstaff000000 000000 #!perl use Test::More tests => 2; note 'Checking Changes'; my $changes_file = 'Changes'; my $newver = '1.000027'; my $trial_token = '-TRIAL'; SKIP: { ok(-e $changes_file, "$changes_file file exists") or skip 'Changes is missing', 1; ok(_get_changes($newver), "$changes_file has content for $newver"); } done_testing; # _get_changes copied and adapted from Dist::Zilla::Plugin::Git::Commit # by Jerome Quelin sub _get_changes { my $newver = shift; # parse changelog to find commit message open(my $fh, '<', $changes_file) or die "cannot open $changes_file: $!"; my $changelog = join('', <$fh>); close $fh; my @content = grep { /^$newver(?:$trial_token)?(?:\s+|$)/ ... /^\S/ } # from newver to un-indented split /\n/, $changelog; shift @content; # drop the version line # drop unindented last line and trailing blank lines pop @content while ( @content && $content[-1] =~ /^(?:\S|\s*$)/ ); # return number of non-blank lines return scalar @content; } Module-Metadata-1.000027/xt/release/cpan-changes.t000644 000766 000024 00000000263 12512064415 021751 0ustar00etherstaff000000 000000 #!perl use strict; use warnings; use Test::More 0.96 tests => 2; use_ok('Test::CPAN::Changes'); subtest 'changes_ok' => sub { changes_file_ok('Changes'); }; done_testing(); Module-Metadata-1.000027/xt/release/distmeta.t000644 000766 000024 00000000172 12512064415 021233 0ustar00etherstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::MetaTests. use Test::CPAN::Meta; meta_yaml_ok(); Module-Metadata-1.000027/xt/release/kwalitee.t000644 000766 000024 00000000275 12512064415 021232 0ustar00etherstaff000000 000000 # this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.11 use strict; use warnings; use Test::More 0.88; use Test::Kwalitee 1.21 'kwalitee_ok'; kwalitee_ok(); done_testing; Module-Metadata-1.000027/xt/release/minimum-version.t000644 000766 000024 00000000266 12512064415 022563 0ustar00etherstaff000000 000000 #!perl use Test::More; eval "use Test::MinimumVersion"; plan skip_all => "Test::MinimumVersion required for testing minimum versions" if $@; all_minimum_version_ok( qq{5.006} ); Module-Metadata-1.000027/xt/release/mojibake.t000644 000766 000024 00000000406 12512064415 021202 0ustar00etherstaff000000 000000 #!perl use strict; use warnings qw(all); use Test::More; ## no critic (ProhibitStringyEval, RequireCheckingReturnValueOfEval) eval q(use Test::Mojibake); plan skip_all => q(Test::Mojibake required for source encoding testing) if $@; all_files_encoding_ok(); Module-Metadata-1.000027/xt/release/pod-coverage.t000644 000766 000024 00000000334 12512064415 021774 0ustar00etherstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests. use Test::Pod::Coverage 1.08; use Pod::Coverage::TrustPod; all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); Module-Metadata-1.000027/xt/release/pod-no404s.t000644 000766 000024 00000000527 12512064415 021234 0ustar00etherstaff000000 000000 #!perl use strict; use warnings; use Test::More; foreach my $env_skip ( qw( SKIP_POD_NO404S AUTOMATED_TESTING ) ){ plan skip_all => "\$ENV{$env_skip} is set, skipping" if $ENV{$env_skip}; } eval "use Test::Pod::No404s"; if ( $@ ) { plan skip_all => 'Test::Pod::No404s required for testing POD'; } else { all_pod_files_ok(); } Module-Metadata-1.000027/xt/release/pod-syntax.t000644 000766 000024 00000000220 12512064415 021521 0ustar00etherstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use Test::More; use Test::Pod 1.41; all_pod_files_ok(); Module-Metadata-1.000027/xt/release/portability.t000644 000766 000024 00000000277 12512064415 021771 0ustar00etherstaff000000 000000 #!perl 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(); Module-Metadata-1.000027/xt/author/00-compile.t000644 000766 000024 00000002033 12512064415 021146 0ustar00etherstaff000000 000000 use 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.052 use Test::More 0.94; plan tests => 2; my @module_files = ( 'Module/Metadata.pm' ); # no fake home requested my $inc_switch = -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; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', explain(\@warnings); BAIL_OUT("Compilation problems") if !Test::More->builder->is_passing; Module-Metadata-1.000027/xt/author/compat_lc.t000644 000766 000024 00000001250 12512064415 021242 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; # ABSTRACT: Make sure not to fail if Log::Contextual is accidentally uninitialised BEGIN { eval { require "Log/Contextual.pm"; 1 } or plan skip_all => "Log::Contexual required installed for this test"; } use Module::Metadata; my ( $ok, $error ) = do { local $@; my $rval = eval { package Module::Metadata; # Required because "default" applies to caller context # So this test is mimicing internal calls Module::Metadata::log_info { "something" }; 1; }; ( $rval, $@ ); }; ok( $ok, "Log::Contextual being loaded didn't cause an explosion" ) or note $error; done_testing; Module-Metadata-1.000027/xt/author/eol.t000644 000766 000024 00000000767 12512064415 020074 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.17 use Test::More 0.88; use Test::EOL; my @files = ( 'lib/Module/Metadata.pm', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/contains_pod.t', 't/encoding.t', 't/endpod.t', 't/lib/0_1/Foo.pm', 't/lib/0_2/Foo.pm', 't/lib/ENDPOD.pm', 't/metadata.t', 't/taint.t', 't/version.t' ); eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; done_testing; Module-Metadata-1.000027/xt/author/no-tabs.t000644 000766 000024 00000001615 12512064415 020651 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.13 use Test::More 0.88; use Test::NoTabs; my @files = ( 'lib/Module/Metadata.pm', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/contains_pod.t', 't/encoding.t', 't/endpod.t', 't/lib/0_1/Foo.pm', 't/lib/0_2/Foo.pm', 't/lib/ENDPOD.pm', 't/metadata.t', 't/taint.t', 't/version.t', 'xt/author/00-compile.t', 'xt/author/compat_lc.t', 'xt/author/eol.t', 'xt/author/no-tabs.t', 'xt/release/changes_has_content.t', 'xt/release/cpan-changes.t', 'xt/release/distmeta.t', 'xt/release/kwalitee.t', 'xt/release/minimum-version.t', 'xt/release/mojibake.t', 'xt/release/pod-coverage.t', 'xt/release/pod-no404s.t', 'xt/release/pod-syntax.t', 'xt/release/portability.t' ); notabs_ok($_) foreach @files; done_testing; Module-Metadata-1.000027/t/00-report-prereqs.dd000644 000766 000024 00000021223 12512064415 021144 0ustar00etherstaff000000 000000 do { my $x = { 'configure' => { 'requires' => { 'ExtUtils::MakeMaker' => '0', 'perl' => '5.006' } }, 'develop' => { 'recommends' => { 'Dist::Zilla::PluginBundle::Author::ETHER' => '0.091' }, 'requires' => { 'Dist::Zilla' => '5', 'Dist::Zilla::Plugin::Authority' => '0', 'Dist::Zilla::Plugin::AuthorityFromModule' => '0.002', 'Dist::Zilla::Plugin::AutoMetaResources' => '0', 'Dist::Zilla::Plugin::AutoPrereqs' => '0', 'Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional' => '0.004', 'Dist::Zilla::Plugin::CheckIssues' => '0', 'Dist::Zilla::Plugin::CheckPrereqsIndexed' => '0', 'Dist::Zilla::Plugin::CheckSelfDependency' => '0', 'Dist::Zilla::Plugin::CheckStrictVersion' => '0', 'Dist::Zilla::Plugin::ConfirmRelease' => '0', 'Dist::Zilla::Plugin::CopyFilesFromRelease' => '0', 'Dist::Zilla::Plugin::DynamicPrereqs' => '0.007', 'Dist::Zilla::Plugin::Encoding' => '0', 'Dist::Zilla::Plugin::ExecDir' => '0', 'Dist::Zilla::Plugin::FileFinder::ByName' => '0', 'Dist::Zilla::Plugin::GenerateFile::ShareDir' => '0', 'Dist::Zilla::Plugin::Git::Check' => '2.025', 'Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch' => '0.004', 'Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts' => '0', 'Dist::Zilla::Plugin::Git::Commit' => '2.020', 'Dist::Zilla::Plugin::Git::Contributors' => '0.004', 'Dist::Zilla::Plugin::Git::Describe' => '0.004', 'Dist::Zilla::Plugin::Git::GatherDir' => '2.016', 'Dist::Zilla::Plugin::Git::Push' => '0', 'Dist::Zilla::Plugin::Git::Remote::Check' => '0', 'Dist::Zilla::Plugin::Git::Tag' => '0', 'Dist::Zilla::Plugin::GitHub::Update' => '0.40', 'Dist::Zilla::Plugin::GithubMeta' => '0', 'Dist::Zilla::Plugin::InstallGuide' => '0', 'Dist::Zilla::Plugin::Keywords' => '0.004', 'Dist::Zilla::Plugin::License' => '0', 'Dist::Zilla::Plugin::MakeMaker' => '0', 'Dist::Zilla::Plugin::Manifest' => '0', 'Dist::Zilla::Plugin::MetaConfig' => '0', 'Dist::Zilla::Plugin::MetaJSON' => '0', 'Dist::Zilla::Plugin::MetaNoIndex' => '0', 'Dist::Zilla::Plugin::MetaProvides::Package' => '1.15000002', 'Dist::Zilla::Plugin::MetaResources' => '0', 'Dist::Zilla::Plugin::MetaTests' => '0', 'Dist::Zilla::Plugin::MetaYAML' => '0', 'Dist::Zilla::Plugin::MinimumPerl' => '1.006', 'Dist::Zilla::Plugin::MojibakeTests' => '0', 'Dist::Zilla::Plugin::NextRelease' => '5.033', 'Dist::Zilla::Plugin::OnlyCorePrereqs' => '0.014', 'Dist::Zilla::Plugin::PodCoverageTests' => '0', 'Dist::Zilla::Plugin::PodSyntaxTests' => '0', 'Dist::Zilla::Plugin::Prereqs' => '0', 'Dist::Zilla::Plugin::Prereqs::AuthorDeps' => '0', 'Dist::Zilla::Plugin::PromptIfStale' => '0', 'Dist::Zilla::Plugin::Readme' => '0', 'Dist::Zilla::Plugin::ReadmeAnyFromPod' => '0.142180', 'Dist::Zilla::Plugin::RewriteVersion::Transitional' => '0.004', 'Dist::Zilla::Plugin::Run::AfterBuild' => '0.028', 'Dist::Zilla::Plugin::Run::AfterRelease' => '0.031', 'Dist::Zilla::Plugin::RunExtraTests' => '0.024', 'Dist::Zilla::Plugin::ShareDir' => '0', 'Dist::Zilla::Plugin::Test::CPAN::Changes' => '0.008', 'Dist::Zilla::Plugin::Test::ChangesHasContent' => '0', 'Dist::Zilla::Plugin::Test::Compile' => '2.039', 'Dist::Zilla::Plugin::Test::EOL' => '0.14', 'Dist::Zilla::Plugin::Test::Kwalitee' => '2.06', 'Dist::Zilla::Plugin::Test::MinimumVersion' => '2.000003', 'Dist::Zilla::Plugin::Test::NoTabs' => '0.08', 'Dist::Zilla::Plugin::Test::Pod::No404s' => '0', 'Dist::Zilla::Plugin::Test::Portability' => '0', 'Dist::Zilla::Plugin::Test::ReportPrereqs' => '0.019', 'Dist::Zilla::Plugin::TestRelease' => '0', 'Dist::Zilla::Plugin::UploadToCPAN' => '0', 'Dist::Zilla::PluginBundle::Author::ETHER' => '0.086', 'File::Spec' => '0', 'IO::Handle' => '0', 'IPC::Open3' => '0', 'Pod::Coverage::TrustPod' => '0', 'Test::Builder' => '0.90', 'Test::CPAN::Changes' => '0.19', 'Test::CPAN::Meta' => '0', 'Test::EOL' => '0', 'Test::Kwalitee' => '1.21', 'Test::More' => '0.94', 'Test::NoTabs' => '0', 'Test::Pod' => '1.41', 'Test::Pod::Coverage' => '1.08' } }, 'runtime' => { 'requires' => { 'Carp' => '0', 'Fcntl' => '0', 'File::Find' => '0', 'File::Spec' => '0', 'perl' => '5.006', 'strict' => '0', 'version' => '0.87', 'warnings' => '0' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'Cwd' => '0', 'Data::Dumper' => '0', 'ExtUtils::MakeMaker' => '0', 'File::Basename' => '0', 'File::Path' => '0', 'File::Spec' => '0', 'File::Temp' => '0', 'IO::File' => '0', 'Test::More' => '0.82', 'lib' => '0', 'perl' => '5.006' } } }; $x; }Module-Metadata-1.000027/t/00-report-prereqs.t000644 000766 000024 00000012750 12512064415 021025 0ustar00etherstaff000000 000000 #!perl use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.021 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( Pod::Coverage ); 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'; if ( $source && $HAS_CPAN_META ) { if ( my $meta = eval { CPAN::Meta->load_file($source) } ) { $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); } } else { $source = 'static metadata'; } my @full_reports; my @dep_errors; my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; # 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 ( @dep_errors ) { diag join("\n", "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n", "The following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); } pass; # vim: ts=4 sts=4 sw=4 et: Module-Metadata-1.000027/t/contains_pod.t000644 000766 000024 00000002104 12512064415 020266 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 3; use Module::Metadata; BEGIN { *fh_from_string = $] < 5.008 ? require IO::Scalar && sub ($) { IO::Scalar->new(\$_[0]); } # hide in an eval'd string so Perl::MinimumVersion doesn't clutch its pearls : eval <<'EVAL' sub ($) { open my $fh, '<', \$_[0]; $fh } EVAL ; } { my $src = <<'...'; package Foo; 1; ... my $fh = fh_from_string($src); my $module = Module::Metadata->new_from_handle($fh, 'Foo.pm'); ok(!$module->contains_pod(), 'This module does not contains POD'); } { my $src = <<'...'; package Foo; 1; =head1 NAME Foo - bar ... my $fh = fh_from_string($src); my $module = Module::Metadata->new_from_handle($fh, 'Foo.pm'); ok($module->contains_pod(), 'This module contains POD'); } { my $src = <<'...'; package Foo; 1; =head1 NAME Foo - bar =head1 AUTHORS Tokuhiro Matsuno ... my $fh = fh_from_string($src); my $module = Module::Metadata->new_from_handle($fh, 'Foo.pm'); ok($module->contains_pod(), 'This module contains POD'); } Module-Metadata-1.000027/t/encoding.t000644 000766 000024 00000001407 12512064415 017401 0ustar00etherstaff000000 000000 #!perl use strict; use warnings; use File::Spec; use Test::More; use Module::Metadata; if ("$]" < 5.008_003) { plan skip_all => 'Encoding test needs at least perl 5.8.3'; } my %versions = ( UTF8 => 3, UTF16BE => 4, UTF16LE => 5, ); plan tests => 4 * scalar(keys %versions); for my $enc (sort keys %versions) { my $pkg = "BOMTest::$enc"; my $vers = $versions{$enc}; my $pm = File::Spec->catfile(qw => "$enc.pm"); my $info = Module::Metadata->new_from_file($pm); is( $info->name, $pkg, "$enc: default package was found" ); is( $info->version, $vers, "$enc: version for default package" ); is( $info->version('Heart'), '1', 'version for ASCII package' ); is( $info->version("C\x{153}ur"), '2', 'version for Unicode package' ); } Module-Metadata-1.000027/t/endpod.t000644 000766 000024 00000000510 12512064415 017056 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 2; use Module::Metadata; # This test case tests about parsing pod after `__END__` token. my $pm_info = Module::Metadata->new_from_file('t/lib/ENDPOD.pm', collect_pod => 1,); is( $pm_info->name, 'ENDPOD', 'found default package' ); is(join(',', $pm_info->pod_inside), 'NAME'); Module-Metadata-1.000027/t/lib/000755 000766 000024 00000000000 12512064415 016172 5ustar00etherstaff000000 000000 Module-Metadata-1.000027/t/metadata.t000644 000766 000024 00000056706 12512064415 017407 0ustar00etherstaff000000 000000 # -*- mode: cperl; tab-width: 8; indent-tabs-mode: nil; basic-offset: 2 -*- # vim:ts=8:sw=2:et:sta:sts=2 use strict; use warnings; use Test::More 0.82; use IO::File; use File::Spec; use File::Temp; use File::Basename; use Cwd (); use File::Path; use Data::Dumper; my $undef; # parse various module $VERSION lines # format: expected version => code snippet my @modules = ( $undef => <<'---', # no $VERSION line package Simple; --- $undef => <<'---', # undefined $VERSION package Simple; our $VERSION; --- '1.23' => <<'---', # declared & defined on same line with 'our' package Simple; our $VERSION = '1.23'; --- '1.23' => <<'---', # declared & defined on separate lines with 'our' package Simple; our $VERSION; $VERSION = '1.23'; --- '1.23' => <<'---', # commented & defined on same line package Simple; our $VERSION = '1.23'; # our $VERSION = '4.56'; --- '1.23' => <<'---', # commented & defined on separate lines package Simple; # our $VERSION = '4.56'; our $VERSION = '1.23'; --- '1.23' => <<'---', # use vars package Simple; use vars qw( $VERSION ); $VERSION = '1.23'; --- '1.23' => <<'---', # choose the right default package based on package/file name package Simple::_private; $VERSION = '0'; package Simple; $VERSION = '1.23'; # this should be chosen for version --- '1.23' => <<'---', # just read the first $VERSION line package Simple; $VERSION = '1.23'; # we should see this line $VERSION = eval $VERSION; # and ignore this one --- '1.23' => <<'---', # just read the first $VERSION line in reopened package (1) package Simple; $VERSION = '1.23'; package Error::Simple; $VERSION = '2.34'; package Simple; --- '1.23' => <<'---', # just read the first $VERSION line in reopened package (2) package Simple; package Error::Simple; $VERSION = '2.34'; package Simple; $VERSION = '1.23'; --- '1.23' => <<'---', # mentions another module's $VERSION package Simple; $VERSION = '1.23'; if ( $Other::VERSION ) { # whatever } --- '1.23' => <<'---', # mentions another module's $VERSION in a different package package Simple; $VERSION = '1.23'; package Simple2; if ( $Simple::VERSION ) { # whatever } --- '1.23' => <<'---', # $VERSION checked only in assignments, not regexp ops package Simple; $VERSION = '1.23'; if ( $VERSION =~ /1\.23/ ) { # whatever } --- '1.23' => <<'---', # $VERSION checked only in assignments, not relational ops package Simple; $VERSION = '1.23'; if ( $VERSION == 3.45 ) { # whatever } --- '1.23' => <<'---', # $VERSION checked only in assignments, not relational ops package Simple; $VERSION = '1.23'; package Simple2; if ( $Simple::VERSION == 3.45 ) { # whatever } --- '1.23' => <<'---', # Fully qualified $VERSION declared in package package Simple; $Simple::VERSION = 1.23; --- '1.23' => <<'---', # Differentiate fully qualified $VERSION in a package package Simple; $Simple2::VERSION = '999'; $Simple::VERSION = 1.23; --- '1.23' => <<'---', # Differentiate fully qualified $VERSION and unqualified package Simple; $Simple2::VERSION = '999'; $VERSION = 1.23; --- '1.23' => <<'---', # $VERSION declared as package variable from within 'main' package $Simple::VERSION = '1.23'; { package Simple; $x = $y, $cats = $dogs; } --- '1.23' => <<'---', # $VERSION wrapped in parens - space inside package Simple; ( $VERSION ) = '1.23'; --- '1.23' => <<'---', # $VERSION wrapped in parens - no space inside package Simple; ($VERSION) = '1.23'; --- '1.23' => <<'---', # $VERSION follows a spurious 'package' in a quoted construct package Simple; __PACKAGE__->mk_accessors(qw( program socket proc package filename line codeline subroutine finished)); our $VERSION = "1.23"; --- '1.23' => <<'---', # $VERSION using version.pm package Simple; use version; our $VERSION = version->new('1.23'); --- 'v1.230' => <<'---', # $VERSION using version.pm and qv() package Simple; use version; our $VERSION = qv('1.230'); --- '1.230' => <<'---', # Two version assignments, should ignore second one $Simple::VERSION = '1.230'; $Simple::VERSION = eval $Simple::VERSION; --- '1.230000' => <<'---', # declared & defined on same line with 'our' package Simple; our $VERSION = '1.23_00_00'; --- '1.23' => <<'---', # package NAME VERSION package Simple 1.23; --- '1.23_01' => <<'---', # package NAME VERSION package Simple 1.23_01; --- 'v1.2.3' => <<'---', # package NAME VERSION package Simple v1.2.3; --- 'v1.2_3' => <<'---', # package NAME VERSION package Simple v1.2_3; --- '1.23' => <<'---', # trailing crud package Simple; our $VERSION; $VERSION = '1.23-alpha'; --- '1.23' => <<'---', # trailing crud package Simple; our $VERSION; $VERSION = '1.23b'; --- '1.234' => <<'---', # multi_underscore package Simple; our $VERSION; $VERSION = '1.2_3_4'; --- '0' => <<'---', # non-numeric package Simple; our $VERSION; $VERSION = 'onetwothree'; --- $undef => <<'---', # package NAME BLOCK, undef $VERSION package Simple { our $VERSION; } --- '1.23' => <<'---', # package NAME BLOCK, with $VERSION package Simple { our $VERSION = '1.23'; } --- '1.23' => <<'---', # package NAME VERSION BLOCK package Simple 1.23 { 1; } --- 'v1.2.3_4' => <<'---', # package NAME VERSION BLOCK package Simple v1.2.3_4 { 1; } --- '0' => <<'---', # set from separately-initialised variable package Simple; our $CVSVERSION = '$Revision: 1.7 $'; our ($VERSION) = ($CVSVERSION =~ /(\d+\.\d+)/); } --- 'v2.2.102.2' => <<'---', # our + bare v-string package Simple; our $VERSION = v2.2.102.2; --- '0.0.9_1' => <<'---', # our + dev release package Simple; our $VERSION = "0.0.9_1"; --- '1.12' => <<'---', # our + crazy string and substitution code package Simple; our $VERSION = '1.12.B55J2qn'; our $WTF = $VERSION; $WTF =~ s/^\d+\.\d+\.//; # attempts to rationalize $WTF go here. --- '1.12' => <<'---', # our in braces, as in Dist::Zilla::Plugin::PkgVersion with use_our = 1 package Simple; { our $VERSION = '1.12'; } --- sub { defined $_[0] and $_[0] =~ /^3\.14159/ } => <<'---', # calculated version - from Acme-Pi-3.14 package Simple; my $version = atan2(1,1) * 4; $Simple::VERSION = "$version"; 1; --- ); # format: expected package name => code snippet my @pkg_names = ( [ 'Simple' ] => <<'---', # package NAME package Simple; --- [ 'Simple::Edward' ] => <<'---', # package NAME::SUBNAME package Simple::Edward; --- [ 'Simple::Edward::' ] => <<'---', # package NAME::SUBNAME:: package Simple::Edward::; --- [ "Simple'Edward" ] => <<'---', # package NAME'SUBNAME package Simple'Edward; --- [ "Simple'Edward::" ] => <<'---', # package NAME'SUBNAME:: package Simple'Edward::; --- [ 'Simple::::Edward' ] => <<'---', # package NAME::::SUBNAME package Simple::::Edward; --- [ '::Simple::Edward' ] => <<'---', # package ::NAME::SUBNAME package ::Simple::Edward; --- [ 'main' ] => <<'---', # package NAME:SUBNAME (fail) package Simple:Edward; --- [ 'main' ] => <<'---', # package NAME' (fail) package Simple'; --- [ 'main' ] => <<'---', # package NAME::SUBNAME' (fail) package Simple::Edward'; --- [ 'main' ] => <<'---', # package NAME''SUBNAME (fail) package Simple''Edward; --- [ 'main' ] => <<'---', # package NAME-SUBNAME (fail) package Simple-Edward; --- ); # 2 tests per each pair of @modules (plus 1 for defined keys), 2 per pair of @pkg_names plan tests => 63 + ( @modules + grep { defined $modules[2*$_] } 0..$#modules/2 ) + ( @pkg_names ); require_ok('Module::Metadata'); { # class method C my $module = Module::Metadata->find_module_by_name( 'Module::Metadata' ); ok( -e $module, 'find_module_by_name() succeeds' ); } ######################### BEGIN { my $cwd = File::Spec->rel2abs(Cwd::cwd); sub original_cwd { return $cwd } } # Set up a temp directory sub tmpdir { my (@args) = @_; my $dir = $ENV{PERL_CORE} ? original_cwd : File::Spec->tmpdir; return File::Temp::tempdir('MMD-XXXXXXXX', CLEANUP => 0, DIR => $dir, @args); } my $tmp; BEGIN { $tmp = tmpdir; note "using temp dir $tmp"; } END { die "tests failed; leaving temp dir $tmp behind" if $ENV{AUTHOR_TESTING} and not Test::Builder->new->is_passing; note "removing temp dir $tmp"; chdir original_cwd; File::Path::rmtree($tmp); } # generates a new distribution: # files => { relative filename => $content ... } # returns the name of the distribution (not including version), # and the absolute path name to the dist. { my $test_num = 0; sub new_dist { my %opts = @_; my $distname = 'Simple' . $test_num++; my $distdir = File::Spec->catdir($tmp, $distname); note "using dist $distname in $distdir"; File::Path::mkpath($distdir) or die "failed to create '$distdir'"; foreach my $rel_filename (keys %{$opts{files}}) { my $abs_filename = File::Spec->catfile($distdir, $rel_filename); my $dirname = File::Basename::dirname($abs_filename); unless (-d $dirname) { File::Path::mkpath($dirname) or die "Can't create '$dirname'"; } note "creating $abs_filename"; my $fh = IO::File->new(">$abs_filename") or die "Can't write '$abs_filename'\n"; print $fh $opts{files}{$rel_filename}; close $fh; } chdir $distdir; return ($distname, $distdir); } } { # fail on invalid module name my $pm_info = Module::Metadata->new_from_module( 'Foo::Bar', inc => [] ); ok( !defined( $pm_info ), 'fail if can\'t find module by module name' ); } { # fail on invalid filename my $file = File::Spec->catfile( 'Foo', 'Bar.pm' ); my $pm_info = Module::Metadata->new_from_file( $file, inc => [] ); ok( !defined( $pm_info ), 'fail if can\'t find module by file name' ); } { my $file = File::Spec->catfile('lib', 'Simple.pm'); my ($dist_name, $dist_dir) = new_dist(files => { $file => "package Simple;\n" }); # construct from module filename my $pm_info = Module::Metadata->new_from_file( $file ); ok( defined( $pm_info ), 'new_from_file() succeeds' ); # construct from filehandle my $handle = IO::File->new($file); $pm_info = Module::Metadata->new_from_handle( $handle, $file ); ok( defined( $pm_info ), 'new_from_handle() succeeds' ); $pm_info = Module::Metadata->new_from_handle( $handle ); is( $pm_info, undef, "new_from_handle() without filename returns undef" ); close($handle); } { # construct from module name, using custom include path my $pm_info = Module::Metadata->new_from_module( 'Simple', inc => [ 'lib', @INC ] ); ok( defined( $pm_info ), 'new_from_module() succeeds' ); } # iterate through @modules pairwise my $test_case = 0; while (++$test_case and my ($expected_version, $code) = splice @modules, 0, 2 ) { SKIP: { skip( "No our() support until perl 5.6", (defined $expected_version ? 3 : 2) ) if $] < 5.006 && $code =~ /\bour\b/; skip( "No package NAME VERSION support until perl 5.11.1", (defined $expected_version ? 3 : 2) ) if $] < 5.011001 && $code =~ /package\s+[\w\:\']+\s+v?[0-9._]+/; my $file = File::Spec->catfile('lib', 'Simple.pm'); my ($dist_name, $dist_dir) = new_dist(files => { $file => $code }); my $warnings = ''; local $SIG{__WARN__} = sub { $warnings .= $_ for @_ }; my $pm_info = Module::Metadata->new_from_file( $file ); my $errs; my $got = $pm_info->version; # note that in Test::More 0.94 and earlier, is() stringifies first before comparing; # from 0.95_01 and later, it just lets the objects figure out how to handle 'eq' # We want to ensure we preserve the original, as long as it's legal, so we # explicitly check the stringified form. isa_ok($got, 'version') if defined $expected_version; if (ref($expected_version) eq 'CODE') { ok( $expected_version->($got), "case $test_case: module version passes match sub" ) or $errs++; } else { is( (defined $got ? "$got" : $got), $expected_version, "case $test_case: correct module version (" . (defined $expected_version? "'$expected_version'" : 'undef') . ')' ) or $errs++; } is( $warnings, '', "case $test_case: no warnings from parsing" ) or $errs++; diag Dumper({ got => $pm_info->version, module_contents => $code }) if $errs; } } $test_case = 0; while (++$test_case and my ($expected_name, $code) = splice @pkg_names, 0, 2) { my $file = File::Spec->catfile('lib', 'Simple.pm'); my ($dist_name, $dist_dir) = new_dist(files => { $file => $code }); my $warnings = ''; local $SIG{__WARN__} = sub { $warnings .= $_ for @_ }; my $pm_info = Module::Metadata->new_from_file( $file ); # Test::Builder will prematurely numify objects, so use this form my $errs; my @got = $pm_info->packages_inside(); is_deeply( \@got, $expected_name, "case $test_case: correct package names (expected '" . join(', ', @$expected_name) . "')" ) or $errs++; is( $warnings, '', "case $test_case: no warnings from parsing" ) or $errs++; diag "Got: '" . join(', ', @got) . "'\nModule contents:\n$code" if $errs; } { # Find each package only once my $file = File::Spec->catfile('lib', 'Simple.pm'); my ($dist_name, $dist_dir) = new_dist(files => { $file => <<'---' } ); package Simple; $VERSION = '1.23'; package Error::Simple; $VERSION = '2.34'; package Simple; --- my $pm_info = Module::Metadata->new_from_file( $file ); my @packages = $pm_info->packages_inside; is( @packages, 2, 'record only one occurence of each package' ); } { # Module 'Simple.pm' does not contain package 'Simple'; # constructor should not complain, no default module name or version my $file = File::Spec->catfile('lib', 'Simple.pm'); my ($dist_name, $dist_dir) = new_dist(files => { $file => <<'---' } ); package Simple::Not; $VERSION = '1.23'; --- my $pm_info = Module::Metadata->new_from_file( $file ); is( $pm_info->name, undef, 'no default package' ); is( $pm_info->version, undef, 'no version w/o default package' ); } { # Module 'Simple.pm' contains an alpha version # constructor should report first $VERSION found my $file = File::Spec->catfile('lib', 'Simple.pm'); my ($dist_name, $dist_dir) = new_dist(files => { $file => <<'---' } ); package Simple; $VERSION = '1.23_01'; $VERSION = eval $VERSION; --- my $pm_info = Module::Metadata->new_from_file( $file ); is( $pm_info->version, '1.23_01', 'alpha version reported'); # NOTE the following test has be done this way because Test::Builder is # too smart for our own good and tries to see if the version object is a # dual-var, which breaks with alpha versions: # Argument "1.23_0100" isn't numeric in addition (+) at # /usr/lib/perl5/5.8.7/Test/Builder.pm line 505. ok( $pm_info->version > 1.23, 'alpha version greater than non'); } # parse $VERSION lines scripts for package main my @scripts = ( <<'---', # package main declared #!perl -w package main; $VERSION = '0.01'; --- <<'---', # on first non-comment line, non declared package main #!perl -w $VERSION = '0.01'; --- <<'---', # after non-comment line #!perl -w use strict; $VERSION = '0.01'; --- <<'---', # 1st declared package #!perl -w package main; $VERSION = '0.01'; package _private; $VERSION = '999'; --- <<'---', # 2nd declared package #!perl -w package _private; $VERSION = '999'; package main; $VERSION = '0.01'; --- <<'---', # split package #!perl -w package main; package _private; $VERSION = '999'; package main; $VERSION = '0.01'; --- <<'---', # define 'main' version from other package package _private; $::VERSION = 0.01; $VERSION = '999'; --- <<'---', # define 'main' version from other package package _private; $VERSION = '999'; $::VERSION = 0.01; --- ); my ( $i, $n ) = ( 1, scalar( @scripts ) ); foreach my $script ( @scripts ) { my $file = File::Spec->catfile('bin', 'simple.plx'); my ($dist_name, $dist_dir) = new_dist(files => { $file => $script } ); my $pm_info = Module::Metadata->new_from_file( $file ); is( $pm_info->version, '0.01', "correct script version ($i of $n)" ); $i++; } { # examine properties of a module: name, pod, etc my $file = File::Spec->catfile('lib', 'Simple.pm'); my ($dist_name, $dist_dir) = new_dist(files => { $file => <<'---' } ); package Simple; $VERSION = '0.01'; package Simple::Ex; $VERSION = '0.02'; =head1 NAME Simple - It's easy. =head1 AUTHOR Simple Simon You can find me on the IRC channel #simon on irc.perl.org. =cut --- my $pm_info = Module::Metadata->new_from_module( 'Simple', inc => [ 'lib', @INC ] ); is( $pm_info->name, 'Simple', 'found default package' ); is( $pm_info->version, '0.01', 'version for default package' ); # got correct version for secondary package is( $pm_info->version( 'Simple::Ex' ), '0.02', 'version for secondary package' ); my $filename = $pm_info->filename; ok( defined( $filename ) && -e $filename, 'filename() returns valid path to module file' ); my @packages = $pm_info->packages_inside; is( @packages, 2, 'found correct number of packages' ); is( $packages[0], 'Simple', 'packages stored in order found' ); # we can detect presence of pod regardless of whether we are collecting it ok( $pm_info->contains_pod, 'contains_pod() succeeds' ); my @pod = $pm_info->pod_inside; is_deeply( \@pod, [qw(NAME AUTHOR)], 'found all pod sections' ); is( $pm_info->pod('NONE') , undef, 'return undef() if pod section not present' ); is( $pm_info->pod('NAME'), undef, 'return undef() if pod section not collected' ); # collect_pod $pm_info = Module::Metadata->new_from_module( 'Simple', inc => [ 'lib', @INC ], collect_pod => 1 ); my %pod; for my $section (qw(NAME AUTHOR)) { my $content = $pm_info->pod( $section ); if ( $content ) { $content =~ s/^\s+//; $content =~ s/\s+$//; } $pod{$section} = $content; } my %expected = ( NAME => q|Simple - It's easy.|, AUTHOR => <<'EXPECTED' Simple Simon You can find me on the IRC channel #simon on irc.perl.org. EXPECTED ); for my $text (values %expected) { $text =~ s/^\s+//; $text =~ s/\s+$//; } is( $pod{NAME}, $expected{NAME}, 'collected NAME pod section' ); is( $pod{AUTHOR}, $expected{AUTHOR}, 'collected AUTHOR pod section' ); } { # test things that look like POD, but aren't my $file = File::Spec->catfile('lib', 'Simple.pm'); my ($dist_name, $dist_dir) = new_dist(files => { $file => <<'---' } ); package Simple; =YES THIS STARTS POD our $VERSION = '999'; =cute our $VERSION = '666'; =cut *foo =*no_this_does_not_start_pod; our $VERSION = '1.23'; --- my $pm_info = Module::Metadata->new_from_file('lib/Simple.pm'); is( $pm_info->name, 'Simple', 'found default package' ); is( $pm_info->version, '1.23', 'version for default package' ); } { # Make sure processing stops after __DATA__ my $file = File::Spec->catfile('lib', 'Simple.pm'); my ($dist_name, $dist_dir) = new_dist(files => { $file => <<'---' } ); package Simple; $VERSION = '0.01'; __DATA__ *UNIVERSAL::VERSION = sub { foo(); }; --- my $pm_info = Module::Metadata->new_from_file('lib/Simple.pm'); is( $pm_info->name, 'Simple', 'found default package' ); is( $pm_info->version, '0.01', 'version for default package' ); my @packages = $pm_info->packages_inside; is_deeply(\@packages, ['Simple'], 'packages inside'); } { # Make sure we handle version.pm $VERSIONs well my $file = File::Spec->catfile('lib', 'Simple.pm'); my ($dist_name, $dist_dir) = new_dist(files => { $file => <<'---' } ); package Simple; $VERSION = version->new('0.60.' . (qw$Revision: 128 $)[1]); package Simple::Simon; $VERSION = version->new('0.61.' . (qw$Revision: 129 $)[1]); --- my $pm_info = Module::Metadata->new_from_file('lib/Simple.pm'); is( $pm_info->name, 'Simple', 'found default package' ); is( $pm_info->version, '0.60.128', 'version for default package' ); my @packages = $pm_info->packages_inside; is_deeply([sort @packages], ['Simple', 'Simple::Simon'], 'packages inside'); is( $pm_info->version('Simple::Simon'), '0.61.129', 'version for embedded package' ); } # check that package_versions_from_directory works { my $file = File::Spec->catfile('lib', 'Simple.pm'); my ($dist_name, $dist_dir) = new_dist(files => { $file => <<'---' } ); package Simple; $VERSION = '0.01'; package Simple::Ex; $VERSION = '0.02'; { package main; # should ignore this } { package DB; # should ignore this } { package Simple::_private; # should ignore this } =head1 NAME Simple - It's easy. =head1 AUTHOR Simple Simon =cut --- my $exp_pvfd = { 'Simple' => { 'file' => 'Simple.pm', 'version' => '0.01' }, 'Simple::Ex' => { 'file' => 'Simple.pm', 'version' => '0.02' } }; my $got_pvfd = Module::Metadata->package_versions_from_directory('lib'); is_deeply( $got_pvfd, $exp_pvfd, "package_version_from_directory()" ) or diag explain $got_pvfd; { my $got_provides = Module::Metadata->provides(dir => 'lib', version => 2); my $exp_provides = { 'Simple' => { 'file' => 'lib/Simple.pm', 'version' => '0.01' }, 'Simple::Ex' => { 'file' => 'lib/Simple.pm', 'version' => '0.02' } }; is_deeply( $got_provides, $exp_provides, "provides()" ) or diag explain $got_provides; } { my $got_provides = Module::Metadata->provides(dir => 'lib', prefix => 'other', version => 1.4); my $exp_provides = { 'Simple' => { 'file' => 'other/Simple.pm', 'version' => '0.01' }, 'Simple::Ex' => { 'file' => 'other/Simple.pm', 'version' => '0.02' } }; is_deeply( $got_provides, $exp_provides, "provides()" ) or diag explain $got_provides; } } # Check package_versions_from_directory with regard to case-sensitivity { my $file = File::Spec->catfile('lib', 'Simple.pm'); my ($dist_name, $dist_dir) = new_dist(files => { $file => <<'---' } ); package simple; $VERSION = '0.01'; --- my $pm_info = Module::Metadata->new_from_file('lib/Simple.pm'); is( $pm_info->name, undef, 'no default package' ); is( $pm_info->version, undef, 'version for default package' ); is( $pm_info->version('simple'), '0.01', 'version for lower-case package' ); is( $pm_info->version('Simple'), undef, 'version for capitalized package' ); ok( $pm_info->is_indexable(), 'an indexable package is found' ); ok( $pm_info->is_indexable('simple'), 'the simple package is indexable' ); ok( !$pm_info->is_indexable('Simple'), 'the Simple package would not be indexed' ); } { my $file = File::Spec->catfile('lib', 'Simple.pm'); my ($dist_name, $dist_dir) = new_dist(files => { $file => <<'---' } ); package simple; $VERSION = '0.01'; package Simple; $VERSION = '0.02'; package SiMpLe; $VERSION = '0.03'; --- my $pm_info = Module::Metadata->new_from_file('lib/Simple.pm'); is( $pm_info->name, 'Simple', 'found default package' ); is( $pm_info->version, '0.02', 'version for default package' ); is( $pm_info->version('simple'), '0.01', 'version for lower-case package' ); is( $pm_info->version('Simple'), '0.02', 'version for capitalized package' ); is( $pm_info->version('SiMpLe'), '0.03', 'version for mixed-case package' ); ok( $pm_info->is_indexable('simple'), 'the simple package is indexable' ); ok( $pm_info->is_indexable('Simple'), 'the Simple package is indexable' ); } { my $file = File::Spec->catfile('lib', 'Simple.pm'); my ($dist_name, $dist_dir) = new_dist(files => { $file => <<'---' } ); package ## hide from PAUSE simple; $VERSION = '0.01'; --- my $pm_info = Module::Metadata->new_from_file('lib/Simple.pm'); is( $pm_info->name, undef, 'no package names found' ); ok( !$pm_info->is_indexable('simple'), 'the simple package would not be indexed' ); ok( !$pm_info->is_indexable('Simple'), 'the Simple package would not be indexed' ); ok( !$pm_info->is_indexable(), 'no indexable package is found' ); } Module-Metadata-1.000027/t/taint.t000644 000766 000024 00000001577 12512064415 016742 0ustar00etherstaff000000 000000 #!/usr/bin/perl -T use strict; use warnings; use Config; use Test::More $Config{ccflags} =~ /-DSILENT_NO_TAINT_SUPPORT/ ? ( skip_all => 'No taint support' ) : ( tests => 2 ); use Module::Metadata; use Carp 'croak'; # stolen liberally from Class-Tiny/t/lib/TestUtils.pm - thanks xdg! sub exception(&) { my $code = shift; my $success = eval { $code->(); 1 }; my $err = $@; return undef if $success; # original returned '' croak "Execution died, but the error was lost" unless $@; return $@; } my $taint_on = ! eval { no warnings; join('',values %ENV), kill 0; 1; }; ok($taint_on, 'taint flag is set'); # without the fix, we get: # Insecure dependency in eval while running with -T switch at lib/Module/Metadata.pm line 668, line 15. is( exception { Module::Metadata->new_from_module( "Module::Metadata" )->version }, undef, 'no exception', ); Module-Metadata-1.000027/t/version.t000644 000766 000024 00000000766 12512064415 017307 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Module::Metadata; use lib "t/lib/0_2"; plan tests => 4; require Foo; is($Foo::VERSION, 0.2, 'affirmed version of loaded module'); my $meta = Module::Metadata->new_from_module("Foo", inc => [ "t/lib/0_1" ] ); is($meta->version, 0.1, 'extracted proper version from scanned module'); is($Foo::VERSION, 0.2, 'loaded module still retains its version'); ok(eval "use Foo 0.2; 1", 'successfully loaded module again') or diag 'got exception: ', $@; Module-Metadata-1.000027/t/lib/0_1/000755 000766 000024 00000000000 12512064415 016551 5ustar00etherstaff000000 000000 Module-Metadata-1.000027/t/lib/0_2/000755 000766 000024 00000000000 12512064415 016552 5ustar00etherstaff000000 000000 Module-Metadata-1.000027/t/lib/ENDPOD.pm000644 000766 000024 00000000130 12512064415 017473 0ustar00etherstaff000000 000000 package ENDPOD; use strict; use warnings; 1; __END__ =head1 NAME ENDPOD - End pod. Module-Metadata-1.000027/t/lib/0_2/Foo.pm000644 000766 000024 00000000047 12512064415 017634 0ustar00etherstaff000000 000000 package Foo; $Foo::VERSION = '0.2'; 1; Module-Metadata-1.000027/t/lib/0_1/Foo.pm000644 000766 000024 00000000047 12512064415 017633 0ustar00etherstaff000000 000000 package Foo; $Foo::VERSION = '0.1'; 1; Module-Metadata-1.000027/lib/Module/000755 000766 000024 00000000000 12512064415 017154 5ustar00etherstaff000000 000000 Module-Metadata-1.000027/lib/Module/Metadata.pm000644 000766 000024 00000074047 12512064415 021246 0ustar00etherstaff000000 000000 # -*- mode: cperl; tab-width: 8; indent-tabs-mode: nil; basic-offset: 2 -*- # vim:ts=8:sw=2:et:sta:sts=2 package Module::Metadata; # git description: v1.000026-12-g9b12bf1 # Adapted from Perl-licensed code originally distributed with # Module-Build by Ken Williams # This module provides routines to gather information about # perl modules (assuming this may be expanded in the distant # parrot future to look at other types of modules). sub __clean_eval { eval $_[0] } use strict; use warnings; our $VERSION = '1.000027'; use Carp qw/croak/; use File::Spec; BEGIN { # Try really hard to not depend ony any DynaLoaded module, such as IO::File or Fcntl eval { require Fcntl; Fcntl->import('SEEK_SET'); 1; } or *SEEK_SET = sub { 0 } } use version 0.87; BEGIN { if ($INC{'Log/Contextual.pm'}) { require "Log/Contextual/WarnLogger.pm"; # Hide from AutoPrereqs Log::Contextual->import('log_info', '-default_logger' => Log::Contextual::WarnLogger->new({ env_prefix => 'MODULE_METADATA', }), ); } else { *log_info = sub (&) { warn $_[0]->() }; } } use File::Find qw(find); my $V_NUM_REGEXP = qr{v?[0-9._]+}; # crudely, a v-string or decimal my $PKG_FIRST_WORD_REGEXP = qr{ # the FIRST word in a package name [a-zA-Z_] # the first word CANNOT start with a digit (?: [\w']? # can contain letters, digits, _, or ticks \w # But, NO multi-ticks or trailing ticks )* }x; my $PKG_ADDL_WORD_REGEXP = qr{ # the 2nd+ word in a package name \w # the 2nd+ word CAN start with digits (?: [\w']? # and can contain letters or ticks \w # But, NO multi-ticks or trailing ticks )* }x; my $PKG_NAME_REGEXP = qr{ # match a package name (?: :: )? # a pkg name can start with arisdottle $PKG_FIRST_WORD_REGEXP # a package word (?: (?: :: )+ ### arisdottle (allow one or many times) $PKG_ADDL_WORD_REGEXP ### a package word )* # ^ zero, one or many times (?: :: # allow trailing arisdottle )? }x; my $PKG_REGEXP = qr{ # match a package declaration ^[\s\{;]* # intro chars on a line package # the word 'package' \s+ # whitespace ($PKG_NAME_REGEXP) # a package name \s* # optional whitespace ($V_NUM_REGEXP)? # optional version number \s* # optional whitesapce [;\{] # semicolon line terminator or block start (since 5.16) }x; my $VARNAME_REGEXP = qr{ # match fully-qualified VERSION name ([\$*]) # sigil - $ or * ( ( # optional leading package name (?:::|\')? # possibly starting like just :: (a la $::VERSION) (?:\w+(?:::|\'))* # Foo::Bar:: ... )? VERSION )\b }x; my $VERS_REGEXP = qr{ # match a VERSION definition (?: \(\s*$VARNAME_REGEXP\s*\) # with parens | $VARNAME_REGEXP # without parens ) \s* =[^=~>] # = but not ==, nor =~, nor => }x; sub new_from_file { my $class = shift; my $filename = File::Spec->rel2abs( shift ); return undef unless defined( $filename ) && -f $filename; return $class->_init(undef, $filename, @_); } sub new_from_handle { my $class = shift; my $handle = shift; my $filename = shift; return undef unless defined($handle) && defined($filename); $filename = File::Spec->rel2abs( $filename ); return $class->_init(undef, $filename, @_, handle => $handle); } sub new_from_module { my $class = shift; my $module = shift; my %props = @_; $props{inc} ||= \@INC; my $filename = $class->find_module_by_name( $module, $props{inc} ); return undef unless defined( $filename ) && -f $filename; return $class->_init($module, $filename, %props); } { my $compare_versions = sub { my ($v1, $op, $v2) = @_; $v1 = version->new($v1) unless UNIVERSAL::isa($v1,'version'); my $eval_str = "\$v1 $op \$v2"; my $result = eval $eval_str; log_info { "error comparing versions: '$eval_str' $@" } if $@; return $result; }; my $normalize_version = sub { my ($version) = @_; if ( $version =~ /[=<>!,]/ ) { # logic, not just version # take as is without modification } elsif ( ref $version eq 'version' ) { # version objects $version = $version->is_qv ? $version->normal : $version->stringify; } elsif ( $version =~ /^[^v][^.]*\.[^.]+\./ ) { # no leading v, multiple dots # normalize string tuples without "v": "1.2.3" -> "v1.2.3" $version = "v$version"; } else { # leave alone } return $version; }; # separate out some of the conflict resolution logic my $resolve_module_versions = sub { my $packages = shift; my( $file, $version ); my $err = ''; foreach my $p ( @$packages ) { if ( defined( $p->{version} ) ) { if ( defined( $version ) ) { if ( $compare_versions->( $version, '!=', $p->{version} ) ) { $err .= " $p->{file} ($p->{version})\n"; } else { # same version declared multiple times, ignore } } else { $file = $p->{file}; $version = $p->{version}; } } $file ||= $p->{file} if defined( $p->{file} ); } if ( $err ) { $err = " $file ($version)\n" . $err; } my %result = ( file => $file, version => $version, err => $err ); return \%result; }; sub provides { my $class = shift; croak "provides() requires key/value pairs \n" if @_ % 2; my %args = @_; croak "provides() takes only one of 'dir' or 'files'\n" if $args{dir} && $args{files}; croak "provides() requires a 'version' argument" unless defined $args{version}; croak "provides() does not support version '$args{version}' metadata" unless grep { $args{version} eq $_ } qw/1.4 2/; $args{prefix} = 'lib' unless defined $args{prefix}; my $p; if ( $args{dir} ) { $p = $class->package_versions_from_directory($args{dir}); } else { croak "provides() requires 'files' to be an array reference\n" unless ref $args{files} eq 'ARRAY'; $p = $class->package_versions_from_directory($args{files}); } # Now, fix up files with prefix if ( length $args{prefix} ) { # check in case disabled with q{} $args{prefix} =~ s{/$}{}; for my $v ( values %$p ) { $v->{file} = "$args{prefix}/$v->{file}"; } } return $p } sub package_versions_from_directory { my ( $class, $dir, $files ) = @_; my @files; if ( $files ) { @files = @$files; } else { find( { wanted => sub { push @files, $_ if -f $_ && /\.pm$/; }, no_chdir => 1, }, $dir ); } # First, we enumerate all packages & versions, # separating into primary & alternative candidates my( %prime, %alt ); foreach my $file (@files) { my $mapped_filename = File::Spec::Unix->abs2rel( $file, $dir ); my @path = split( /\//, $mapped_filename ); (my $prime_package = join( '::', @path )) =~ s/\.pm$//; my $pm_info = $class->new_from_file( $file ); foreach my $package ( $pm_info->packages_inside ) { next if $package eq 'main'; # main can appear numerous times, ignore next if $package eq 'DB'; # special debugging package, ignore next if grep /^_/, split( /::/, $package ); # private package, ignore my $version = $pm_info->version( $package ); $prime_package = $package if lc($prime_package) eq lc($package); if ( $package eq $prime_package ) { if ( exists( $prime{$package} ) ) { croak "Unexpected conflict in '$package'; multiple versions found.\n"; } else { $mapped_filename = "$package.pm" if lc("$package.pm") eq lc($mapped_filename); $prime{$package}{file} = $mapped_filename; $prime{$package}{version} = $version if defined( $version ); } } else { push( @{$alt{$package}}, { file => $mapped_filename, version => $version, } ); } } } # Then we iterate over all the packages found above, identifying conflicts # and selecting the "best" candidate for recording the file & version # for each package. foreach my $package ( keys( %alt ) ) { my $result = $resolve_module_versions->( $alt{$package} ); if ( exists( $prime{$package} ) ) { # primary package selected if ( $result->{err} ) { # Use the selected primary package, but there are conflicting # errors among multiple alternative packages that need to be # reported log_info { "Found conflicting versions for package '$package'\n" . " $prime{$package}{file} ($prime{$package}{version})\n" . $result->{err} }; } elsif ( defined( $result->{version} ) ) { # There is a primary package selected, and exactly one # alternative package if ( exists( $prime{$package}{version} ) && defined( $prime{$package}{version} ) ) { # Unless the version of the primary package agrees with the # version of the alternative package, report a conflict if ( $compare_versions->( $prime{$package}{version}, '!=', $result->{version} ) ) { log_info { "Found conflicting versions for package '$package'\n" . " $prime{$package}{file} ($prime{$package}{version})\n" . " $result->{file} ($result->{version})\n" }; } } else { # The prime package selected has no version so, we choose to # use any alternative package that does have a version $prime{$package}{file} = $result->{file}; $prime{$package}{version} = $result->{version}; } } else { # no alt package found with a version, but we have a prime # package so we use it whether it has a version or not } } else { # No primary package was selected, use the best alternative if ( $result->{err} ) { log_info { "Found conflicting versions for package '$package'\n" . $result->{err} }; } # Despite possible conflicting versions, we choose to record # something rather than nothing $prime{$package}{file} = $result->{file}; $prime{$package}{version} = $result->{version} if defined( $result->{version} ); } } # Normalize versions. Can't use exists() here because of bug in YAML::Node. # XXX "bug in YAML::Node" comment seems irrelevant -- dagolden, 2009-05-18 for (grep defined $_->{version}, values %prime) { $_->{version} = $normalize_version->( $_->{version} ); } return \%prime; } } sub _init { my $class = shift; my $module = shift; my $filename = shift; my %props = @_; my $handle = delete $props{handle}; my( %valid_props, @valid_props ); @valid_props = qw( collect_pod inc ); @valid_props{@valid_props} = delete( @props{@valid_props} ); warn "Unknown properties: @{[keys %props]}\n" if scalar( %props ); my %data = ( module => $module, filename => $filename, version => undef, packages => [], versions => {}, pod => {}, pod_headings => [], collect_pod => 0, %valid_props, ); my $self = bless(\%data, $class); if ( not $handle ) { my $filename = $self->{filename}; open $handle, '<', $filename or croak( "Can't open '$filename': $!" ); $self->_handle_bom($handle, $filename); } $self->_parse_fh($handle); unless($self->{module} and length($self->{module})) { my ($v, $d, $f) = File::Spec->splitpath($self->{filename}); if($f =~ /\.pm$/) { $f =~ s/\..+$//; my @candidates = grep /$f$/, @{$self->{packages}}; $self->{module} = shift(@candidates); # punt } else { if(grep /main/, @{$self->{packages}}) { $self->{module} = 'main'; } else { $self->{module} = $self->{packages}[0] || ''; } } } $self->{version} = $self->{versions}{$self->{module}} if defined( $self->{module} ); return $self; } # class method sub _do_find_module { my $class = shift; my $module = shift || croak 'find_module_by_name() requires a package name'; my $dirs = shift || \@INC; my $file = File::Spec->catfile(split( /::/, $module)); foreach my $dir ( @$dirs ) { my $testfile = File::Spec->catfile($dir, $file); return [ File::Spec->rel2abs( $testfile ), $dir ] if -e $testfile and !-d _; # For stuff like ExtUtils::xsubpp $testfile .= '.pm'; return [ File::Spec->rel2abs( $testfile ), $dir ] if -e $testfile; } return; } # class method sub find_module_by_name { my $found = shift()->_do_find_module(@_) or return; return $found->[0]; } # class method sub find_module_dir_by_name { my $found = shift()->_do_find_module(@_) or return; return $found->[1]; } # given a line of perl code, attempt to parse it if it looks like a # $VERSION assignment, returning sigil, full name, & package name sub _parse_version_expression { my $self = shift; my $line = shift; my( $sigil, $variable_name, $package); if ( $line =~ /$VERS_REGEXP/o ) { ( $sigil, $variable_name, $package) = $2 ? ( $1, $2, $3 ) : ( $4, $5, $6 ); if ( $package ) { $package = ($package eq '::') ? 'main' : $package; $package =~ s/::$//; } } return ( $sigil, $variable_name, $package ); } # Look for a UTF-8/UTF-16BE/UTF-16LE BOM at the beginning of the stream. # If there's one, then skip it and set the :encoding layer appropriately. sub _handle_bom { my ($self, $fh, $filename) = @_; my $pos = tell $fh; return unless defined $pos; my $buf = ' ' x 2; my $count = read $fh, $buf, length $buf; return unless defined $count and $count >= 2; my $encoding; if ( $buf eq "\x{FE}\x{FF}" ) { $encoding = 'UTF-16BE'; } elsif ( $buf eq "\x{FF}\x{FE}" ) { $encoding = 'UTF-16LE'; } elsif ( $buf eq "\x{EF}\x{BB}" ) { $buf = ' '; $count = read $fh, $buf, length $buf; if ( defined $count and $count >= 1 and $buf eq "\x{BF}" ) { $encoding = 'UTF-8'; } } if ( defined $encoding ) { if ( "$]" >= 5.008 ) { binmode( $fh, ":encoding($encoding)" ); } } else { seek $fh, $pos, SEEK_SET or croak( sprintf "Can't reset position to the top of '$filename'" ); } return $encoding; } sub _parse_fh { my ($self, $fh) = @_; my( $in_pod, $seen_end, $need_vers ) = ( 0, 0, 0 ); my( @packages, %vers, %pod, @pod ); my $package = 'main'; my $pod_sect = ''; my $pod_data = ''; my $in_end = 0; while (defined( my $line = <$fh> )) { my $line_num = $.; chomp( $line ); # From toke.c : any line that begins by "=X", where X is an alphabetic # character, introduces a POD segment. my $is_cut; if ( $line =~ /^=([a-zA-Z].*)/ ) { my $cmd = $1; # Then it goes back to Perl code for "=cutX" where X is a non-alphabetic # character (which includes the newline, but here we chomped it away). $is_cut = $cmd =~ /^cut(?:[^a-zA-Z]|$)/; $in_pod = !$is_cut; } if ( $in_pod ) { if ( $line =~ /^=head[1-4]\s+(.+)\s*$/ ) { push( @pod, $1 ); if ( $self->{collect_pod} && length( $pod_data ) ) { $pod{$pod_sect} = $pod_data; $pod_data = ''; } $pod_sect = $1; } elsif ( $self->{collect_pod} ) { $pod_data .= "$line\n"; } } elsif ( $is_cut ) { if ( $self->{collect_pod} && length( $pod_data ) ) { $pod{$pod_sect} = $pod_data; $pod_data = ''; } $pod_sect = ''; } else { # Skip after __END__ next if $in_end; # Skip comments in code next if $line =~ /^\s*#/; # Would be nice if we could also check $in_string or something too if ($line eq '__END__') { $in_end++; next; } last if $line eq '__DATA__'; # parse $line to see if it's a $VERSION declaration my( $version_sigil, $version_fullname, $version_package ) = index($line, 'VERSION') >= 1 ? $self->_parse_version_expression( $line ) : (); if ( $line =~ /$PKG_REGEXP/o ) { $package = $1; my $version = $2; push( @packages, $package ) unless grep( $package eq $_, @packages ); $need_vers = defined $version ? 0 : 1; if ( not exists $vers{$package} and defined $version ){ # Upgrade to a version object. my $dwim_version = eval { _dwim_version($version) }; croak "Version '$version' from $self->{filename} does not appear to be valid:\n$line\n\nThe fatal error was: $@\n" unless defined $dwim_version; # "0" is OK! $vers{$package} = $dwim_version; } # VERSION defined with full package spec, i.e. $Module::VERSION } elsif ( $version_fullname && $version_package ) { push( @packages, $version_package ) unless grep( $version_package eq $_, @packages ); $need_vers = 0 if $version_package eq $package; unless ( defined $vers{$version_package} && length $vers{$version_package} ) { $vers{$version_package} = $self->_evaluate_version_line( $version_sigil, $version_fullname, $line ); } # first non-comment line in undeclared package main is VERSION } elsif ( $package eq 'main' && $version_fullname && !exists($vers{main}) ) { $need_vers = 0; my $v = $self->_evaluate_version_line( $version_sigil, $version_fullname, $line ); $vers{$package} = $v; push( @packages, 'main' ); # first non-comment line in undeclared package defines package main } elsif ( $package eq 'main' && !exists($vers{main}) && $line =~ /\w/ ) { $need_vers = 1; $vers{main} = ''; push( @packages, 'main' ); # only keep if this is the first $VERSION seen } elsif ( $version_fullname && $need_vers ) { $need_vers = 0; my $v = $self->_evaluate_version_line( $version_sigil, $version_fullname, $line ); unless ( defined $vers{$package} && length $vers{$package} ) { $vers{$package} = $v; } } } } if ( $self->{collect_pod} && length($pod_data) ) { $pod{$pod_sect} = $pod_data; } $self->{versions} = \%vers; $self->{packages} = \@packages; $self->{pod} = \%pod; $self->{pod_headings} = \@pod; } { my $pn = 0; sub _evaluate_version_line { my $self = shift; my( $sigil, $variable_name, $line ) = @_; # We compile into a local sub because 'use version' would cause # compiletime/runtime issues with local() $pn++; # everybody gets their own package my $eval = qq{ my \$dummy = q# Hide from _packages_inside() #; package Module::Metadata::_version::p${pn}; use version; sub { local $sigil$variable_name; $line; \$$variable_name }; }; $eval = $1 if $eval =~ m{^(.+)}s; local $^W; # Try to get the $VERSION my $vsub = __clean_eval($eval); # some modules say $VERSION $Foo::Bar::VERSION, but Foo::Bar isn't # installed, so we need to hunt in ./lib for it if ( $@ =~ /Can't locate/ && -d 'lib' ) { local @INC = ('lib',@INC); $vsub = __clean_eval($eval); } warn "Error evaling version line '$eval' in $self->{filename}: $@\n" if $@; (ref($vsub) eq 'CODE') or croak "failed to build version sub for $self->{filename}"; my $result = eval { $vsub->() }; # FIXME: $eval is not the right thing to print here croak "Could not get version from $self->{filename} by executing:\n$eval\n\nThe fatal error was: $@\n" if $@; # Upgrade it into a version object my $version = eval { _dwim_version($result) }; # FIXME: $eval is not the right thing to print here croak "Version '$result' from $self->{filename} does not appear to be valid:\n$eval\n\nThe fatal error was: $@\n" unless defined $version; # "0" is OK! return $version; } } # Try to DWIM when things fail the lax version test in obvious ways { my @version_prep = ( # Best case, it just works sub { return shift }, # If we still don't have a version, try stripping any # trailing junk that is prohibited by lax rules sub { my $v = shift; $v =~ s{([0-9])[a-z-].*$}{$1}i; # 1.23-alpha or 1.23b return $v; }, # Activestate apparently creates custom versions like '1.23_45_01', which # cause version.pm to think it's an invalid alpha. So check for that # and strip them sub { my $v = shift; my $num_dots = () = $v =~ m{(\.)}g; my $num_unders = () = $v =~ m{(_)}g; my $leading_v = substr($v,0,1) eq 'v'; if ( ! $leading_v && $num_dots < 2 && $num_unders > 1 ) { $v =~ s{_}{}g; $num_unders = () = $v =~ m{(_)}g; } return $v; }, # Worst case, try numifying it like we would have before version objects sub { my $v = shift; no warnings 'numeric'; return 0 + $v; }, ); sub _dwim_version { my ($result) = shift; return $result if ref($result) eq 'version'; my ($version, $error); for my $f (@version_prep) { $result = $f->($result); $version = eval { version->new($result) }; $error ||= $@ if $@; # capture first failure last if defined $version; } croak $error unless defined $version; return $version; } } ############################################################ # accessors sub name { $_[0]->{module} } sub filename { $_[0]->{filename} } sub packages_inside { @{$_[0]->{packages}} } sub pod_inside { @{$_[0]->{pod_headings}} } sub contains_pod { 0+@{$_[0]->{pod_headings}} } sub version { my $self = shift; my $mod = shift || $self->{module}; my $vers; if ( defined( $mod ) && length( $mod ) && exists( $self->{versions}{$mod} ) ) { return $self->{versions}{$mod}; } else { return undef; } } sub pod { my $self = shift; my $sect = shift; if ( defined( $sect ) && length( $sect ) && exists( $self->{pod}{$sect} ) ) { return $self->{pod}{$sect}; } else { return undef; } } sub is_indexable { my ($self, $package) = @_; my @indexable_packages = grep { $_ ne 'main' } $self->packages_inside; # check for specific package, if provided return !! grep { $_ eq $package } @indexable_packages if $package; # otherwise, check for any indexable packages at all return !! @indexable_packages; } 1; =head1 NAME Module::Metadata - Gather package and POD information from perl module files =head1 SYNOPSIS use Module::Metadata; # information about a .pm file my $info = Module::Metadata->new_from_file( $file ); my $version = $info->version; # CPAN META 'provides' field for .pm files in a directory my $provides = Module::Metadata->provides( dir => 'lib', version => 2 ); =head1 DESCRIPTION This module provides a standard way to gather metadata about a .pm file through (mostly) static analysis and (some) code execution. When determining the version of a module, the C<$VERSION> assignment is Ced, as is traditional in the CPAN toolchain. =head1 CLASS METHODS =head2 C<< new_from_file($filename, collect_pod => 1) >> Constructs a C object given the path to a file. Returns undef if the filename does not exist. C is a optional boolean argument that determines whether POD data is collected and stored for reference. POD data is not collected by default. POD headings are always collected. If the file begins by an UTF-8, UTF-16BE or UTF-16LE byte-order mark, then it is skipped before processing, and the content of the file is also decoded appropriately starting from perl 5.8. =head2 C<< new_from_handle($handle, $filename, collect_pod => 1) >> This works just like C, except that a handle can be provided as the first argument. Note that there is no validation to confirm that the handle is a handle or something that can act like one. Passing something that isn't a handle will cause a exception when trying to read from it. The C argument is mandatory or undef will be returned. You are responsible for setting the decoding layers on C<$handle> if required. =head2 C<< new_from_module($module, collect_pod => 1, inc => \@dirs) >> Constructs a C object given a module or package name. Returns undef if the module cannot be found. In addition to accepting the C argument as described above, this method accepts a C argument which is a reference to an array of directories to search for the module. If none are given, the default is @INC. If the file that contains the module begins by an UTF-8, UTF-16BE or UTF-16LE byte-order mark, then it is skipped before processing, and the content of the file is also decoded appropriately starting from perl 5.8. =head2 C<< find_module_by_name($module, \@dirs) >> Returns the path to a module given the module or package name. A list of directories can be passed in as an optional parameter, otherwise @INC is searched. Can be called as either an object or a class method. =head2 C<< find_module_dir_by_name($module, \@dirs) >> Returns the entry in C<@dirs> (or C<@INC> by default) that contains the module C<$module>. A list of directories can be passed in as an optional parameter, otherwise @INC is searched. Can be called as either an object or a class method. =head2 C<< provides( %options ) >> This is a convenience wrapper around C to generate a CPAN META C data structure. It takes key/value pairs. Valid option keys include: =over =item version B<(required)> Specifies which version of the L should be used as the format of the C output. Currently only '1.4' and '2' are supported (and their format is identical). This may change in the future as the definition of C changes. The C option is required. If it is omitted or if an unsupported version is given, then C will throw an error. =item dir Directory to search recursively for F<.pm> files. May not be specified with C. =item files Array reference of files to examine. May not be specified with C. =item prefix String to prepend to the C field of the resulting output. This defaults to F, which is the common case for most CPAN distributions with their F<.pm> files in F. This option ensures the META information has the correct relative path even when the C or C arguments are absolute or have relative paths from a location other than the distribution root. =back For example, given C of 'lib' and C of 'lib', the return value is a hashref of the form: { 'Package::Name' => { version => '0.123', file => 'lib/Package/Name.pm' }, 'OtherPackage::Name' => ... } =head2 C<< package_versions_from_directory($dir, \@files?) >> Scans C<$dir> for .pm files (unless C<@files> is given, in which case looks for those files in C<$dir> - and reads each file for packages and versions, returning a hashref of the form: { 'Package::Name' => { version => '0.123', file => 'Package/Name.pm' }, 'OtherPackage::Name' => ... } The C and C
packages are always omitted, as are any "private" packages that have leading underscores in the namespace (e.g. C) Note that the file path is relative to C<$dir> if that is specified. This B be used directly for CPAN META C. See the C method instead. =head2 C<< log_info (internal) >> Used internally to perform logging; imported from Log::Contextual if Log::Contextual has already been loaded, otherwise simply calls warn. =head1 OBJECT METHODS =head2 C<< name() >> Returns the name of the package represented by this module. If there is more than one package, it makes a best guess based on the filename. If it's a script (i.e. not a *.pm) the package name is 'main'. =head2 C<< version($package) >> Returns the version as defined by the $VERSION variable for the package as returned by the C method if no arguments are given. If given the name of a package it will attempt to return the version of that package if it is specified in the file. =head2 C<< filename() >> Returns the absolute path to the file. Note that this file may not actually exist on disk yet, e.g. if the module was read from an in-memory filehandle. =head2 C<< packages_inside() >> Returns a list of packages. Note: this is a raw list of packages discovered (or assumed, in the case of C
). It is not filtered for C, C
or private packages the way the C method does. Invalid package names are not returned, for example "Foo:Bar". Strange but valid package names are returned, for example "Foo::Bar::", and are left up to the caller on how to handle. =head2 C<< pod_inside() >> Returns a list of POD sections. =head2 C<< contains_pod() >> Returns true if there is any POD in the file. =head2 C<< pod($section) >> Returns the POD data in the given section. =head2 C<< is_indexable($package) >> or C<< is_indexable() >> Returns a boolean indicating whether the package (if provided) or any package (otherwise) is eligible for indexing by PAUSE, the Perl Authors Upload Server. Note This only checks for valid C declarations, and does not take any ownership information into account. =head1 AUTHOR Original code from Module::Build::ModuleInfo by Ken Williams , Randy W. Sims Released as Module::Metadata by Matt S Trout (mst) with assistance from David Golden (xdg) . =head1 COPYRIGHT & LICENSE Original code Copyright (c) 2001-2011 Ken Williams. Additional code Copyright (c) 2010-2011 Matt Trout and David Golden. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Module-Metadata-1.000027/corpus/BOMTest/000755 000766 000024 00000000000 12512064415 017751 5ustar00etherstaff000000 000000 Module-Metadata-1.000027/corpus/BOMTest/UTF16BE.pm000644 000766 000024 00000000356 12512064415 021327 0ustar00etherstaff000000 000000 þÿpackage Heart; our $VERSION = 1; package BOMTest::UTF16BE; our $VERSION = 4; package CSur; our $VERSION = 2; 1; Module-Metadata-1.000027/corpus/BOMTest/UTF16LE.pm000644 000766 000024 00000000356 12512064415 021341 0ustar00etherstaff000000 000000 ÿþpackage Heart; our $VERSION = 1; package BOMTest::UTF16LE; our $VERSION = 5; package CSur; our $VERSION = 2; 1; Module-Metadata-1.000027/corpus/BOMTest/UTF8.pm000644 000766 000024 00000000167 12512064415 021041 0ustar00etherstaff000000 000000 package Heart; our $VERSION = 1; package BOMTest::UTF8; our $VERSION = 3; package CÅ“ur; our $VERSION = 2; 1;