Perl-PrereqScanner-1.100/000755 000765 000024 00000000000 14422425646 015277 5ustar00rjbsstaff000000 000000 Perl-PrereqScanner-1.100/LICENSE000644 000765 000024 00000043653 14422425646 016317 0ustar00rjbsstaff000000 000000 This software is copyright (c) 2009 by Jerome Quelin. 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) 2009 by Jerome Quelin. 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) 2009 by Jerome Quelin. 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 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End Perl-PrereqScanner-1.100/bin/000755 000765 000024 00000000000 14422425646 016047 5ustar00rjbsstaff000000 000000 Perl-PrereqScanner-1.100/Changes000644 000765 000024 00000015211 14422425646 016572 0ustar00rjbsstaff000000 000000 Revision history for Perl-PrereqScanner 1.100 2023-04-27 10:00:37+02:00 Europe/Paris - convert to Moo (thanks, Dan Book!) 1.025 2022-12-31 21:10:00-05:00 America/New_York - update author contact info 1.024 2021-07-03 13:28:30-04:00 America/New_York - switched from List::MoreUtils to List::Util (thanks, Karen Etheridge!) - update author contact info - add docs on perl version policy 1.023 2015-04-05 22:23:53-04:00 America/New_York - improve test reliability when path to perl has a space in it 1.022 2014-12-23 21:11:27-05:00 America/New_York - do not crash when encountering arg-less "use aliased;" 1.021 2014-11-06 21:08:49-05:00 America/New_York - instead of always trying to use lib, add a -I switch to scan-perl-prereqs - when finding files to scan, find files, not anything else 1.020 2014-07-02 18:52:33-04:00 America/New_York - update CPAN::Meta::Requirements version to match current formatting 1.019 2014-01-07 19:37:41-05:00 America/New_York - add a warning about PPI's unclear interpretation of strings 1.018 2013-11-03 21:53:46 America/New_York - make the scan-perl-prereqs program also scan .PL and .cgi files - also check for "Foo->VERSION(x)" after "require Foo" - doc improvements from David Steinbrunner and Karen Etheridge 1.017 2013-10-07 17:56:34 America/New_York - eliminate testing of Carp for its prereqs, which *did* change from older 5.8.8 installs 1.016 2013-06-19 21:27:44 America/New_York - new executable is bundled, scan-perl-prereqs, to take the plae of scan_prereqs; it has cpanm-friendly output by default, but supports --pretty and --by-file (thanks to John SJ Anderson for some of the work on this!) - add Superclass scanner for superclass.pm (thanks, David Golden!) - make scan_prereqs scan .t files (thanks, David Golden!) - add scan_module method (thanks, Neil Bowers!) - lib.pm is now indexed in 02packages; stop skipping it (thanks, Kevin Dawson!) 1.015 2012-12-14 22:07:55 America/New_York - document that "no Module" also works (thanks for the report, Toby Inkster) 1.014 2012-07-26 13:22:02 America/New_York - require a more recent PPI for various bugfixes that broke tests (thanks for the report, Salve J. Nilsen) 1.013 2012-07-01 17:21:25 America/New_York - make scan_prereqs scan directories recursively (thanks, Jakob Voss) - if PPI parsing fails, include PPI::Document->errstr in error message (Christopher J. Madsen) 1.012 2012-06-27 16:17:28 America/New_York - fix "with (...)" where spaces occur between with and parenthesized list (thanks to celogeek for the failing test) 1.011 2012-03-07 13:08:49 Europe/Paris - require CPAN::Meta::Requirements 2.120630 and fix tests to reflect its v-string normalizing behavior 1.010 2012-02-22 10:07:46 America/New_York - fix documentation bug (thanks to Marius Olsthoorn for the report) - add a test case to prove someone wrong on the internet 1.009 2012-01-01 23:11:51 America/New_York - switch from Version::Requirements to CPAN::Meta::Requirements 1.008 2011-11-01 10:35:46 Europe/Paris - fix rt#72062 - look for "require Module; Module->VERSION(min);" (Christopher J. Madsen) 1.007 2011-08-31 09:22:12 Europe/Paris - new option --combine for scan_prereqs script (randy stauner) 1.006 2011-08-20 14:03:24 Europe/Paris - add the POE scanner for POE components (David Golden) 1.005 2011-08-17 18:39:22 America/New_York - stop stripping "always core" prereqs like strict and warnings - add the Aliased scanner for aliased.pm (thanks, David Golden) 1.004 2011-05-30 21:02:52 America/New_York - avoid calling a method on undef (i.e., cope with PPI doing surprising things) 1.003 2011-05-16 15:46:02 America/New_York - fix a bug that caused things like "within" and "trextends" to trigger the Moose scanner 1.002 2011-02-02 10:21:55 Europe/Paris - fix rt#61608 - missing description in whatisentry for TestMore.pm 1.001 2011-01-05 16:35:26 Europe/Paris - fix bin/prereqs (randy stauner) 1.000 2010-12-06 17:54:20 Europe/Paris - fix rt#59016 - support for moose 1.03 version declarations (apocalypse) 0.101892 2010-12-03 17:15:25 Europe/Paris - throw an exception if PPI fails to parse code (vyacheslav matjukhin) 0.101891 2010-09-05 15:31:49 America/New_York - add a core scanner for Test::More's done_testing - do not detect prereqs for invalid class names in Moose scanner - added TODO tests for "with('Name')" -- note the parens 0.101890 2010-07-08 18:45:57 Europe/Paris - fix rt#59121 - remove lurking temp files 0.101480 2010-05-28 08:41:56 America/New_York - bump prereq version of String::RewritePrefix 0.101250 2010-05-05 09:32:19 America/New_York - convert to Moose object system - add the Scanner role and pluggable scanners 0.100960 2010-04-06 17:03:46 Europe/Paris - add 'feature' pragma to skip list (mark gardner) - added some tests (mark gardner) 0.100830 2010-03-24 13:37:31 Europe/Paris - fix rt#55713: support for use parent -norequire - fix rt#55851: 'require $foo;' shouldn't add any prereq 0.100690 2010-03-10 21:06:49 America/New_York - remove another 5.10-ism 0.100680 2010-03-09 19:10:27 America/New_York - fix PPI version required (thanks, Christopher J. Madsen) 0.100630 2010-03-04 22:58:55 America/New_York - work on perl 5.8 - require a newer Version::Requirements with critical bugfix 0.100521 2010-02-21 23:20:55 America/New_York - scanning methods now return Version::Requirements objects 0.100520 2010-02-21 15:55:31 America/New_York - add perl prereq to Makefile.PL to stop test failures 0.100510 2010-02-20 17:38:59 America/New_York - typo fixes (ricardo signes) - new script scan_prereqs - prereq accounting now managed by Version::Requirements - easier-to-link-to Pod 0.100491 2010-02-18 19:16:15 Europe/Paris - added a changelog (this file) 0.100490 2010-02-18 19:10:32 Europe/Paris - factored out from dist-zilla-plugin-autoprereq - fix qw and base-ver parent-ver (ricardo signes) - require base if version given (ricardo signes) - refactor with/extends (ricardo signes) - new methods scan_string() / scan_file() Perl-PrereqScanner-1.100/corpus/000755 000765 000024 00000000000 14422425646 016612 5ustar00rjbsstaff000000 000000 Perl-PrereqScanner-1.100/MANIFEST000644 000765 000024 00000001257 14422425646 016435 0ustar00rjbsstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.030. Changes LICENSE MANIFEST META.json META.yml Makefile.PL README bin/scan-perl-prereqs bin/scan_prereqs corpus/scan/bar.pl corpus/scan/foo.pl dist.ini lib/Perl/PrereqScanner.pm lib/Perl/PrereqScanner/Scanner.pm lib/Perl/PrereqScanner/Scanner/Aliased.pm lib/Perl/PrereqScanner/Scanner/Moose.pm lib/Perl/PrereqScanner/Scanner/POE.pm lib/Perl/PrereqScanner/Scanner/Perl5.pm lib/Perl/PrereqScanner/Scanner/Superclass.pm lib/Perl/PrereqScanner/Scanner/TestMore.pm t/00-report-prereqs.dd t/00-report-prereqs.t t/autoprereq.t t/scan-module.t t/scan-prereqs.t xt/author/pod-syntax.t xt/release/changes_has_content.t Perl-PrereqScanner-1.100/t/000755 000765 000024 00000000000 14422425646 015542 5ustar00rjbsstaff000000 000000 Perl-PrereqScanner-1.100/xt/000755 000765 000024 00000000000 14422425646 015732 5ustar00rjbsstaff000000 000000 Perl-PrereqScanner-1.100/README000644 000765 000024 00000000610 14422425646 016154 0ustar00rjbsstaff000000 000000 This archive contains the distribution Perl-PrereqScanner, version 1.100: a tool to scan your Perl code for its prerequisites This software is copyright (c) 2009 by Jerome Quelin. 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 v6.030. Perl-PrereqScanner-1.100/META.yml000644 000765 000024 00000031360 14422425646 016553 0ustar00rjbsstaff000000 000000 --- abstract: 'a tool to scan your Perl code for its prerequisites' author: - 'Jerome Quelin' - 'Ricardo Signes ' build_requires: ExtUtils::MakeMaker: '0' File::Spec: '0' File::Temp: '0' PPI::Document: '0' Test::More: '0.96' Try::Tiny: '0' configure_requires: ExtUtils::MakeMaker: '6.78' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.030, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Perl-PrereqScanner requires: CPAN::Meta::Requirements: '2.124' Carp: '0' File::Find: '0' File::Spec::Functions: '0' FindBin: '0' Getopt::Long: '0' Getopt::Long::Descriptive: '0' List::Util: '1.33' Module::Path: '0' Moo: '2.000000' Moo::Role: '0' PPI: '1.215' Params::Util: '0' Scalar::Util: '0' String::RewritePrefix: '0.005' Types::Standard: '0' lib: '0' namespace::autoclean: '0' perl: '5.012' strict: '0' warnings: '0' resources: bugtracker: https://github.com/rjbs/Perl-PrereqScanner/issues homepage: https://github.com/rjbs/Perl-PrereqScanner repository: https://github.com/rjbs/Perl-PrereqScanner.git version: '1.100' x_Dist_Zilla: perl: version: '5.037010' plugins: - class: Dist::Zilla::Plugin::Git::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: [] exclude_match: [] follow_symlinks: 0 include_dotfiles: 0 prefix: '' prune_directory: [] root: . Dist::Zilla::Plugin::Git::GatherDir: include_untracked: 0 name: '@RJBS/Git::GatherDir' version: '2.048' - class: Dist::Zilla::Plugin::CheckPrereqsIndexed name: '@RJBS/CheckPrereqsIndexed' version: '0.022' - class: Dist::Zilla::Plugin::CheckExtraTests name: '@RJBS/CheckExtraTests' version: '0.029' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 0 check_all_prereqs: 0 modules: - Dist::Zilla::PluginBundle::RJBS phase: build run_under_travis: 0 skip: [] name: '@RJBS/RJBS-Outdated' version: '0.057' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 1 check_all_prereqs: 0 modules: [] phase: release run_under_travis: 0 skip: - Dist::Zilla::Plugin::RJBSMisc name: '@RJBS/CPAN-Outdated' version: '0.057' - class: Dist::Zilla::Plugin::PruneCruft name: '@RJBS/@Filter/PruneCruft' version: '6.030' - class: Dist::Zilla::Plugin::ManifestSkip name: '@RJBS/@Filter/ManifestSkip' version: '6.030' - class: Dist::Zilla::Plugin::MetaYAML name: '@RJBS/@Filter/MetaYAML' version: '6.030' - class: Dist::Zilla::Plugin::License name: '@RJBS/@Filter/License' version: '6.030' - class: Dist::Zilla::Plugin::Readme name: '@RJBS/@Filter/Readme' version: '6.030' - class: Dist::Zilla::Plugin::ExecDir name: '@RJBS/@Filter/ExecDir' version: '6.030' - class: Dist::Zilla::Plugin::ShareDir name: '@RJBS/@Filter/ShareDir' version: '6.030' - class: Dist::Zilla::Plugin::Manifest name: '@RJBS/@Filter/Manifest' version: '6.030' - class: Dist::Zilla::Plugin::TestRelease name: '@RJBS/@Filter/TestRelease' version: '6.030' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@RJBS/@Filter/ConfirmRelease' version: '6.030' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@RJBS/@Filter/UploadToCPAN' version: '6.030' - class: Dist::Zilla::Plugin::MakeMaker config: Dist::Zilla::Role::TestRunner: default_jobs: 9 name: '@RJBS/MakeMaker' version: '6.030' - class: Dist::Zilla::Plugin::AutoPrereqs name: '@RJBS/AutoPrereqs' version: '6.030' - class: Dist::Zilla::Plugin::Git::NextVersion config: Dist::Zilla::Plugin::Git::NextVersion: first_version: '0.001' version_by_branch: 1 version_regexp: (?^:^([0-9]+\.[0-9]+)$) Dist::Zilla::Role::Git::Repo: git_version: 2.40.0 repo_root: . name: '@RJBS/Git::NextVersion' version: '2.048' - class: Dist::Zilla::Plugin::PkgVersion name: '@RJBS/PkgVersion' version: '6.030' - class: Dist::Zilla::Plugin::MetaConfig name: '@RJBS/MetaConfig' version: '6.030' - class: Dist::Zilla::Plugin::MetaJSON name: '@RJBS/MetaJSON' version: '6.030' - class: Dist::Zilla::Plugin::NextRelease name: '@RJBS/NextRelease' version: '6.030' - class: Dist::Zilla::Plugin::Test::ChangesHasContent name: '@RJBS/Test::ChangesHasContent' version: '0.011' - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@RJBS/PodSyntaxTests' version: '6.030' - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: '@RJBS/Test::ReportPrereqs' version: '0.029' - class: Dist::Zilla::Plugin::Git::Remote::Check name: '@RJBS/Git::Remote::Check' version: 0.1.2 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: test type: requires name: '@RJBS/TestMoreWithSubtests' version: '6.030' - class: Dist::Zilla::Plugin::PodWeaver config: Dist::Zilla::Plugin::PodWeaver: config_plugins: - '@RJBS' finder: - ':InstallModules' - ':PerlExecFiles' plugins: - class: Pod::Weaver::Plugin::EnsurePod5 name: '@CorePrep/EnsurePod5' version: '4.019' - class: Pod::Weaver::Plugin::H1Nester name: '@CorePrep/H1Nester' version: '4.019' - class: Pod::Weaver::Plugin::SingleEncoding name: '@RJBS/SingleEncoding' version: '4.019' - class: Pod::Weaver::Section::Name name: '@RJBS/Name' version: '4.019' - class: Pod::Weaver::Section::Version name: '@RJBS/Version' version: '4.019' - class: Pod::Weaver::Section::Region name: '@RJBS/Prelude' version: '4.019' - class: Pod::Weaver::Section::Generic name: '@RJBS/Synopsis' version: '4.019' - class: Pod::Weaver::Section::Generic name: '@RJBS/Description' version: '4.019' - class: Pod::Weaver::Section::Generic name: '@RJBS/Overview' version: '4.019' - class: Pod::Weaver::Section::Generic name: '@RJBS/Stability' version: '4.019' - class: Pod::Weaver::Section::GenerateSection name: '@RJBS/PerlSupport' version: '4.019' - class: Pod::Weaver::Section::Collect name: Attributes version: '4.019' - class: Pod::Weaver::Section::Collect name: Methods version: '4.019' - class: Pod::Weaver::Section::Collect name: Functions version: '4.019' - class: Pod::Weaver::Section::Leftovers name: '@RJBS/Leftovers' version: '4.019' - class: Pod::Weaver::Section::Region name: '@RJBS/postlude' version: '4.019' - class: Pod::Weaver::Section::Authors name: '@RJBS/Authors' version: '4.019' - class: Pod::Weaver::Section::Contributors name: '@RJBS/Contributors' version: '0.009' - class: Pod::Weaver::Section::Legal name: '@RJBS/Legal' version: '4.019' - class: Pod::Weaver::Plugin::Transformer name: '@RJBS/List' version: '4.019' name: '@RJBS/PodWeaver' version: '4.010' - class: Dist::Zilla::Plugin::RJBSMisc name: '@RJBS/RJBSMisc' version: '5.023' - class: Dist::Zilla::Plugin::GithubMeta name: '@RJBS/GithubMeta' version: '0.58' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes - dist.ini allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.40.0 repo_root: . name: '@RJBS/@Git/Check' version: '2.048' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: v%V%n%n%c signoff: 0 Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes - dist.ini allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.40.0 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@RJBS/@Git/Commit' version: '2.048' - class: Dist::Zilla::Plugin::Git::Tag config: Dist::Zilla::Plugin::Git::Tag: branch: ~ changelog: Changes signed: 0 tag: '1.100' tag_format: '%v' tag_message: v%V Dist::Zilla::Role::Git::Repo: git_version: 2.40.0 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@RJBS/@Git/Tag' version: '2.048' - class: Dist::Zilla::Plugin::Git::Push config: Dist::Zilla::Plugin::Git::Push: push_to: - 'github :' remotes_must_exist: 0 Dist::Zilla::Role::Git::Repo: git_version: 2.40.0 repo_root: . name: '@RJBS/@Git/Push' version: '2.048' - class: Dist::Zilla::Plugin::Git::Contributors config: Dist::Zilla::Plugin::Git::Contributors: git_version: 2.40.0 include_authors: 0 include_releaser: 1 order_by: name paths: [] name: '@RJBS/Git::Contributors' version: '0.036' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '6.030' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '6.030' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '6.030' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '6.030' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '6.030' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '6.030' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '6.030' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '6.030' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '6.030' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '6.030' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: 0 version: '6.030' x_contributors: - 'bowtie ' - 'celogeek ' - 'Christopher J. Madsen ' - 'Dan Book ' - 'David Golden ' - 'David Steinbrunner ' - 'Ed J ' - 'Florian Ragwitz ' - 'Jakob Voss ' - 'Jérôme Quelin ' - 'John SJ Anderson ' - 'Karen Etheridge ' - 'Mark Gardner ' - 'Neil Bowers ' - 'Randy Stauner ' - 'Ricardo Signes ' - 'Tina Mueller ' - 'Vyacheslav Matjukhin ' x_generated_by_perl: v5.37.10 x_rjbs_perl_window: long-term x_serialization_backend: 'YAML::Tiny version 1.73' x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later' Perl-PrereqScanner-1.100/lib/000755 000765 000024 00000000000 14422425646 016045 5ustar00rjbsstaff000000 000000 Perl-PrereqScanner-1.100/Makefile.PL000644 000765 000024 00000004536 14422425646 017261 0ustar00rjbsstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.030. use strict; use warnings; use 5.012; use ExtUtils::MakeMaker 6.78; my %WriteMakefileArgs = ( "ABSTRACT" => "a tool to scan your Perl code for its prerequisites", "AUTHOR" => "Jerome Quelin, Ricardo Signes ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => "6.78" }, "DISTNAME" => "Perl-PrereqScanner", "EXE_FILES" => [ "bin/scan-perl-prereqs", "bin/scan_prereqs" ], "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.012", "NAME" => "Perl::PrereqScanner", "PREREQ_PM" => { "CPAN::Meta::Requirements" => "2.124", "Carp" => 0, "File::Find" => 0, "File::Spec::Functions" => 0, "FindBin" => 0, "Getopt::Long" => 0, "Getopt::Long::Descriptive" => 0, "List::Util" => "1.33", "Module::Path" => 0, "Moo" => "2.000000", "Moo::Role" => 0, "PPI" => "1.215", "Params::Util" => 0, "Scalar::Util" => 0, "String::RewritePrefix" => "0.005", "Types::Standard" => 0, "lib" => 0, "namespace::autoclean" => 0, "strict" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "File::Temp" => 0, "PPI::Document" => 0, "Test::More" => "0.96", "Try::Tiny" => 0 }, "VERSION" => "1.100", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "CPAN::Meta::Requirements" => "2.124", "Carp" => 0, "ExtUtils::MakeMaker" => 0, "File::Find" => 0, "File::Spec" => 0, "File::Spec::Functions" => 0, "File::Temp" => 0, "FindBin" => 0, "Getopt::Long" => 0, "Getopt::Long::Descriptive" => 0, "List::Util" => "1.33", "Module::Path" => 0, "Moo" => "2.000000", "Moo::Role" => 0, "PPI" => "1.215", "PPI::Document" => 0, "Params::Util" => 0, "Scalar::Util" => 0, "String::RewritePrefix" => "0.005", "Test::More" => "0.96", "Try::Tiny" => 0, "Types::Standard" => 0, "lib" => 0, "namespace::autoclean" => 0, "strict" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); Perl-PrereqScanner-1.100/META.json000644 000765 000024 00000047254 14422425646 016734 0ustar00rjbsstaff000000 000000 { "abstract" : "a tool to scan your Perl code for its prerequisites", "author" : [ "Jerome Quelin", "Ricardo Signes " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.030, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Perl-PrereqScanner", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.78" } }, "develop" : { "requires" : { "Encode" : "0", "Test::More" : "0", "Test::Pod" : "1.41" } }, "runtime" : { "requires" : { "CPAN::Meta::Requirements" : "2.124", "Carp" : "0", "File::Find" : "0", "File::Spec::Functions" : "0", "FindBin" : "0", "Getopt::Long" : "0", "Getopt::Long::Descriptive" : "0", "List::Util" : "1.33", "Module::Path" : "0", "Moo" : "2.000000", "Moo::Role" : "0", "PPI" : "1.215", "Params::Util" : "0", "Scalar::Util" : "0", "String::RewritePrefix" : "0.005", "Types::Standard" : "0", "lib" : "0", "namespace::autoclean" : "0", "perl" : "5.012", "strict" : "0", "warnings" : "0" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "ExtUtils::MakeMaker" : "0", "File::Spec" : "0", "File::Temp" : "0", "PPI::Document" : "0", "Test::More" : "0.96", "Try::Tiny" : "0" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/rjbs/Perl-PrereqScanner/issues" }, "homepage" : "https://github.com/rjbs/Perl-PrereqScanner", "repository" : { "type" : "git", "url" : "https://github.com/rjbs/Perl-PrereqScanner.git", "web" : "https://github.com/rjbs/Perl-PrereqScanner" } }, "version" : "1.100", "x_Dist_Zilla" : { "perl" : { "version" : "5.037010" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [], "exclude_match" : [], "follow_symlinks" : 0, "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." }, "Dist::Zilla::Plugin::Git::GatherDir" : { "include_untracked" : 0 } }, "name" : "@RJBS/Git::GatherDir", "version" : "2.048" }, { "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", "name" : "@RJBS/CheckPrereqsIndexed", "version" : "0.022" }, { "class" : "Dist::Zilla::Plugin::CheckExtraTests", "name" : "@RJBS/CheckExtraTests", "version" : "0.029" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 0, "check_all_prereqs" : 0, "modules" : [ "Dist::Zilla::PluginBundle::RJBS" ], "phase" : "build", "run_under_travis" : 0, "skip" : [] } }, "name" : "@RJBS/RJBS-Outdated", "version" : "0.057" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 1, "check_all_prereqs" : 0, "modules" : [], "phase" : "release", "run_under_travis" : 0, "skip" : [ "Dist::Zilla::Plugin::RJBSMisc" ] } }, "name" : "@RJBS/CPAN-Outdated", "version" : "0.057" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@RJBS/@Filter/PruneCruft", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@RJBS/@Filter/ManifestSkip", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@RJBS/@Filter/MetaYAML", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@RJBS/@Filter/License", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::Readme", "name" : "@RJBS/@Filter/Readme", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@RJBS/@Filter/ExecDir", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@RJBS/@Filter/ShareDir", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@RJBS/@Filter/Manifest", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@RJBS/@Filter/TestRelease", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@RJBS/@Filter/ConfirmRelease", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@RJBS/@Filter/UploadToCPAN", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::MakeMaker", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "@RJBS/MakeMaker", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@RJBS/AutoPrereqs", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::Git::NextVersion", "config" : { "Dist::Zilla::Plugin::Git::NextVersion" : { "first_version" : "0.001", "version_by_branch" : 1, "version_regexp" : "(?^:^([0-9]+\\.[0-9]+)$)" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.40.0", "repo_root" : "." } }, "name" : "@RJBS/Git::NextVersion", "version" : "2.048" }, { "class" : "Dist::Zilla::Plugin::PkgVersion", "name" : "@RJBS/PkgVersion", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@RJBS/MetaConfig", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@RJBS/MetaJSON", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@RJBS/NextRelease", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::Test::ChangesHasContent", "name" : "@RJBS/Test::ChangesHasContent", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@RJBS/PodSyntaxTests", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "@RJBS/Test::ReportPrereqs", "version" : "0.029" }, { "class" : "Dist::Zilla::Plugin::Git::Remote::Check", "name" : "@RJBS/Git::Remote::Check", "version" : "0.1.2" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "test", "type" : "requires" } }, "name" : "@RJBS/TestMoreWithSubtests", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "config_plugins" : [ "@RJBS" ], "finder" : [ ":InstallModules", ":PerlExecFiles" ], "plugins" : [ { "class" : "Pod::Weaver::Plugin::EnsurePod5", "name" : "@CorePrep/EnsurePod5", "version" : "4.019" }, { "class" : "Pod::Weaver::Plugin::H1Nester", "name" : "@CorePrep/H1Nester", "version" : "4.019" }, { "class" : "Pod::Weaver::Plugin::SingleEncoding", "name" : "@RJBS/SingleEncoding", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Name", "name" : "@RJBS/Name", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Version", "name" : "@RJBS/Version", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@RJBS/Prelude", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@RJBS/Synopsis", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@RJBS/Description", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@RJBS/Overview", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@RJBS/Stability", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::GenerateSection", "name" : "@RJBS/PerlSupport", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "Attributes", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "Methods", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "Functions", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Leftovers", "name" : "@RJBS/Leftovers", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@RJBS/postlude", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Authors", "name" : "@RJBS/Authors", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Contributors", "name" : "@RJBS/Contributors", "version" : "0.009" }, { "class" : "Pod::Weaver::Section::Legal", "name" : "@RJBS/Legal", "version" : "4.019" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "@RJBS/List", "version" : "4.019" } ] } }, "name" : "@RJBS/PodWeaver", "version" : "4.010" }, { "class" : "Dist::Zilla::Plugin::RJBSMisc", "name" : "@RJBS/RJBSMisc", "version" : "5.023" }, { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "@RJBS/GithubMeta", "version" : "0.58" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes", "dist.ini" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.40.0", "repo_root" : "." } }, "name" : "@RJBS/@Git/Check", "version" : "2.048" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "v%V%n%n%c", "signoff" : 0 }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes", "dist.ini" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.40.0", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@RJBS/@Git/Commit", "version" : "2.048" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "config" : { "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "changelog" : "Changes", "signed" : 0, "tag" : "1.100", "tag_format" : "%v", "tag_message" : "v%V" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.40.0", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@RJBS/@Git/Tag", "version" : "2.048" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "config" : { "Dist::Zilla::Plugin::Git::Push" : { "push_to" : [ "github :" ], "remotes_must_exist" : 0 }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.40.0", "repo_root" : "." } }, "name" : "@RJBS/@Git/Push", "version" : "2.048" }, { "class" : "Dist::Zilla::Plugin::Git::Contributors", "config" : { "Dist::Zilla::Plugin::Git::Contributors" : { "git_version" : "2.40.0", "include_authors" : 0, "include_releaser" : 1, "order_by" : "name", "paths" : [] } }, "name" : "@RJBS/Git::Contributors", "version" : "0.036" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "6.030" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : 0 }, "version" : "6.030" } }, "x_contributors" : [ "bowtie ", "celogeek ", "Christopher J. Madsen ", "Dan Book ", "David Golden ", "David Steinbrunner ", "Ed J ", "Florian Ragwitz ", "Jakob Voss ", "J\u00e9r\u00f4me Quelin ", "John SJ Anderson ", "Karen Etheridge ", "Mark Gardner ", "Neil Bowers ", "Randy Stauner ", "Ricardo Signes ", "Tina Mueller ", "Vyacheslav Matjukhin " ], "x_generated_by_perl" : "v5.37.10", "x_rjbs_perl_window" : "long-term", "x_serialization_backend" : "Cpanel::JSON::XS version 4.36", "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later" } Perl-PrereqScanner-1.100/dist.ini000644 000765 000024 00000000321 14422425646 016737 0ustar00rjbsstaff000000 000000 name = Perl-PrereqScanner author = Jerome Quelin author = Ricardo Signes license = Perl_5 copyright_holder = Jerome Quelin copyright_year = 2009 [@RJBS] perl-window = long-term Perl-PrereqScanner-1.100/lib/Perl/000755 000765 000024 00000000000 14422425646 016747 5ustar00rjbsstaff000000 000000 Perl-PrereqScanner-1.100/lib/Perl/PrereqScanner/000755 000765 000024 00000000000 14422425646 021517 5ustar00rjbsstaff000000 000000 Perl-PrereqScanner-1.100/lib/Perl/PrereqScanner.pm000644 000765 000024 00000023707 14422425646 022066 0ustar00rjbsstaff000000 000000 use 5.008; use strict; use warnings; package Perl::PrereqScanner 1.100; # ABSTRACT: a tool to scan your Perl code for its prerequisites use Moo 2.000000; use Carp qw(confess); use List::Util qw(max); use Params::Util qw(_CLASS); use Perl::PrereqScanner::Scanner; use PPI 1.215; # module_version, bug fixes use String::RewritePrefix 0.005 rewrite => { -as => '__rewrite_scanner', prefixes => { '' => 'Perl::PrereqScanner::Scanner::', '=' => '' }, }; use Types::Standard qw(ArrayRef ConsumerOf); use CPAN::Meta::Requirements 2.124; # normalized v-strings use namespace::autoclean; has scanners => ( is => 'rwp', isa => ArrayRef[ConsumerOf['Perl::PrereqScanner::Scanner']], init_arg => undef, ); sub __scanner_from_str { my $class = __rewrite_scanner($_[0]); confess "illegal class name: $class" unless _CLASS($class); eval "require $class; 1" or die $@; return $class->new; } sub __prepare_scanners { my ($self, $specs) = @_; my @scanners = map {; ref $_ ? $_ : __scanner_from_str($_) } @$specs; return \@scanners; } sub BUILD { my ($self, $arg) = @_; my @scanners = @{ $arg->{scanners} || [ qw(Perl5 Superclass TestMore Moose Aliased POE) ] }; my @extra_scanners = @{ $arg->{extra_scanners} || [] }; my $scanners = $self->__prepare_scanners([ @scanners, @extra_scanners ]); $self->_set_scanners($scanners); } #pod =method scan_string #pod #pod my $prereqs = $scanner->scan_string( $perl_code ); #pod #pod Given a string containing Perl source code, this method returns a #pod CPAN::Meta::Requirements object describing the modules it requires. #pod #pod This method will throw an exception if PPI fails to parse the code. #pod #pod B It isn't entirely clear whether PPI prefers to receive #pod strings as octet strings or character strings. For now, my advice #pod is to pass octet strings. #pod #pod =cut sub scan_string { my ($self, $str) = @_; my $ppi = PPI::Document->new( \$str ); confess "PPI parse failed: " . PPI::Document->errstr unless defined $ppi; return $self->scan_ppi_document( $ppi ); } #pod =method scan_file #pod #pod my $prereqs = $scanner->scan_file( $path ); #pod #pod Given a file path to a Perl document, this method returns a #pod CPAN::Meta::Requirements object describing the modules it requires. #pod #pod This method will throw an exception if PPI fails to parse the code. #pod #pod =cut sub scan_file { my ($self, $path) = @_; my $ppi = PPI::Document->new( $path ); confess "PPI failed to parse '$path': " . PPI::Document->errstr unless defined $ppi; return $self->scan_ppi_document( $ppi ); } #pod =method scan_ppi_document #pod #pod my $prereqs = $scanner->scan_ppi_document( $ppi_doc ); #pod #pod Given a L, this method returns a CPAN::Meta::Requirements object #pod describing the modules it requires. #pod #pod =cut sub scan_ppi_document { my ($self, $ppi_doc) = @_; my $req = CPAN::Meta::Requirements->new; for my $scanner (@{ $self->{scanners} }) { $scanner->scan_for_prereqs($ppi_doc, $req); } return $req; } #pod =method scan_module #pod #pod my $prereqs = $scanner->scan_module( $module_name ); #pod #pod Given the name of a module, eg C<'PPI::Document'>, #pod this method returns a CPAN::Meta::Requirements object #pod describing the modules it requires. #pod #pod =cut sub scan_module { my ($self, $module_name) = @_; # consider rewriting to use Module::Which -- rjbs, 2013-11-03 require Module::Path; if (defined(my $path = Module::Path::module_path($module_name))) { return $self->scan_file($path); } confess "Failed to find file for module '$module_name'"; } 1; =pod =encoding UTF-8 =head1 NAME Perl::PrereqScanner - a tool to scan your Perl code for its prerequisites =head1 VERSION version 1.100 =head1 SYNOPSIS use Perl::PrereqScanner; my $scanner = Perl::PrereqScanner->new; my $prereqs = $scanner->scan_ppi_document( $ppi_doc ); my $prereqs = $scanner->scan_file( $file_path ); my $prereqs = $scanner->scan_string( $perl_code ); my $prereqs = $scanner->scan_module( $module_name ); =head1 DESCRIPTION The scanner will extract loosely your distribution prerequisites from your files. The extraction may not be perfect but tries to do its best. It will currently find the following prereqs: =over 4 =item * plain lines beginning with C or C in your perl modules and scripts, including minimum perl version =item * regular inheritance declared with the C and C pragmata =item * L inheritance declared with the C keyword =item * L roles included with the C keyword =item * OO namespace aliasing using the C module =back =head2 Scanner Plugins Perl::PrereqScanner works by running a series of scanners over a PPI::Document representing the code to scan. By default the "Perl5", "Moose", "TestMore", "POE", and "Aliased" scanners are run. You can supply your own scanners when constructing your PrereqScanner: # Us only the Perl5 scanner: my $scanner = Perl::PrereqScanner->new({ scanners => [ qw(Perl5) ] }); # Use any stock scanners, plus Example: my $scanner = Perl::PrereqScanner->new({ extra_scanners => [ qw(Example) ] }); =head1 PERL VERSION This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years. Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. =head1 METHODS =head2 scan_string my $prereqs = $scanner->scan_string( $perl_code ); Given a string containing Perl source code, this method returns a CPAN::Meta::Requirements object describing the modules it requires. This method will throw an exception if PPI fails to parse the code. B It isn't entirely clear whether PPI prefers to receive strings as octet strings or character strings. For now, my advice is to pass octet strings. =head2 scan_file my $prereqs = $scanner->scan_file( $path ); Given a file path to a Perl document, this method returns a CPAN::Meta::Requirements object describing the modules it requires. This method will throw an exception if PPI fails to parse the code. =head2 scan_ppi_document my $prereqs = $scanner->scan_ppi_document( $ppi_doc ); Given a L, this method returns a CPAN::Meta::Requirements object describing the modules it requires. =head2 scan_module my $prereqs = $scanner->scan_module( $module_name ); Given the name of a module, eg C<'PPI::Document'>, this method returns a CPAN::Meta::Requirements object describing the modules it requires. =for Pod::Coverage::TrustPod new =head1 SEE ALSO L, in this distribution, is a command-line interface to the scanner =head1 AUTHORS =over 4 =item * Jerome Quelin =item * Ricardo Signes =back =head1 CONTRIBUTORS =for stopwords bowtie celogeek Christopher J. Madsen Dan Book David Golden Steinbrunner Ed J Florian Ragwitz Jakob Voss Jérôme Quelin John SJ Anderson Karen Etheridge Mark Gardner Neil Bowers Randy Stauner Ricardo Signes Tina Mueller Vyacheslav Matjukhin =over 4 =item * bowtie =item * celogeek =item * Christopher J. Madsen =item * Dan Book =item * David Golden =item * David Steinbrunner =item * Ed J =item * Florian Ragwitz =item * Jakob Voss =item * Jérôme Quelin =item * John SJ Anderson =item * Karen Etheridge =item * Mark Gardner =item * Neil Bowers =item * Randy Stauner =item * Ricardo Signes =item * Tina Mueller =item * Vyacheslav Matjukhin =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 by Jerome Quelin. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut __END__ #pod =for Pod::Coverage::TrustPod #pod new #pod #pod =head1 SYNOPSIS #pod #pod use Perl::PrereqScanner; #pod my $scanner = Perl::PrereqScanner->new; #pod my $prereqs = $scanner->scan_ppi_document( $ppi_doc ); #pod my $prereqs = $scanner->scan_file( $file_path ); #pod my $prereqs = $scanner->scan_string( $perl_code ); #pod my $prereqs = $scanner->scan_module( $module_name ); #pod #pod =head1 DESCRIPTION #pod #pod The scanner will extract loosely your distribution prerequisites from your #pod files. #pod #pod The extraction may not be perfect but tries to do its best. It will currently #pod find the following prereqs: #pod #pod =begin :list #pod #pod * plain lines beginning with C or C in your perl modules and scripts, including minimum perl version #pod #pod * regular inheritance declared with the C and C pragmata #pod #pod * L inheritance declared with the C keyword #pod #pod * L roles included with the C keyword #pod #pod * OO namespace aliasing using the C module #pod #pod =end :list #pod #pod =head2 Scanner Plugins #pod #pod Perl::PrereqScanner works by running a series of scanners over a PPI::Document #pod representing the code to scan. By default the "Perl5", "Moose", "TestMore", #pod "POE", and "Aliased" scanners are run. You can supply your own scanners when #pod constructing your PrereqScanner: #pod #pod # Us only the Perl5 scanner: #pod my $scanner = Perl::PrereqScanner->new({ scanners => [ qw(Perl5) ] }); #pod #pod # Use any stock scanners, plus Example: #pod my $scanner = Perl::PrereqScanner->new({ extra_scanners => [ qw(Example) ] }); #pod #pod =head1 SEE ALSO #pod #pod L, in this distribution, is a command-line interface to the scanner #pod #pod =cut Perl-PrereqScanner-1.100/lib/Perl/PrereqScanner/Scanner.pm000644 000765 000024 00000004435 14422425646 023454 0ustar00rjbsstaff000000 000000 use strict; use warnings; package Perl::PrereqScanner::Scanner 1.100; # ABSTRACT: something that scans for prereqs in a Perl document use Moo::Role; #pod =head1 DESCRIPTION #pod #pod This is a role to be composed into classes that will act as scanners plugged #pod into a Perl::PrereqScanner object. #pod #pod These classes must provide a C method, which will be called #pod like this: #pod #pod $scanner->scan_for_prereqs($ppi_doc, $version_requirements); #pod #pod The scanner should alter the L object to reflect #pod its findings about the PPI document. #pod #pod =cut requires 'scan_for_prereqs'; # DO NOT RELY ON THIS EXISTING OUTSIDE OF CORE! # THIS MIGHT GO AWAY WITHOUT NOTICE! # -- rjbs, 2010-04-06 sub _q_contents { my ($self, $token) = @_; my @contents; if ( $token->isa('PPI::Token::QuoteLike::Words') || $token->isa('PPI::Token::Number') ) { @contents = $token->literal; } else { @contents = $token->string; } return @contents; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Perl::PrereqScanner::Scanner - something that scans for prereqs in a Perl document =head1 VERSION version 1.100 =head1 DESCRIPTION This is a role to be composed into classes that will act as scanners plugged into a Perl::PrereqScanner object. These classes must provide a C method, which will be called like this: $scanner->scan_for_prereqs($ppi_doc, $version_requirements); The scanner should alter the L object to reflect its findings about the PPI document. =head1 PERL VERSION This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years. Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. =head1 AUTHORS =over 4 =item * Jerome Quelin =item * Ricardo Signes =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 by Jerome Quelin. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Perl-PrereqScanner-1.100/lib/Perl/PrereqScanner/Scanner/000755 000765 000024 00000000000 14422425646 023110 5ustar00rjbsstaff000000 000000 Perl-PrereqScanner-1.100/lib/Perl/PrereqScanner/Scanner/TestMore.pm000644 000765 000024 00000003464 14422425646 025217 0ustar00rjbsstaff000000 000000 use strict; use warnings; package Perl::PrereqScanner::Scanner::TestMore 1.100; # ABSTRACT: scanner to find recent Test::More usage use Moo; use List::Util 1.33 'none'; with 'Perl::PrereqScanner::Scanner'; sub scan_for_prereqs { my ($self, $ppi_doc, $req) = @_; return if none { $_ eq 'Test::More' } $req->required_modules; $req->add_minimum('Test::More' => '0.88') if grep { $_->isa('PPI::Token::Word') && $_->content eq 'done_testing'; } map { my @c = $_->children; @c == 1 ? @c : () } @{ $ppi_doc->find('Statement') || [] } } 1; =pod =encoding UTF-8 =head1 NAME Perl::PrereqScanner::Scanner::TestMore - scanner to find recent Test::More usage =head1 VERSION version 1.100 =head1 DESCRIPTION This scanner will check if a given test is using recent functions from L, and increase the minimum version for this module accordingly. =head1 PERL VERSION This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years. Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. =head1 AUTHORS =over 4 =item * Jerome Quelin =item * Ricardo Signes =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 by Jerome Quelin. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut __END__ #pod =head1 DESCRIPTION #pod #pod This scanner will check if a given test is using recent functions from #pod L, and increase the minimum version for this module #pod accordingly. #pod Perl-PrereqScanner-1.100/lib/Perl/PrereqScanner/Scanner/Superclass.pm000644 000765 000024 00000004463 14422425646 025601 0ustar00rjbsstaff000000 000000 use strict; use warnings; package Perl::PrereqScanner::Scanner::Superclass 1.100; # ABSTRACT: scan for modules loaded with superclass.pm use Moo; with 'Perl::PrereqScanner::Scanner'; #pod =head1 DESCRIPTION #pod #pod This scanner will look for dependencies from the L module: #pod #pod use superclass 'Foo', Bar => 1.23; #pod #pod =cut my $mod_re = qr/^[A-Z_a-z][0-9A-Z_a-z]*(?:(?:::|')[0-9A-Z_a-z]+)*$/; sub scan_for_prereqs { my ( $self, $ppi_doc, $req ) = @_; # regular use, require, and no my $includes = $ppi_doc->find('Statement::Include') || []; for my $node (@$includes) { # inheritance if ( $node->module eq 'superclass' ) { # rt#55713: skip arguments like '-norequires', focus only on inheritance my @meat = grep { $_->isa('PPI::Token::QuoteLike::Words') || $_->isa('PPI::Token::Quote') || $_->isa('PPI::Token::Number') } $node->arguments; my @args = map { $self->_q_contents($_) } @meat; while (@args) { my $module = shift @args; my $version = ( @args && $args[0] !~ $mod_re ) ? shift(@args) : 0; $req->add_minimum( $module => $version ); } } } } 1; __END__ =pod =encoding UTF-8 =head1 NAME Perl::PrereqScanner::Scanner::Superclass - scan for modules loaded with superclass.pm =head1 VERSION version 1.100 =head1 DESCRIPTION This scanner will look for dependencies from the L module: use superclass 'Foo', Bar => 1.23; =head1 PERL VERSION This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years. Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. =head1 AUTHORS =over 4 =item * Jerome Quelin =item * Ricardo Signes =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 by Jerome Quelin. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Perl-PrereqScanner-1.100/lib/Perl/PrereqScanner/Scanner/POE.pm000644 000765 000024 00000003424 14422425646 024074 0ustar00rjbsstaff000000 000000 use strict; use warnings; package Perl::PrereqScanner::Scanner::POE 1.100; # ABSTRACT: scan for POE components use Moo; with 'Perl::PrereqScanner::Scanner'; #pod =head1 DESCRIPTION #pod #pod This scanner will look for POE modules included with C #pod #pod use POE wq(Component::IRC); #pod #pod =cut sub scan_for_prereqs { my ($self, $ppi_doc, $req) = @_; # regular use and require my $includes = $ppi_doc->find('Statement::Include') || []; for my $node ( @$includes ) { if ( $node->module eq 'POE' ) { my @meat = grep { $_->isa('PPI::Token::QuoteLike::Words') || $_->isa('PPI::Token::Quote') } $node->arguments; my @components = map { $self->_q_contents($_) } @meat; $req->add_minimum("POE::$_" => 0) for @components; } } } 1; __END__ =pod =encoding UTF-8 =head1 NAME Perl::PrereqScanner::Scanner::POE - scan for POE components =head1 VERSION version 1.100 =head1 DESCRIPTION This scanner will look for POE modules included with C use POE wq(Component::IRC); =head1 PERL VERSION This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years. Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. =head1 AUTHORS =over 4 =item * Jerome Quelin =item * Ricardo Signes =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 by Jerome Quelin. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Perl-PrereqScanner-1.100/lib/Perl/PrereqScanner/Scanner/Moose.pm000644 000765 000024 00000012335 14422425646 024534 0ustar00rjbsstaff000000 000000 use strict; use warnings; package Perl::PrereqScanner::Scanner::Moose 1.100; # ABSTRACT: scan for Moose sugar indicators of required modules use Moo; with 'Perl::PrereqScanner::Scanner'; #pod =head1 DESCRIPTION #pod #pod This scanner will look for the following indicators: #pod #pod =begin :list #pod #pod * L inheritance declared with the C keyword #pod #pod * L roles included with the C keyword #pod #pod =end :list #pod #pod =cut sub scan_for_prereqs { my ($self, $ppi_doc, $req) = @_; # Moose-based roles / inheritance my @chunks = # This is what we get when someone does: with('Foo'); # The target to get at is the PPI::Token::Quote::Single. # -- rjbs, 2010-09-05 # # PPI::Statement # PPI::Token::Word # PPI::Structure::List # PPI::Statement::Expression # PPI::Token::Quote::Single # PPI::Token::Structure map { [ $_->schildren ] } grep { $_->child(0)->literal =~ m{\A(?:with|extends)\z} } grep { $_->child(0)->isa('PPI::Token::Word') } @{ $ppi_doc->find('PPI::Statement') || [] }; foreach my $hunk ( @chunks ) { # roles/inheritance *WITH* version declaration ( added in Moose 1.03 ) if ( grep { $_->isa('PPI::Structure::Constructor') || $_->isa('PPI::Structure::List') } @$hunk ) { # hack for List my @hunkdata = @$hunk; while ( $hunkdata[0]->isa('PPI::Token::Whitespace') ) { shift @hunkdata } if ( $hunkdata[1]->isa('PPI::Structure::List') ) { @hunkdata = $hunkdata[1]->children; next unless @hunkdata; while ( $hunkdata[0]->isa('PPI::Token::Whitespace') ) { shift @hunkdata } } if ( $hunkdata[0]->isa('PPI::Statement::Expression') ) { @hunkdata = $hunkdata[0]->children; next unless @hunkdata; } # possibly contains a version declaration! my( $pkg, $done ); foreach my $elem ( @hunkdata ) { # Scan for the first quote-like word, which is the package name if ( $elem->isa('PPI::Token::Quote') || $elem->isa('PPI::Token::QuoteLike') ) { # found a new package and the previous one didn't have a version? if ( defined $pkg ) { $req->add_minimum( $pkg => 0 ); } $pkg = ( $self->_q_contents( $elem ) )[0]; undef $done; next; } # skip over the fluff and look for the version block if ( $pkg and $elem->isa('PPI::Structure::Constructor') ) { foreach my $subelem ( $elem->children ) { # skip over the fluff and look for the real version code if ( $subelem->isa('PPI::Statement') ) { my $found_ver; foreach my $code ( $subelem->children ) { # skip over the fluff until we're sure we saw the version declaration if ( $code->isa('PPI::Token::Word') and $code->literal eq '-version' ) { $found_ver++; next; } if ( $found_ver and ( $code->isa('PPI::Token::Quote') || $code->isa('PPI::Token::QuoteLike') || $code->isa('PPI::Token::Number') ) ) { $req->add_minimum( $pkg => ( $self->_q_contents( $code ) )[0] ); $done++; undef $pkg; last; } } # Did we fail to find the ver? if ( $found_ver and ! $done ) { die "Possible internal error!"; } } } # Failed to find version-specific stuff if ( ! $done ) { $req->add_minimum( $pkg => 0 ); undef $pkg; next; } } } # If we found a pkg but no done, this must be the "last" pkg to be declared and it has no version if ( $pkg and ! $done ) { $req->add_minimum( $pkg => 0 ); } } else { # no version or funky blocks in code, yay! $req->add_minimum( $_ => 0 ) for grep { Params::Util::_CLASS($_) } map { $self->_q_contents( $_ ) } grep { $_->isa('PPI::Token::Quote') || $_->isa('PPI::Token::QuoteLike') } @$hunk; } } } 1; __END__ =pod =encoding UTF-8 =head1 NAME Perl::PrereqScanner::Scanner::Moose - scan for Moose sugar indicators of required modules =head1 VERSION version 1.100 =head1 DESCRIPTION This scanner will look for the following indicators: =over 4 =item * L inheritance declared with the C keyword =item * L roles included with the C keyword =back =head1 PERL VERSION This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years. Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. =head1 AUTHORS =over 4 =item * Jerome Quelin =item * Ricardo Signes =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 by Jerome Quelin. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Perl-PrereqScanner-1.100/lib/Perl/PrereqScanner/Scanner/Perl5.pm000644 000765 000024 00000012601 14422425646 024435 0ustar00rjbsstaff000000 000000 use strict; use warnings; package Perl::PrereqScanner::Scanner::Perl5 1.100; # ABSTRACT: scan for core Perl 5 language indicators of required modules use Moo; with 'Perl::PrereqScanner::Scanner'; #pod =head1 DESCRIPTION #pod #pod This scanner will look for the following indicators: #pod #pod =begin :list #pod #pod * plain lines beginning with C, C, or C in your perl modules and scripts, including minimum perl version #pod #pod * regular inheritance declared with the C and C pragmata #pod #pod =end :list #pod #pod Since Perl does not allow you to supply a version requirement with a #pod C statement, the scanner will check the statement after the #pod C to see if it is C<< Module->VERSION( minimum_version ); >>. #pod #pod In order to provide a minimum version, that method call must meet the #pod following requirements: #pod #pod =begin :list #pod #pod * it must be the very next statement after C. Nothing can separate them but whitespace and comments (and one semicolon). #pod #pod * C must be a bareword, and match the C exactly. #pod #pod * C must be a literal number, v-string, or single-quoted string. Double quotes are not allowed. #pod #pod =end :list #pod #pod =cut sub scan_for_prereqs { my ($self, $ppi_doc, $req) = @_; # regular use, require, and no my $includes = $ppi_doc->find('Statement::Include') || []; for my $node ( @$includes ) { # minimum perl version if ( $node->version ) { $req->add_minimum(perl => $node->version); next; } # inheritance if (grep { $_ eq $node->module } qw{ base parent }) { # rt#55713: skip arguments to base or parent, focus only on inheritance my @meat = grep { $_->isa('PPI::Token::QuoteLike::Words') || $_->isa('PPI::Token::Quote') } $node->arguments; my @parents = map { $self->_q_contents($_) } @meat; $req->add_minimum($_ => 0) for @parents; } # regular modules my $version = $node->module_version ? $node->module_version->content : 0; # rt#55851: 'require $foo;' shouldn't add any prereq next unless $node->module; # See if the next statement after require is Module->VERSION(min): $version = $self->_check_required_version($node) || 0 if not $version and $node->type =~ /\A(?:require|use)\z/; $req->add_minimum($node->module, $version); } } # For "require Module", see if the next statement is Module->VERSION(min): sub _check_required_version { my ($self, $node) = @_; my $next = $node->snext_sibling; return unless $next and $next->class eq 'PPI::Statement'; my ($invocant, $op, $method, $list, $too_much) = $next->schildren; return unless defined $list # need enough children and $op->class eq 'PPI::Token::Operator' and $op->content eq '->' and $method->content eq 'VERSION' and (not defined $too_much # but not too many children or $too_much->content eq ';') and $invocant->content eq $node->module and $list->class eq 'PPI::Structure::List' and $list->braces eq '()' and $list->schildren == 1; my $exp = $list->schild(0); return unless $exp->class eq 'PPI::Statement::Expression' and $exp->schildren == 1; my $arg = $exp->schild(0); if ($arg->isa('PPI::Token::Number')) { return $arg->content; } elsif ($arg->isa('PPI::Token::Quote') and $arg->can('literal')) { return $arg->literal; } return; # No minimum version found } # end _check_required_version 1; __END__ =pod =encoding UTF-8 =head1 NAME Perl::PrereqScanner::Scanner::Perl5 - scan for core Perl 5 language indicators of required modules =head1 VERSION version 1.100 =head1 DESCRIPTION This scanner will look for the following indicators: =over 4 =item * plain lines beginning with C, C, or C in your perl modules and scripts, including minimum perl version =item * regular inheritance declared with the C and C pragmata =back Since Perl does not allow you to supply a version requirement with a C statement, the scanner will check the statement after the C to see if it is C<< Module->VERSION( minimum_version ); >>. In order to provide a minimum version, that method call must meet the following requirements: =over 4 =item * it must be the very next statement after C. Nothing can separate them but whitespace and comments (and one semicolon). =item * C must be a bareword, and match the C exactly. =item * C must be a literal number, v-string, or single-quoted string. Double quotes are not allowed. =back =head1 PERL VERSION This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years. Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. =head1 AUTHORS =over 4 =item * Jerome Quelin =item * Ricardo Signes =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 by Jerome Quelin. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Perl-PrereqScanner-1.100/lib/Perl/PrereqScanner/Scanner/Aliased.pm000644 000765 000024 00000003753 14422425646 025020 0ustar00rjbsstaff000000 000000 use strict; use warnings; package Perl::PrereqScanner::Scanner::Aliased 1.100; # ABSTRACT: scan for OO module aliases via aliased.pm use Moo; with 'Perl::PrereqScanner::Scanner'; #pod =head1 DESCRIPTION #pod #pod This scanner will look for aliased OO modules: #pod #pod use aliased 'Some::Long::Long::Name' => 'Short::Name'; #pod #pod Short::Name->new; #pod ... #pod #pod =cut sub scan_for_prereqs { my ($self, $ppi_doc, $req) = @_; # regular use and require my $includes = $ppi_doc->find('Statement::Include') || []; for my $node ( @$includes ) { # aliasing if (grep { $_ eq $node->module } qw{ aliased }) { # We only want the first argument to aliased my @args = grep { $_->isa('PPI::Token::QuoteLike::Words') || $_->isa('PPI::Token::Quote') } $node->arguments; next unless @args; my ($module) = $self->_q_contents($args[0]); $req->add_minimum($module => 0); } } } 1; __END__ =pod =encoding UTF-8 =head1 NAME Perl::PrereqScanner::Scanner::Aliased - scan for OO module aliases via aliased.pm =head1 VERSION version 1.100 =head1 DESCRIPTION This scanner will look for aliased OO modules: use aliased 'Some::Long::Long::Name' => 'Short::Name'; Short::Name->new; ... =head1 PERL VERSION This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years. Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. =head1 AUTHORS =over 4 =item * Jerome Quelin =item * Ricardo Signes =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 by Jerome Quelin. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Perl-PrereqScanner-1.100/xt/author/000755 000765 000024 00000000000 14422425646 017234 5ustar00rjbsstaff000000 000000 Perl-PrereqScanner-1.100/xt/release/000755 000765 000024 00000000000 14422425646 017352 5ustar00rjbsstaff000000 000000 Perl-PrereqScanner-1.100/xt/release/changes_has_content.t000644 000765 000024 00000002101 14422425646 023526 0ustar00rjbsstaff000000 000000 use Test::More tests => 2; note 'Checking Changes'; my $changes_file = 'Changes'; my $newver = '1.100'; my $trial_token = '-TRIAL'; my $encoding = 'UTF-8'; 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; 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>); if ($encoding) { require Encode; $changelog = Encode::decode($encoding, $changelog, Encode::FB_CROAK()); } 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; } Perl-PrereqScanner-1.100/xt/author/pod-syntax.t000644 000765 000024 00000000252 14422425646 021526 0ustar00rjbsstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); Perl-PrereqScanner-1.100/t/autoprereq.t000644 000765 000024 00000026430 14422425646 020123 0ustar00rjbsstaff000000 000000 #!perl use strict; use warnings; use File::Temp qw{ tempfile }; use Perl::PrereqScanner; use PPI::Document; use Try::Tiny; use Test::More; sub prereq_is { my ($str, $want, $comment) = @_; $comment ||= $str; my $scanner = Perl::PrereqScanner->new; # scan_ppi_document try { my $result = $scanner->scan_ppi_document( PPI::Document->new(\$str) ); is_deeply($result->as_string_hash, $want, $comment); } catch { fail("scanner died on: $comment"); diag($_); }; # scan_string try { my $result = $scanner->scan_string( $str ); is_deeply($result->as_string_hash, $want, $comment); } catch { fail("scanner died on: $comment"); diag($_); }; # scan_file try { my ($fh, $filename) = tempfile( UNLINK => 1 ); print $fh $str; close $fh; my $result = $scanner->scan_file( $filename ); is_deeply($result->as_string_hash, $want, $comment); } catch { fail("scanner died on: $comment"); diag($_); }; } prereq_is('', { }, '(empty string)'); prereq_is('use Use::NoVersion;', { 'Use::NoVersion' => 0 }); prereq_is('use Use::Version 0.50;', { 'Use::Version' => '0.50' }); prereq_is('use Errno 0.50;', { 'Errno' => '0.50' }); prereq_is('require Require;', { Require => 0 }); prereq_is( 'use Use::Version 0.50; use Use::Version 1.00;', { 'Use::Version' => '1.00', }, ); prereq_is( 'use Use::Version 1.00; use Use::Version 0.50;', { 'Use::Version' => '1.00', }, ); prereq_is( 'use Import::IgnoreAPI require => 1;', { 'Import::IgnoreAPI' => 0 }, ); prereq_is( 'no Import::IgnoreAPI require => 1;', { 'Import::IgnoreAPI' => 0 }, ); prereq_is('require Require; Require->VERSION(0.50);', { Require => '0.50' }); prereq_is('use Require; Require->VERSION(0.50);', { Require => '0.50' }); prereq_is('require Require; Require->VERSION(+0.50);', { Require => 0 }); prereq_is('require Require; foo(); Require->VERSION(1.00);', { Require => 0 }); prereq_is( 'require Require; Require->VERSION(v1.0.50);', { Require => 'v1.0.50' } ); prereq_is( q{require Require; Require->VERSION('v1.0.50');}, { Require => 'v1.0.50' } ); prereq_is( 'require Require; Require->VERSION(q[1.00]);', { Require => '1.00' } ); prereq_is( 'require Require; Require::Other->VERSION(1.00);', { Require => 0 } ); prereq_is( <<'END REQUIRE WITH COMMENT', require Require::This; # this comment shouldn't matter Require::This->VERSION(0.450); END REQUIRE WITH COMMENT { 'Require::This' => '0.450' }, 'require with comment' ); prereq_is( 'require Require; Require->VERSION(0.450) if some_condition; ', { 'Require' => 0 } ); # Moose features prereq_is( 'extends "Foo::Bar";', { 'Foo::Bar' => 0, }, ); prereq_is( 'extends "Foo::Bar"; extends "Foo::Baz";', { 'Foo::Bar' => 0, 'Foo::Baz' => 0, }, ); prereq_is("with 'With::Single';", { 'With::Single' => 0 }); prereq_is( "extends 'Extends::List1', 'Extends::List2';", { 'Extends::List1' => 0, 'Extends::List2' => 0, }, ); prereq_is("within('With::Single');", { }); prereq_is( "with 'With::Single', 'With::Double';", { 'With::Single' => 0, 'With::Double' => 0, }, ); prereq_is( "with 'With::Single' => { -excludes => 'method'}, 'With::Double';", { 'With::Single' => 0, 'With::Double' => 0, }, ); prereq_is( 'with ("With::QW1", "With::QW2");', { 'With::QW1' => 0, 'With::QW2' => 0, }, ); prereq_is( "with('Paren::Role');", { 'Paren::Role' => 0, }, ); prereq_is( 'with("With::QW1", "With::QW2");', { 'With::QW1' => 0, 'With::QW2' => 0, }, ); prereq_is( 'with qw(With::QW1 With::QW2);', { 'With::QW1' => 0, 'With::QW2' => 0, }, ); prereq_is( 'with "::Foo"', { }, ); prereq_is( 'extends qw(Extends::QW1 Extends::QW2);', { 'Extends::QW1' => 0, 'Extends::QW2' => 0, }, ); prereq_is( 'use base "Base::QQ1";', { 'Base::QQ1' => 0, base => 0, }, ); prereq_is( 'use base 10 "Base::QQ1";', { 'Base::QQ1' => 0, base => 10, }, ); prereq_is( 'use base qw{ Base::QW1 Base::QW2 };', { 'Base::QW1' => 0, 'Base::QW2' => 0, base => 0 }, ); prereq_is( 'use parent "Parent::QQ1";', { 'Parent::QQ1' => 0, parent => 0, }, ); prereq_is( 'use parent 10 "Parent::QQ1";', { 'Parent::QQ1' => 0, parent => 10, }, ); prereq_is( 'use parent 2 "Parent::QQ1"; use parent 2 "Parent::QQ2"', { 'Parent::QQ1' => 0, 'Parent::QQ2' => 0, parent => 2, }, ); prereq_is( 'use parent 2 "Parent::QQ1"; use parent 1 "Parent::QQ2"', { 'Parent::QQ1' => 0, 'Parent::QQ2' => 0, parent => 2, }, ); prereq_is( 'use parent qw{ Parent::QW1 Parent::QW2 };', { 'Parent::QW1' => 0, 'Parent::QW2' => 0, parent => 0, }, ); # test case for #55713: support for use parent -norequire prereq_is( 'use parent -norequire, qw{ Parent::QW1 Parent::QW2 };', { 'Parent::QW1' => 0, 'Parent::QW2' => 0, parent => 0, }, ); prereq_is( 'use superclass "superclass::QQ1";', { 'superclass::QQ1' => 0, superclass => 0, }, ); prereq_is( 'use superclass 10 "superclass::QQ1", 1.23;', { 'superclass::QQ1' => 1.23, superclass => 10, }, ); prereq_is( 'use superclass 2 "superclass::QQ1"; use superclass 2 "superclass::QQ2"', { 'superclass::QQ1' => 0, 'superclass::QQ2' => 0, superclass => 2, }, ); prereq_is( 'use superclass 2 "superclass::QQ1", "v1.2.3"; use superclass 1 "superclass::QQ1", "v1.2.4"', { 'superclass::QQ1' => "v1.2.4", superclass => 2, }, ); prereq_is( 'use superclass qw{ superclass::QW1 1.23 };', { 'superclass::QW1' => 1.23, superclass => 0, }, ); # test case for #55713: support for use superclass -norequire prereq_is( 'use superclass -norequire, qw{ superclass::QW1 superclass::QW2 };', { 'superclass::QW1' => 0, 'superclass::QW2' => 0, superclass => 0, }, ); prereq_is( 'use superclass -norequire, "superclass::QW1" => 1.23, "superclass::QW2";', { 'superclass::QW1' => 1.23, 'superclass::QW2' => 0, superclass => 0, }, ); # test case for #55851: require $foo prereq_is( 'my $foo = "Carp"; require $foo', {}, ); prereq_is( q{use strict; use warnings; use lib '.'; use feature ':5.10';}, { strict => 0, warnings => 0, lib => 0, feature => 0 }, ); prereq_is( q{use Test::More; is 0, 1; done_testing}, { 'Test::More' => '0.88', }, ); { my $scanner = Perl::PrereqScanner->new; try { $scanner->scan_string(\"\x0"); fail('scan succeeded'); } catch { like($_, qr/PPI parse failed/); }; } # test cases for Moose 1.03 -version extension prereq_is( 'extends "Foo::Bar"=>{-version=>"1.1"};', { 'Foo::Bar' => '1.1', }, ); prereq_is( 'extends "Foo::Bar" => { -version => \'1.1\' };', { 'Foo::Bar' => '1.1', }, ); prereq_is( 'extends "Foo::Bar" => { -version => 13.3 };', { 'Foo::Bar' => '13.3', }, ); prereq_is( 'extends "Foo::Bar" => { -version => \'1.1\' }; extends "Foo::Baz" => { -version => 5 };', { 'Foo::Bar' => '1.1', 'Foo::Baz' => 5, }, ); prereq_is( 'extends "Foo::Bar"=>{-version=>1},"Foo::Baz"=>{-version=>2};', { 'Foo::Bar' => 1, 'Foo::Baz' => 2, }, ); prereq_is( 'extends "Foo::Bar" => { -version => "4.3.2" }, "Foo::Baz" => { -version => 2.44894 };', { 'Foo::Bar' => 'v4.3.2', 'Foo::Baz' => 2.44894, }, ); prereq_is( 'with "With::Single" => { -excludes => "method", -version => "1.1.1" }, "With::Double";', { 'With::Single' => 'v1.1.1', 'With::Double' => 0, }, ); prereq_is( 'with "With::Single" => { -wow => { -wow => { a => b } }, -version => "1.1.1" }, "With::Double";', { 'With::Single' => 'v1.1.1', 'With::Double' => 0, }, ); prereq_is( 'with "With::Single" => { -exclude => "method", -version => "1.1.1" }, "With::Double" => { -exclude => "foo" };', { 'With::Single' => 'v1.1.1', 'With::Double' => 0, }, ); prereq_is( 'with("Foo::Bar");', { 'Foo::Bar' => 0, }, ); prereq_is( 'with( "Foo::Bar" );', { 'Foo::Bar' => 0, }, ); prereq_is( 'with( "Foo::Bar", "Bar::Baz" );', { 'Foo::Bar' => 0, 'Bar::Baz' => 0, } ); prereq_is( 'with( "Foo::Bar" => { -version => "1.1" }, "Bar::Baz" );', { 'Foo::Bar' => '1.1', 'Bar::Baz' => 0, } ); prereq_is( 'with( "Blam::Blam", "Foo::Bar" => { -version => "1.1" }, "Bar::Baz" );', { 'Blam::Blam' => 0, 'Foo::Bar' => '1.1', 'Bar::Baz' => 0, } ); prereq_is( 'with("Blam::Blam","Foo::Bar"=>{-version=>"1.1"}, "Bar::Baz" );', { 'Blam::Blam' => 0, 'Foo::Bar' => '1.1', 'Bar::Baz' => 0, } ); prereq_is( 'with("Blam::Blam","Foo::Bar"=>{-version=>"1.1"}, "Bar::Baz", "Hoopla" => { -version => 1 } );', { 'Blam::Blam' => 0, 'Foo::Bar' => '1.1', 'Bar::Baz' => 0, 'Hoopla' => 1, } ); prereq_is( 'extends("Foo::Bar");', { 'Foo::Bar' => 0, }, ); prereq_is( 'extends( "Foo::Bar" );', { 'Foo::Bar' => 0, }, ); prereq_is( 'extends( "Foo::Bar", "Bar::Baz" );', { 'Foo::Bar' => 0, 'Bar::Baz' => 0, } ); prereq_is( 'extends( "Foo::Bar" => { -version => "1.1" }, "Bar::Baz" );', { 'Foo::Bar' => '1.1', 'Bar::Baz' => 0, } ); prereq_is( 'extends( "Blam::Blam", "Foo::Bar" => { -version => "1.1" }, "Bar::Baz" );', { 'Blam::Blam' => 0, 'Foo::Bar' => '1.1', 'Bar::Baz' => 0, } ); prereq_is( 'extends("Blam::Blam","Foo::Bar"=>{-version=>"1.1"}, "Bar::Baz" );', { 'Blam::Blam' => 0, 'Foo::Bar' => '1.1', 'Bar::Baz' => 0, } ); prereq_is( 'extends("Blam::Blam","Foo::Bar"=>{-version=>"1.1"}, "Bar::Baz", "Hoopla" => { -version => 1 } );', { 'Blam::Blam' => 0, 'Foo::Bar' => '1.1', 'Bar::Baz' => 0, 'Hoopla' => 1, } ); prereq_is( 'with( \'AAA\' => { -version => \'1\' }, \'BBB\' => { -version => \'2.1\' }, \'CCC\' => { -version => \'4.012345\', default_finders => [ \':InstallModules\', \':ExecFiles\' ], }, );', { 'AAA' => 1, 'BBB' => '2.1', 'CCC' => '4.012345', }, ); prereq_is( 'with( "AAA" => { -version => 1 }, );', { 'AAA' => 1, }, ); prereq_is( 'with "AAA" => { -version => 1 };', { 'AAA' => 1, }, ); prereq_is( 'with( "Bar" );', { 'Bar' => 0, }, ); prereq_is( 'with \'Bar\' ;', { 'Bar' => 0, }, ); # invalid code tests prereq_is( 'with;', {}, ); prereq_is( 'with foo;', {} ); # test cases for aliased.pm prereq_is( q{use aliased 'Long::Custom::Class::Name'}, { 'aliased' => 0, 'Long::Custom::Class::Name' => 0, }, ); prereq_is( q{use aliased 0.30 'Long::Custom::Class::Name'}, { 'aliased' => '0.30', 'Long::Custom::Class::Name' => 0, }, ); prereq_is( q{use aliased 'Long::Custom::Class::Name' => 'Name'}, { 'aliased' => 0, 'Long::Custom::Class::Name' => 0, }, ); prereq_is( q{use aliased;}, { 'aliased' => 0, }, ); # rolsky says this is a problem case prereq_is( q{use Test::Requires 'Foo'}, { 'Test::Requires' => 0, }, ); # test cases for POE prereq_is( q{use POE 'Component::IRC'}, { 'POE' => 0, 'POE::Component::IRC' => 0, }, ); prereq_is( q{use POE qw/Component::IRC Component::Server::NNTP/}, { 'POE' => 0, 'POE::Component::IRC' => 0, 'POE::Component::Server::NNTP' => 0, }, ); done_testing; Perl-PrereqScanner-1.100/t/scan-module.t000644 000765 000024 00000002212 14422425646 020133 0ustar00rjbsstaff000000 000000 #!perl use strict; use warnings; use Perl::PrereqScanner; use Try::Tiny; use Test::More; sub module_prereq_is { my ($module_name, $want, $comment) = @_; $comment ||= $module_name; my $scanner = Perl::PrereqScanner->new; # scan_ppi_document try { my $result = $scanner->scan_module( $module_name ); is_deeply($result->as_string_hash, $want, $comment); } catch { fail("scanner died on: $comment"); diag($_); }; } # Test with ourself! module_prereq_is( 'Perl::PrereqScanner', { 'Carp' => 0, 'CPAN::Meta::Requirements' => '2.124', 'List::Util' => 0, 'Module::Path' => 0, 'Moo' => '2.000000', 'PPI' => '1.215', 'Params::Util' => 0, 'Perl::PrereqScanner::Scanner' => 0, 'String::RewritePrefix' => '0.005', 'Types::Standard' => 0, 'namespace::autoclean' => 0, 'perl' => '5.008', 'strict' => 0, 'warnings' => 0, }, ); done_testing; Perl-PrereqScanner-1.100/t/00-report-prereqs.t000644 000765 000024 00000013601 14422425646 021137 0ustar00rjbsstaff000000 000000 #!perl use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.029 use Test::More tests => 1; use ExtUtils::MakeMaker; use File::Spec; # from $version::LAX my $lax_version_re = qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? | (?:\.[0-9]+) (?:_[0-9]+)? ) | (?: v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? | (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? ) )/x; # hide optional CPAN::Meta modules from prereq scanner # and check if they are available my $cpan_meta = "CPAN::Meta"; my $cpan_meta_pre = "CPAN::Meta::Prereqs"; my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic # Verify requirements? my $DO_VERIFY_PREREQS = 1; sub _max { my $max = shift; $max = ( $_ > $max ) ? $_ : $max for @_; return $max; } sub _merge_prereqs { my ($collector, $prereqs) = @_; # CPAN::Meta::Prereqs object if (ref $collector eq $cpan_meta_pre) { return $collector->with_merged_prereqs( CPAN::Meta::Prereqs->new( $prereqs ) ); } # Raw hashrefs for my $phase ( keys %$prereqs ) { for my $type ( keys %{ $prereqs->{$phase} } ) { for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; } } } return $collector; } my @include = qw( ); my @exclude = qw( ); # Add static prereqs to the included modules list my $static_prereqs = do './t/00-report-prereqs.dd'; # Merge all prereqs (either with ::Prereqs or a hashref) my $full_prereqs = _merge_prereqs( ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), $static_prereqs ); # Add dynamic prereqs to the included modules list (if we can) my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; my $cpan_meta_error; if ( $source && $HAS_CPAN_META && (my $meta = eval { CPAN::Meta->load_file($source) } ) ) { $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); } else { $cpan_meta_error = $@; # capture error from CPAN::Meta->load_file($source) $source = 'static metadata'; } my @full_reports; my @dep_errors; my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; # Add static includes into a fake section for my $mod (@include) { $req_hash->{other}{modules}{$mod} = 0; } for my $phase ( qw(configure build test runtime develop other) ) { next unless $req_hash->{$phase}; next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); for my $type ( qw(requires recommends suggests conflicts modules) ) { next unless $req_hash->{$phase}{$type}; my $title = ucfirst($phase).' '.ucfirst($type); my @reports = [qw/Module Want Have/]; for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { next if grep { $_ eq $mod } @exclude; my $want = $req_hash->{$phase}{$type}{$mod}; $want = "undef" unless defined $want; $want = "any" if !$want && $want == 0; if ($mod eq 'perl') { push @reports, ['perl', $want, $]]; next; } my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; if ($prefix) { my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); $have = "undef" unless defined $have; push @reports, [$mod, $want, $have]; if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { if ( $have !~ /\A$lax_version_re\z/ ) { push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; } elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { push @dep_errors, "$mod version '$have' is not in required range '$want'"; } } } else { push @reports, [$mod, $want, "missing"]; if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { push @dep_errors, "$mod is not installed ($req_string)"; } } } if ( @reports ) { push @full_reports, "=== $title ===\n\n"; my $ml = _max( map { length $_->[0] } @reports ); my $wl = _max( map { length $_->[1] } @reports ); my $hl = _max( map { length $_->[2] } @reports ); if ($type eq 'modules') { splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; } else { splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; } push @full_reports, "\n"; } } } if ( @full_reports ) { diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; } if ( $cpan_meta_error || @dep_errors ) { diag "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n"; } if ( $cpan_meta_error ) { my ($orig_source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; diag "\nCPAN::Meta->load_file('$orig_source') failed with: $cpan_meta_error\n"; } if ( @dep_errors ) { diag join("\n", "\nThe following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); } pass('Reported prereqs'); # vim: ts=4 sts=4 sw=4 et: Perl-PrereqScanner-1.100/t/00-report-prereqs.dd000644 000765 000024 00000004753 14422425646 021273 0ustar00rjbsstaff000000 000000 do { my $x = { 'configure' => { 'requires' => { 'ExtUtils::MakeMaker' => '6.78' } }, 'develop' => { 'requires' => { 'Encode' => '0', 'Test::More' => '0', 'Test::Pod' => '1.41' } }, 'runtime' => { 'requires' => { 'CPAN::Meta::Requirements' => '2.124', 'Carp' => '0', 'File::Find' => '0', 'File::Spec::Functions' => '0', 'FindBin' => '0', 'Getopt::Long' => '0', 'Getopt::Long::Descriptive' => '0', 'List::Util' => '1.33', 'Module::Path' => '0', 'Moo' => '2.000000', 'Moo::Role' => '0', 'PPI' => '1.215', 'Params::Util' => '0', 'Scalar::Util' => '0', 'String::RewritePrefix' => '0.005', 'Types::Standard' => '0', 'lib' => '0', 'namespace::autoclean' => '0', 'perl' => '5.012', 'strict' => '0', 'warnings' => '0' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'ExtUtils::MakeMaker' => '0', 'File::Spec' => '0', 'File::Temp' => '0', 'PPI::Document' => '0', 'Test::More' => '0.96', 'Try::Tiny' => '0' } } }; $x; }Perl-PrereqScanner-1.100/t/scan-prereqs.t000644 000765 000024 00000002243 14422425646 020333 0ustar00rjbsstaff000000 000000 #!perl use strict; use warnings; use File::Temp qw{ tempfile }; use Perl::PrereqScanner; use PPI::Document; use Try::Tiny; use File::Spec::Functions; use Test::More; # try to be cross-platform my $script = catfile(qw(bin scan_prereqs)); my $files = join(' ', map { catfile(qw(corpus scan), "$_.pl") } qw(foo bar)); # depending on exact output match is a bit fragile and may become cumbersome # but we'll try it for now. foreach my $test ( [default => '' => < '--combine' => <; }; is $out, $exp, "Expected output for $name"; } done_testing; Perl-PrereqScanner-1.100/corpus/scan/000755 000765 000024 00000000000 14422425646 017536 5ustar00rjbsstaff000000 000000 Perl-PrereqScanner-1.100/corpus/scan/bar.pl000644 000765 000024 00000000143 14422425646 020635 0ustar00rjbsstaff000000 000000 use strict; use warnings; use Time::Local qw(timelocal); use Exporter (); use File::Temp 0.12; 1; Perl-PrereqScanner-1.100/corpus/scan/foo.pl000644 000765 000024 00000000107 14422425646 020654 0ustar00rjbsstaff000000 000000 use strict; use warnings; use File::Spec (); use IO::File 1.08 (); 1; Perl-PrereqScanner-1.100/bin/scan-perl-prereqs000755 000765 000024 00000010324 14422425646 021340 0ustar00rjbsstaff000000 000000 #!/usr/bin/perl package Perl::PrereqScanner::App 1.100; # ABSTRACT: scan your working dir for likely prereqs use strict; use warnings; use lib (); use File::Find; use List::Util qw{ max }; use Perl::PrereqScanner; use CPAN::Meta::Requirements (); use Scalar::Util qw(looks_like_number); use Getopt::Long::Descriptive; my ($opt, $usage) = describe_options( 'scan-perl-prereqs %o [DIR|FILES]', [ 'pretty' => 'format for human consumption, not toolchain' ], [ 'by-file' => 'emit one stanza per file' ], [ 'lib|I=s@' => 'specifies include paths, like perl\'s -I' ], [ 'version' => 'print usage message and exit' ], [ 'help' => 'print version and exit' ], ); lib->import(@{ $opt->lib }) if $opt->lib; print('scan-perl-prereqs v' . (Perl::PrereqScanner->VERSION || 'DEV') . "\n") if $opt->version; print($usage->text) if $opt->help; exit if $opt->version or $opt->help; foreach my $file ( @ARGV ? @ARGV : '.' ) { -d $file ? scan_dir( $file ) : scan_file( $file ); } my %result; sub scan_dir { find( { no_chdir => 1, wanted => sub { scan_file($_) if /\.(pl|PL|pm|cgi|psgi|t)$/ && -f $_ } }, shift ); } sub scan_file { my $file = shift; my $key = $opt->by_file ? $file : ''; $result{ $key } ||= CPAN::Meta::Requirements->new; $result{ $key }->add_requirements( Perl::PrereqScanner->new->scan_file($file) ); } for my $file (sort keys %result) { print "## $file\n" if length $file and keys(%result) > 1; print_prereqs($result{$file}); } sub print_prereqs { my $prereqs = shift->as_string_hash; if( $opt->pretty ) { my $max = max map { length } keys %$prereqs; printf( "%-${max}s = %s\n", $_, $prereqs->{$_} ) for sort keys %$prereqs; } else { ### FIXME grossly insufficient filtering, should refactor/backport ### filtering from Dist::Zilla::Plugin::AutoPrereqs or something foreach ( sort keys %$prereqs ) { next if $_ eq 'perl'; my $v = $prereqs->{$_} || 0; $v = qq{"$v"} unless looks_like_number($v); print($v eq '0' ? qq{$_\n} : qq{$_~$v\n}); } } } exit; #pod =head1 SYNOPSIS #pod #pod scan-perl-prereqs [--by-file] [--pretty] [DIRS | FILES] #pod #pod Directories are traversed with L to collect all C<.pl>, C<.pm>, #pod C<.psgi> and C<.t> files. If no directories or files are specified, the current #pod working directory is scanned. #pod #pod The default is to print a single combined list suitable for piping to C #pod or similar tools. #pod #pod The C<--by-file> switch will print results grouped by the files in which they #pod were found. #pod #pod The C<--pretty> swith will print results in a more human-friendly format, with #pod names and versions vertically aligned. #pod #pod =cut __END__ =pod =encoding UTF-8 =head1 NAME Perl::PrereqScanner::App - scan your working dir for likely prereqs =head1 VERSION version 1.100 =head1 SYNOPSIS scan-perl-prereqs [--by-file] [--pretty] [DIRS | FILES] Directories are traversed with L to collect all C<.pl>, C<.pm>, C<.psgi> and C<.t> files. If no directories or files are specified, the current working directory is scanned. The default is to print a single combined list suitable for piping to C or similar tools. The C<--by-file> switch will print results grouped by the files in which they were found. The C<--pretty> swith will print results in a more human-friendly format, with names and versions vertically aligned. =head1 PERL VERSION This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years. Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. =head1 AUTHORS =over 4 =item * Jerome Quelin =item * Ricardo Signes =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 by Jerome Quelin. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Perl-PrereqScanner-1.100/bin/scan_prereqs000755 000765 000024 00000005232 14422425646 020464 0ustar00rjbsstaff000000 000000 #!/usr/bin/perl package Perl::PrereqScanner::App 1.100; # ABSTRACT: scan your working dir for likely prereqs use strict; use warnings; use File::Find; use File::Spec::Functions qw{ catdir updir }; use FindBin qw{ $Bin }; use lib catdir( $Bin, updir, 'lib' ); use List::Util qw{ max }; use Perl::PrereqScanner; use CPAN::Meta::Requirements (); use Getopt::Long qw{ GetOptions }; my %options; GetOptions( \%options, 'combine!', ); my $combined = $options{combine} && CPAN::Meta::Requirements->new; foreach my $file ( @ARGV ? @ARGV : '.' ) { -d $file ? scan_dir( $file ) : scan_file( $file ); } sub scan_dir { find( { no_chdir => 1, wanted => sub { scan_file($_) if /\.(pl|pm|psgi|t)$/ && -f $_; } }, shift ); } sub scan_file { my $file = shift; my $prereqs = Perl::PrereqScanner->new->scan_file($file); if( $options{combine} ){ $combined->add_requirements($prereqs); } else { print "* $file\n"; print_prereqs($prereqs); } } if( $options{combine} ){ print_prereqs($combined); } sub print_prereqs { my $prereqs = shift->as_string_hash; my $max = max map { length } keys %$prereqs; printf( "%-${max}s = %s\n", $_, $prereqs->{$_} ) for sort keys %$prereqs; } exit; #pod =head1 SYNOPSIS #pod #pod scan_prereqs [--combine] [DIRS|FILES] #pod #pod Directories are traversed with L to collect all C<.pl>, C<.pm>, #pod C<.psgi> and C<.t> files. If no directories or files are specified, the current #pod working directory is scanned. #pod #pod =cut __END__ =pod =encoding UTF-8 =head1 NAME Perl::PrereqScanner::App - scan your working dir for likely prereqs =head1 VERSION version 1.100 =head1 SYNOPSIS scan_prereqs [--combine] [DIRS|FILES] Directories are traversed with L to collect all C<.pl>, C<.pm>, C<.psgi> and C<.t> files. If no directories or files are specified, the current working directory is scanned. =head1 PERL VERSION This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years. Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. =head1 AUTHORS =over 4 =item * Jerome Quelin =item * Ricardo Signes =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 by Jerome Quelin. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut