Module-Faker-0.025/000755 000765 000024 00000000000 14423147746 014112 5ustar00rjbsstaff000000 000000 Module-Faker-0.025/LICENSE000644 000765 000024 00000043656 14423147746 015135 0ustar00rjbsstaff000000 000000 This software is copyright (c) 2008 by Ricardo Signes. 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) 2008 by Ricardo Signes. 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) 2008 by Ricardo Signes. 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 Module-Faker-0.025/bin/000755 000765 000024 00000000000 14423147746 014662 5ustar00rjbsstaff000000 000000 Module-Faker-0.025/Changes000644 000765 000024 00000010302 14423147746 015401 0ustar00rjbsstaff000000 000000 Revision history for Module-Faker 0.025 2023-04-29 10:05:56+02:00 Europe/Paris - overhaul how styles work, rename them to layouts This is backward incompatible, but the existing code was basically never documented and, as far as I know, only used in the PAUSE test suite. 0.024 2023-04-28 11:48:37+02:00 Europe/Paris - add "class" and "role" style packages - allow "style" to be present in "provides" 0.023 2022-11-30 07:52:25-05:00 America/New_York - add some more Pod (thanks gregor herrmann and Debian!) - update dist metadata 0.022 2019-04-28 15:04:47+01:00 Europe/London - add meta_munger facility to allow creation of really weird metadata 0.021 2019-04-27 00:16:46+01:00 Europe/London - add Dist->from_struct, for making faked dists on the fly - support multiple "styles" for packages, like "block" for "package PackageName 1.2 { ... }" - populate the "file" entry in provides by using the package name, when it's left blank in the dist source - replace use of auto_deref with Moose native traits - added the "more_metadata" property on Dists, which gets merged into the generated META file - Dist now has include_provides_in_meta, defaulting false, controlling whether "provides" are put into META files. It's false to help act more like real life, where provides is very rare. 0.020 2018-04-22 21:59:37+02:00 Europe/Oslo - x_authority, provides, and prereqs will no longer be present in the META for built dists unless they're defined 0.019 2018-04-22 13:50:16+02:00 Europe/Oslo - lower version required to v5.14, for PAUSE 0.018 2018-04-22 12:02:52+02:00 Europe/Oslo - add a new tool, module-faker - allow source directory to be a single file instead 0.017 2014-09-01 08:57:25-04:00 America/New_York - fix a bug with dist-to-pkg name conversion (thanks, Randy Stauner) 0.016 2013-11-05 22:13:08 America/New_York - require a newer CPAN::Meta 0.015 2013-10-22 18:53:18 America/New_York [THIS MIGHT BREAK YOUR CODE] - Adds META.json and CPAN::META::Spec v2 support (thanks, David Golden!) If you were using ->provides to get objects, you should now use ->packages instead. 0.014 2013-04-29 08:00:05 America/New_York like 0.013, but with the promised change! 0.013 2013-04-29 07:58:54 America/New_York drop // use to continue to support 5.8.8 (thank Jeffrey Ryan Thalhammer for this one!) 0.012 2012-10-22 17:38:27 America/New_York allow the mtime to be set via extra info (thanks, Moritz Onken!) 0.011 2012-09-05 09:11:21 America/New_York add a VERSION to ::Module, add abstracts 0.010 2012-09-03 21:38:01 America/New_York encode append content to UTF-8 before appending it (thanks, Randy Stauner!) 0.009 2011-04-25 10:57:47 America/New_York allow content to be appended to arbitrary files (thanks, Moritz Onken!) 0.008 2011-04-18 11:02:50 Europe/Amsterdam .dist files can be used to populate entirely from distnameinfo 0.007 2011-04-16 18:02:12 Europe/Amsterdam "Faker" key in meta files is now "X_Module_Faker" build fake dists from .json files, too 0.006 2008-04-08 if source meta has "requires" put them in PREREQ_PM in Makefile.PL (thanks, HDP, for bugfix) 0.005 2008-03-20 add (possibly to-be-renamed) Faker.order key to provides 0.004 2008-03-15 add omitted_files option (and test) add some documentation crank up the Moose prereq number to support ArrayRef[Foo] 0.003 2008-03-14 renamed from ExtUtils-FakeMaker; MSCHWERN notes that ExtUtils is basically a misunderstood and deprecated namespace 0.002 2008-03-13 support perl 5.8 apparently my employers want to be able to use this code that I wrote for work! ha! 0.001 2008-03-13 first revision, basically no documentation or tests, but hey! at least I got it out the door Module-Faker-0.025/MANIFEST000644 000765 000024 00000001433 14423147746 015244 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/module-faker dist.ini eg/Append-UTF8.json eg/Append.yml eg/Lacks-META.json eg/Mostly-Auto.yml eg/Provides-Inner-Sorted.yml eg/Provides-Inner.yml eg/RJBS-Dist.yml eg/RJBS_Another-Dist-1.24.tar.gz.dist eg/Simple-Prereq.yml eg/Stylish.yml eg/V2-Prereq.yml lib/Module/Faker.pm lib/Module/Faker/Appendix.pm lib/Module/Faker/Dist.pm lib/Module/Faker/File.pm lib/Module/Faker/Heavy.pm lib/Module/Faker/Module.pm lib/Module/Faker/Package.pm t/00-report-prereqs.dd t/00-report-prereqs.t t/append-utf8.t t/append.t t/basic.t t/makefile-pl.t t/meta-files.t t/omit-file.t t/provide-order.t t/requires.t xt/author/pod-syntax.t xt/release/changes_has_content.t Module-Faker-0.025/t/000755 000765 000024 00000000000 14423147746 014355 5ustar00rjbsstaff000000 000000 Module-Faker-0.025/xt/000755 000765 000024 00000000000 14423147746 014545 5ustar00rjbsstaff000000 000000 Module-Faker-0.025/README000644 000765 000024 00000000567 14423147746 015002 0ustar00rjbsstaff000000 000000 This archive contains the distribution Module-Faker, version 0.025: build fake dists for testing CPAN tools This software is copyright (c) 2008 by Ricardo Signes. 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. Module-Faker-0.025/META.yml000644 000765 000024 00000030760 14423147746 015371 0ustar00rjbsstaff000000 000000 --- abstract: 'build fake dists for testing CPAN tools' author: - 'Ricardo Signes ' build_requires: Cwd: '0' ExtUtils::MakeMaker: '0' File::Spec: '0' JSON::PP: '0' Path::Class: '0.06' Test::More: '0.96' 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: Module-Faker requires: Archive::Any::Create: '0' CPAN::DistnameInfo: '0' CPAN::Meta: '2.130880' CPAN::Meta::Converter: '0' CPAN::Meta::Merge: '0' CPAN::Meta::Requirements: '0' Carp: '0' Data::OptList: '0' Encode: '0' File::Next: '0' File::Path: '0' File::Temp: '0' Getopt::Long::Descriptive: '0' Moose: '0.33' Moose::Role: '0' Moose::Util::TypeConstraints: '0' Parse::CPAN::Meta: '1.4401' Path::Class: '0.06' Storable: '0' Text::Template: '0' perl: v5.14.0 strict: '0' warnings: '0' resources: bugtracker: https://github.com/rjbs/Module-Faker/issues homepage: https://github.com/rjbs/Module-Faker repository: https://github.com/rjbs/Module-Faker.git version: '0.025' 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: '0.025' 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: - 'Colin Newell ' - 'David Golden ' - 'David Steinbrunner ' - 'gregor herrmann ' - 'Jeffrey Ryan Thalhammer ' - 'Mohammad S Anwar ' - 'Moritz Onken ' - 'Randy Stauner ' - 'Ricardo Signes ' - 'Ricardo Signes ' x_generated_by_perl: v5.37.10 x_rjbs_perl_window: standard x_serialization_backend: 'YAML::Tiny version 1.73' x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later' Module-Faker-0.025/lib/000755 000765 000024 00000000000 14423147746 014660 5ustar00rjbsstaff000000 000000 Module-Faker-0.025/Makefile.PL000644 000765 000024 00000004625 14423147746 016073 0ustar00rjbsstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.030. use strict; use warnings; use 5.014000; use ExtUtils::MakeMaker 6.78; my %WriteMakefileArgs = ( "ABSTRACT" => "build fake dists for testing CPAN tools", "AUTHOR" => "Ricardo Signes ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => "6.78" }, "DISTNAME" => "Module-Faker", "EXE_FILES" => [ "bin/module-faker" ], "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.014000", "NAME" => "Module::Faker", "PREREQ_PM" => { "Archive::Any::Create" => 0, "CPAN::DistnameInfo" => 0, "CPAN::Meta" => "2.130880", "CPAN::Meta::Converter" => 0, "CPAN::Meta::Merge" => 0, "CPAN::Meta::Requirements" => 0, "Carp" => 0, "Data::OptList" => 0, "Encode" => 0, "File::Next" => 0, "File::Path" => 0, "File::Temp" => 0, "Getopt::Long::Descriptive" => 0, "Moose" => "0.33", "Moose::Role" => 0, "Moose::Util::TypeConstraints" => 0, "Parse::CPAN::Meta" => "1.4401", "Path::Class" => "0.06", "Storable" => 0, "Text::Template" => 0, "strict" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "Cwd" => 0, "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "JSON::PP" => 0, "Path::Class" => "0.06", "Test::More" => "0.96" }, "VERSION" => "0.025", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Archive::Any::Create" => 0, "CPAN::DistnameInfo" => 0, "CPAN::Meta" => "2.130880", "CPAN::Meta::Converter" => 0, "CPAN::Meta::Merge" => 0, "CPAN::Meta::Requirements" => 0, "Carp" => 0, "Cwd" => 0, "Data::OptList" => 0, "Encode" => 0, "ExtUtils::MakeMaker" => 0, "File::Next" => 0, "File::Path" => 0, "File::Spec" => 0, "File::Temp" => 0, "Getopt::Long::Descriptive" => 0, "JSON::PP" => 0, "Moose" => "0.33", "Moose::Role" => 0, "Moose::Util::TypeConstraints" => 0, "Parse::CPAN::Meta" => "1.4401", "Path::Class" => "0.06", "Storable" => 0, "Test::More" => "0.96", "Text::Template" => 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); Module-Faker-0.025/eg/000755 000765 000024 00000000000 14423147746 014505 5ustar00rjbsstaff000000 000000 Module-Faker-0.025/META.json000644 000765 000024 00000046605 14423147746 015546 0ustar00rjbsstaff000000 000000 { "abstract" : "build fake dists for testing CPAN tools", "author" : [ "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" : "Module-Faker", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.78" } }, "develop" : { "requires" : { "Test::More" : "0", "Test::Pod" : "1.41" } }, "runtime" : { "requires" : { "Archive::Any::Create" : "0", "CPAN::DistnameInfo" : "0", "CPAN::Meta" : "2.130880", "CPAN::Meta::Converter" : "0", "CPAN::Meta::Merge" : "0", "CPAN::Meta::Requirements" : "0", "Carp" : "0", "Data::OptList" : "0", "Encode" : "0", "File::Next" : "0", "File::Path" : "0", "File::Temp" : "0", "Getopt::Long::Descriptive" : "0", "Moose" : "0.33", "Moose::Role" : "0", "Moose::Util::TypeConstraints" : "0", "Parse::CPAN::Meta" : "1.4401", "Path::Class" : "0.06", "Storable" : "0", "Text::Template" : "0", "perl" : "v5.14.0", "strict" : "0", "warnings" : "0" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "Cwd" : "0", "ExtUtils::MakeMaker" : "0", "File::Spec" : "0", "JSON::PP" : "0", "Path::Class" : "0.06", "Test::More" : "0.96" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/rjbs/Module-Faker/issues" }, "homepage" : "https://github.com/rjbs/Module-Faker", "repository" : { "type" : "git", "url" : "https://github.com/rjbs/Module-Faker.git", "web" : "https://github.com/rjbs/Module-Faker" } }, "version" : "0.025", "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" : "0.025", "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" : [ "Colin Newell ", "David Golden ", "David Steinbrunner ", "gregor herrmann ", "Jeffrey Ryan Thalhammer ", "Mohammad S Anwar ", "Moritz Onken ", "Randy Stauner ", "Ricardo Signes ", "Ricardo Signes " ], "x_generated_by_perl" : "v5.37.10", "x_rjbs_perl_window" : "standard", "x_serialization_backend" : "Cpanel::JSON::XS version 4.36", "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later" } Module-Faker-0.025/dist.ini000644 000765 000024 00000000263 14423147746 015557 0ustar00rjbsstaff000000 000000 name = Module-Faker author = Ricardo Signes license = Perl_5 copyright_holder = Ricardo Signes copyright_year = 2008 [@RJBS] perl-window = standard Module-Faker-0.025/eg/RJBS-Dist.yml000644 000765 000024 00000000145 14423147746 016671 0ustar00rjbsstaff000000 000000 --- #YAML:1.0 name: Email-Infinite abstract: please make it stop X_Module_Faker: cpan_author: RJBS Module-Faker-0.025/eg/Provides-Inner.yml000644 000765 000024 00000000420 14423147746 020070 0ustar00rjbsstaff000000 000000 --- #YAML:1.0 name: Provides-Inner abstract: nothing to see here provides: Provides::Inner: file: lib/Provides/Inner.pm version: 0.001 Provides::Inner::Util: file: lib/Provides/Inner.pm version: 0.867 Provides::Outer: file: lib/Provides/Outer.pm Module-Faker-0.025/eg/Append.yml000644 000765 000024 00000000634 14423147746 016442 0ustar00rjbsstaff000000 000000 --- #YAML:1.0 name: Append abstract: nothing to see here provides: Provides::Inner: file: lib/Provides/Inner.pm version: 0.001 Provides::Inner::Util: file: lib/Provides/Inner.pm X_Module_Faker: append: - file: lib/Provides/Inner.pm content: "\n=head1 NAME\n\nAppend - here I am" - file: t/foo.t content: | use Test::More; - file: t/foo.t content: "ok(1);" Module-Faker-0.025/eg/V2-Prereq.yml000644 000765 000024 00000000326 14423147746 016754 0ustar00rjbsstaff000000 000000 --- #YAML:1.0 name: V2-Prereq abstract: we have needs prereqs: runtime: requires: Mostly::Auto: 1.00 Provides::Inner: ~ test: requires: Some::Other: 2.00 Module-Faker-0.025/eg/Provides-Inner-Sorted.yml000644 000765 000024 00000001166 14423147746 021336 0ustar00rjbsstaff000000 000000 --- #YAML:1.0 name: Provides-Inner-Sorted abstract: test the Faker/sorted attribute in provides version: 0.001 provides: Provides::Inner::Sorted::Charlie: file: lib/Provides/Inner/Sorted.pm version: 0.008 X_Module_Faker: order: 2 Provides::Inner::Sorted::Alfa: file: lib/Provides/Inner/Sorted.pm version: 0.001 X_Module_Faker: order: 1 Provides::Inner::Sorted::Bravo: file: lib/Provides/Inner/Sorted.pm version: 0.002 X_Module_Faker: order: 4 Provides::Inner::Sorted::Delta: file: lib/Provides/Inner/Sorted.pm version: 0.001 X_Module_Faker: order: 3 Module-Faker-0.025/eg/Simple-Prereq.yml000644 000765 000024 00000000202 14423147746 017707 0ustar00rjbsstaff000000 000000 --- #YAML:1.0 name: Simple-Prereq abstract: we have needs requires: Mostly::Auto: 1.00 Provides::Inner: ~ Some::Other: 2.00 Module-Faker-0.025/eg/Stylish.yml000644 000765 000024 00000000453 14423147746 016671 0ustar00rjbsstaff000000 000000 --- #YAML:1.0 name: Stylish abstract: look at all these styles provides: Stylish::Legacy: version: 0.001 style: legacy Stylish::Statement: version: 0.001 style: statement Stylish::Block: version: 0.001 style: block Stylish::Class: version: 0.001 style: class Module-Faker-0.025/eg/RJBS_Another-Dist-1.24.tar.gz.dist000644 000765 000024 00000000000 14423147746 022267 0ustar00rjbsstaff000000 000000 Module-Faker-0.025/eg/Lacks-META.json000644 000765 000024 00000000206 14423147746 017157 0ustar00rjbsstaff000000 000000 { "name": "Lacks-META", "abstract": "this dist has no META.yaml", "X_Module_Faker": { "omitted_files": [ "META.yml" ] } } Module-Faker-0.025/eg/Append-UTF8.json000644 000765 000024 00000000533 14423147746 017334 0ustar00rjbsstaff000000 000000 { "name": "Append-UTF8", "abstract": "Append a file with utf8 chars", "X_Module_Faker": { "append": [ { "file": "lib/Append/UTF8.pm", "content": "\n\n=head1 NAME\n\nAppend::UTF8 - abstract" }, { "file": "Changes", "content": "2012-01-01 0.01 First release - codename 'M\u00FCnchen'\n" } ] } } Module-Faker-0.025/eg/Mostly-Auto.yml000644 000765 000024 00000000111 14423147746 017416 0ustar00rjbsstaff000000 000000 --- #YAML:1.0 name: Mostly-Auto abstract: nothing to see here mtime: 100 Module-Faker-0.025/lib/Module/000755 000765 000024 00000000000 14423147746 016105 5ustar00rjbsstaff000000 000000 Module-Faker-0.025/lib/Module/Faker/000755 000765 000024 00000000000 14423147746 017135 5ustar00rjbsstaff000000 000000 Module-Faker-0.025/lib/Module/Faker.pm000644 000765 000024 00000022002 14423147746 017467 0ustar00rjbsstaff000000 000000 package Module::Faker 0.025; # ABSTRACT: build fake dists for testing CPAN tools use 5.008; use Moose 0.33; use Module::Faker::Dist; use File::Next (); #pod =head1 SYNOPSIS #pod #pod Module::Faker->make_fakes({ #pod source => './dir-of-specs', # ...or a single file #pod dest => './will-contain-tarballs', #pod }); #pod #pod =head2 DESCRIPTION #pod #pod Module::Faker is a tool for building fake CPAN modules and, perhaps more #pod importantly, fake CPAN distributions. These are useful for running tools that #pod operate against CPAN distributions without having to use real CPAN #pod distributions. This is much more useful when testing an entire CPAN instance, #pod rather than a single distribution, for which see L. #pod #pod =method make_fakes #pod #pod Module::Faker->make_fakes(\%arg); #pod #pod This method creates a new Module::Faker and builds archives in its destination #pod directory for every dist-describing file in its source directory. See the #pod L method below. #pod #pod =method new #pod #pod my $faker = Module::Faker->new(\%arg); #pod #pod This create the new Module::Faker. All arguments may be accessed later by #pod methods of the same name. Valid arguments are: #pod #pod source - the directory in which to find source files #pod dest - the directory in which to construct dist archives #pod #pod dist_class - the class used to fake dists; default: Module::Faker::Dist #pod #pod The source files are essentially a subset of CPAN::Meta files with some #pod optional extra features. All you really require are the name and #pod abstract. Other bits like requirements can be specified and will be passed #pod through. Out of the box the module will create the main module file based #pod on the module name and a single test file. You can either use the provides #pod section of the CPAN::META file or to specify their contents use the #pod X_Module_Faker append section. #pod #pod The X_Module_Faker also allows you to alter the cpan_author from the #pod default 'LOCAL ' which overrides whatever is in the #pod usual CPAN::Meta file. #pod #pod Here is an example yaml specification from the tests, #pod #pod name: Append #pod abstract: nothing to see here #pod provides: #pod Provides::Inner: #pod file: lib/Provides/Inner.pm #pod version: 0.001 #pod Provides::Inner::Util: #pod file: lib/Provides/Inner.pm #pod X_Module_Faker: #pod cpan_author: SOMEONE #pod append: #pod - file: lib/Provides/Inner.pm #pod content: "\n=head1 NAME\n\nAppend - here I am" #pod - file: t/foo.t #pod content: | #pod use Test::More; #pod - file: t/foo.t #pod content: "ok(1);" #pod #pod If you need to sort the packages within a file you #pod can use an X_Module_Faker:order parameter on the #pod provides class. #pod #pod provides: #pod Provides::Inner::Sorted::Charlie: #pod file: lib/Provides/Inner/Sorted.pm #pod version: 0.008 #pod X_Module_Faker: #pod order: 2 #pod Provides::Inner::Sorted::Alfa: #pod file: lib/Provides/Inner/Sorted.pm #pod version: 0.001 #pod X_Module_Faker: #pod order: 1 #pod #pod The supported keys from CPAN::Meta are, #pod #pod =over #pod #pod =item * abstract #pod #pod =item * license #pod #pod =item * name #pod #pod =item * release_status #pod #pod =item * version #pod #pod =item * provides #pod #pod =item * prereqs #pod #pod =item * x_authority #pod #pod =back #pod #pod =cut has source => (is => 'ro', required => 1); has dest => (is => 'ro', required => 1); has author_prefix => (is => 'ro', default => 0); has dist_class => ( is => 'ro', isa => 'Str', required => 1, default => sub { 'Module::Faker::Dist' }, ); sub BUILD { my ($self) = @_; for (qw(source dest)) { my $dir = $self->$_; Carp::croak "$_ directory does not exist" unless -e $dir; Carp::croak "$_ directory is not readable" unless -r $dir; } Carp::croak "$_ directory is not writeable" unless -w $self->dest; } sub make_fakes { my ($class, $arg) = @_; my $self = ref $class ? $class : $class->new($arg); my $iter = File::Next::files($self->source); while (my $file = $iter->()) { my $dist = $self->dist_class->from_file($file); $dist->make_archive({ dir => $self->dest, author_prefix => $self->author_prefix, }); } } no Moose; 1; __END__ =pod =encoding UTF-8 =head1 NAME Module::Faker - build fake dists for testing CPAN tools =head1 VERSION version 0.025 =head1 SYNOPSIS Module::Faker->make_fakes({ source => './dir-of-specs', # ...or a single file dest => './will-contain-tarballs', }); =head2 DESCRIPTION Module::Faker is a tool for building fake CPAN modules and, perhaps more importantly, fake CPAN distributions. These are useful for running tools that operate against CPAN distributions without having to use real CPAN distributions. This is much more useful when testing an entire CPAN instance, rather than a single distribution, for which see L. =head1 PERL VERSION This module should work on any version of perl still receiving updates from the Perl 5 Porters. This means it should work on any version of perl released in the last two to three years. (That is, if the most recently released version is v5.40, then this module should work on both v5.40 and v5.38.) 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 make_fakes Module::Faker->make_fakes(\%arg); This method creates a new Module::Faker and builds archives in its destination directory for every dist-describing file in its source directory. See the L method below. =head2 new my $faker = Module::Faker->new(\%arg); This create the new Module::Faker. All arguments may be accessed later by methods of the same name. Valid arguments are: source - the directory in which to find source files dest - the directory in which to construct dist archives dist_class - the class used to fake dists; default: Module::Faker::Dist The source files are essentially a subset of CPAN::Meta files with some optional extra features. All you really require are the name and abstract. Other bits like requirements can be specified and will be passed through. Out of the box the module will create the main module file based on the module name and a single test file. You can either use the provides section of the CPAN::META file or to specify their contents use the X_Module_Faker append section. The X_Module_Faker also allows you to alter the cpan_author from the default 'LOCAL ' which overrides whatever is in the usual CPAN::Meta file. Here is an example yaml specification from the tests, name: Append abstract: nothing to see here provides: Provides::Inner: file: lib/Provides/Inner.pm version: 0.001 Provides::Inner::Util: file: lib/Provides/Inner.pm X_Module_Faker: cpan_author: SOMEONE append: - file: lib/Provides/Inner.pm content: "\n=head1 NAME\n\nAppend - here I am" - file: t/foo.t content: | use Test::More; - file: t/foo.t content: "ok(1);" If you need to sort the packages within a file you can use an X_Module_Faker:order parameter on the provides class. provides: Provides::Inner::Sorted::Charlie: file: lib/Provides/Inner/Sorted.pm version: 0.008 X_Module_Faker: order: 2 Provides::Inner::Sorted::Alfa: file: lib/Provides/Inner/Sorted.pm version: 0.001 X_Module_Faker: order: 1 The supported keys from CPAN::Meta are, =over =item * abstract =item * license =item * name =item * release_status =item * version =item * provides =item * prereqs =item * x_authority =back =head1 AUTHOR Ricardo Signes =head1 CONTRIBUTORS =for stopwords Colin Newell David Golden Steinbrunner gregor herrmann Jeffrey Ryan Thalhammer Mohammad S Anwar Moritz Onken Randy Stauner Ricardo Signes =over 4 =item * Colin Newell =item * David Golden =item * David Steinbrunner =item * gregor herrmann =item * Jeffrey Ryan Thalhammer =item * Mohammad S Anwar =item * Moritz Onken =item * Randy Stauner =item * Ricardo Signes =item * Ricardo Signes =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2008 by Ricardo Signes. 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 Module-Faker-0.025/lib/Module/Faker/Package.pm000644 000765 000024 00000010463 14423147746 021032 0ustar00rjbsstaff000000 000000 package Module::Faker::Package 0.025; # ABSTRACT: a faked package in a faked module use Moose; use Moose::Util::TypeConstraints; has name => (is => 'ro', isa => 'Str', required => 1); has version => (is => 'ro', isa => 'Maybe[Str]'); has abstract => (is => 'ro', isa => 'Maybe[Str]'); has in_file => ( is => 'ro', isa => 'Str', lazy => 1, default => sub { my ($self) = @_; my $name = $self->name; $name =~ s{::}{/}g; return "lib/$name"; }, ); # PKGWORD = package | class | role # VERSION = our | our-literal | inline # STYLE = statement | block # # STYLE VERSION # PW N; our $V = '...'; statement our # PW N; our $V = ... ; statement our-literal # PW N V; statement inline # PW N { our $V = '...' } block our # PW N { our $V = ... } block our-literal # PW N V { ... } block inline has layout => ( reader => '_layout', default => sub { return { pkgword => 'package', version => 'our', style => 'statement' }; }, ); my %STYLE_TEMPLATE = ( 'statement_our' => [ "PKGWORD PKGNAME;\nour \$VERSION = 'VERSIONSTR';", "PKGWORD PKGNAME;", ], 'statement_our-literal' => [ "PKGWORD PKGNAME;\nour \$VERSION = VERSIONSTR;", "PKGWORD PKGNAME;", ], 'statement_inline' => [ "PKGWORD PKGNAME VERSIONSTR;", "PKGWORD PKGNAME;", ], 'block_our' => [ "PKGWORD PKGNAME {\n our \$VERSION = 'VERSIONSTR';\n # code!\n}", "PKGWORD PKGNAME {\n #code!\n}", ], 'block_our-literal' => [ "PKGWORD PKGNAME {\n our \$VERSION = VERSIONSTR;\n # code!\n}", "PKGWORD PKGNAME {\n #code!\n}", ], 'block_inline' => [ "PKGWORD PKGNAME VERSIONSTR {\n # code!\n}", "PKGWORD PKGNAME {\n #code!\n}", ], ); my %KNOWN_KEY = map {; $_ => 1 } qw(pkgword version style); my %KNOWN_PKGWORD = map {; $_ => 1 } qw(package class role); sub as_string { my ($self) = @_; my $layout = $self->_layout; my (@unknown) = grep {; ! $KNOWN_KEY{$_} } keys %$layout; if (@unknown) { Carp::confess("Unknown entries in package layout: @unknown"); } my $layout_pkgword = $layout->{pkgword} // 'package'; my $layout_version = $layout->{version} // 'our'; my $layout_style = $layout->{style} // 'statement'; unless ($KNOWN_PKGWORD{$layout_pkgword}) { Carp::confess("Invalid value for package layout's pkgword"); } my $version = $self->version; my $name = $self->name; my $key = join q{_}, $layout_style, $layout_version; my $template_pair = $STYLE_TEMPLATE{$key}; confess("Can't handle style/version combination in package layout") unless $template_pair; my $template = $template_pair->[ defined $version ? 0 : 1 ]; my $body = $template =~ s/PKGWORD/$layout_pkgword/r =~ s/PKGNAME/$name/r =~ s/VERSIONSTR/$version/r; return $body; } subtype 'Module::Faker::Type::Packages' => as 'ArrayRef[Module::Faker::Package]'; no Moose; 1; __END__ =pod =encoding UTF-8 =head1 NAME Module::Faker::Package - a faked package in a faked module =head1 VERSION version 0.025 =head1 PERL VERSION This module should work on any version of perl still receiving updates from the Perl 5 Porters. This means it should work on any version of perl released in the last two to three years. (That is, if the most recently released version is v5.40, then this module should work on both v5.40 and v5.38.) 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 AUTHOR Ricardo Signes =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2008 by Ricardo Signes. 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 Module-Faker-0.025/lib/Module/Faker/Appendix.pm000644 000765 000024 00000002435 14423147746 021247 0ustar00rjbsstaff000000 000000 package Module::Faker::Appendix 0.025; # ABSTRACT: a thing that appends use Moose::Role; has append => ( is => 'ro', isa => 'ArrayRef', default => sub {[]}, ); around as_string => sub { my ($orig, $self) = (shift, shift); my $string = $self->$orig(@_); $string .= join("\n", @{$self->append}); }; 1; __END__ =pod =encoding UTF-8 =head1 NAME Module::Faker::Appendix - a thing that appends =head1 VERSION version 0.025 =head1 PERL VERSION This module should work on any version of perl still receiving updates from the Perl 5 Porters. This means it should work on any version of perl released in the last two to three years. (That is, if the most recently released version is v5.40, then this module should work on both v5.40 and v5.38.) 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 AUTHOR Ricardo Signes =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2008 by Ricardo Signes. 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 Module-Faker-0.025/lib/Module/Faker/File.pm000644 000765 000024 00000002400 14423147746 020346 0ustar00rjbsstaff000000 000000 package Module::Faker::File 0.025; # ABSTRACT: a fake file in a fake dist use Moose; with 'Module::Faker::Appendix'; has filename => (is => 'ro', isa => 'Str', required => 1); has content => (is => 'ro', isa => 'Str', required => 1); sub as_string { shift->content } no Moose; 1; __END__ =pod =encoding UTF-8 =head1 NAME Module::Faker::File - a fake file in a fake dist =head1 VERSION version 0.025 =head1 PERL VERSION This module should work on any version of perl still receiving updates from the Perl 5 Porters. This means it should work on any version of perl released in the last two to three years. (That is, if the most recently released version is v5.40, then this module should work on both v5.40 and v5.38.) 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 AUTHOR Ricardo Signes =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2008 by Ricardo Signes. 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 Module-Faker-0.025/lib/Module/Faker/Heavy.pm000644 000765 000024 00000005657 14423147746 020564 0ustar00rjbsstaff000000 000000 use strict; use warnings; package Module::Faker::Heavy 0.025; # ABSTRACT: where the fake sausage gets made use Carp (); use Text::Template; my $template; sub _template { return $template if $template; my $current; while (my $line = ) { chomp $line; if ($line =~ /\A__([^_]+)__\z/) { my $filename = $1; if ($filename !~ /\A(?:DATA|END)\z/) { $current = $filename; next; } } Carp::confess "bogus data section: text outside of file" unless $current; ($template->{$current} ||= '') .= "$line\n"; } return $template; } sub _render { my ($self, $name, $stash) = @_; Carp::confess "no file template for $name" unless my $template = $self->_template->{ $name }; my $text = Text::Template->fill_this_in( $template, DELIMITERS => [ '{{', '}}' ], HASH => { map {; $_ => \($stash->{$_}) } keys %$stash }, ); return $text; } 1; =pod =encoding UTF-8 =head1 NAME Module::Faker::Heavy - where the fake sausage gets made =head1 VERSION version 0.025 =head1 PERL VERSION This module should work on any version of perl still receiving updates from the Perl 5 Porters. This means it should work on any version of perl released in the last two to three years. (That is, if the most recently released version is v5.40, then this module should work on both v5.40 and v5.38.) 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 AUTHOR Ricardo Signes =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2008 by Ricardo Signes. 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 __DATA__ __META.yml__ --- name: {{ $dist->name }} version: {{ $dist->version }} abstract: {{ $dist->abstract }} author: {{ $OUT .= sprintf " - %s\n", $_ for $dist->authors; chomp $OUT; return }} generated_by: Module::Faker version {{ $Module::Faker::VERSION }} license: unknown{{ if (my %requires = $dist->requires) { $OUT .= "\nrequires:"; $OUT .= sprintf "\n %s: %s", $_, (defined $requires{$_} ? $requires{$_} : '~') for keys %requires; chomp $OUT; } return; }} meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.3.html version: 1.3 __Makefile.PL__ use ExtUtils::MakeMaker; WriteMakefile( DISTNAME => "{{ $dist->name }}", NAME => "{{ $dist->_pkgy_name }}", VERSION => "{{ $dist->version }}", ABSTRACT => '{{ my $abs = $dist->abstract; $abs =~ s/'/\'/g; $abs }}', PREREQ_PM => { {{ if (my %requires = $dist->_flat_prereqs ) { $OUT .= sprintf "\n '%s' => '%s',", $_, (defined $requires{$_} ? $requires{$_} : 0) for sort keys %requires; } return; }} }, ); __t/00-nop.t__ #!perl use Test::More tests => 1; ok(1); Module-Faker-0.025/lib/Module/Faker/Module.pm000644 000765 000024 00000003211 14423147746 020715 0ustar00rjbsstaff000000 000000 package Module::Faker::Module 0.025; # ABSTRACT: a faked module use Moose; with 'Module::Faker::Appendix'; use Module::Faker::Package; has filename => ( is => 'ro', isa => 'Str', required => 1, ); has packages => ( is => 'ro', isa => 'ArrayRef[Module::Faker::Package]', required => 1, auto_deref => 1, ); sub as_string { my ($self) = @_; my $string = ''; my @packages = $self->packages; for ($packages[0]) { $string .= sprintf "\n=head1 NAME\n\n%s - %s\n\n=cut\n\n", $_->name, $_->abstract // 'a cool package'; } for my $pkg ($self->packages) { $string .= $pkg->as_string . "\n"; } $string .= "1\n"; } no Moose; 1; __END__ =pod =encoding UTF-8 =head1 NAME Module::Faker::Module - a faked module =head1 VERSION version 0.025 =head1 PERL VERSION This module should work on any version of perl still receiving updates from the Perl 5 Porters. This means it should work on any version of perl released in the last two to three years. (That is, if the most recently released version is v5.40, then this module should work on both v5.40 and v5.38.) 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 AUTHOR Ricardo Signes =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2008 by Ricardo Signes. 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 Module-Faker-0.025/lib/Module/Faker/Dist.pm000644 000765 000024 00000067265 14423147746 020416 0ustar00rjbsstaff000000 000000 package Module::Faker::Dist 0.025; # ABSTRACT: a fake CPAN distribution use Moose; use Module::Faker::File; use Module::Faker::Heavy; use Module::Faker::Package; use Module::Faker::Module; use Archive::Any::Create; use CPAN::DistnameInfo; use CPAN::Meta 2.130880; # github issue #9 use CPAN::Meta::Converter; use CPAN::Meta::Merge; use CPAN::Meta::Requirements; use Data::OptList (); use Encode qw( encode_utf8 ); use File::Temp (); use File::Path (); use Parse::CPAN::Meta 1.4401; use Path::Class; use Storable qw(dclone); #pod =head1 SYNOPSIS #pod #pod Building one dist at a time makes plenty of sense, so Module::Faker::Dist makes #pod it easy. Building dists from definitions in files is also useful for doing #pod things in bulk (see L), so there are a bunch of ways to build #pod dists from a definition in a file. #pod #pod # Build from a META.yml or META.json file, or the delightful #pod # AUTHOR_Foo-Bar-1.234.tar.gz.dist file, which can be zero bytes and gets #pod # all the relevant data from the filename. #pod my $dist = Module::Faker::Dist->from_file($filename); #pod #pod META files can contain a key called X_Module_Faker that contains attributes to #pod use in constructing the dist. C files can contain anything you want, but #pod the contents won't do a thing. #pod #pod You can use the C method on Module::Faker::Dist, of course, but it's a bit #pod of a pain. You might, instead, want to use C, which is very close #pod to C, but with more sugar. #pod #pod =cut #pod =attr name #pod #pod This is the name of the dist. It will usually look like C. #pod #pod =attr version #pod #pod This is the version of the dist, usually some kind of versiony string like #pod C<1.234> or maybe C<1.2.3>. #pod #pod =attr abstract #pod #pod The abstract! This is a short, pithy description of the distribution, usually #pod less than a sentence. #pod #pod =attr release_status #pod #pod This is the dist's release status. (See L.) It defaults to #pod C but C and C are valid values. #pod #pod =cut my $DEFAULT_VERSION; # required by CPAN::Meta::Spec has name => (is => 'ro', isa => 'Str', required => $DEFAULT_VERSION); has version => (is => 'ro', isa => 'Maybe[Str]', default => '0.01'); has abstract => (is => 'ro', isa => 'Str', default => 'a great new dist'); has release_status => (is => 'ro', isa => 'Str', default => 'stable'); #pod =attr cpan_author #pod #pod This is the PAUSE id of the author, like C. #pod #pod =attr archive_ext #pod #pod This is the extension of the archive to build, when you build an archive. This #pod defaults to C. C should work, but right now it doesn't. So #pod probably stuck to C. It would be cool to support more attributes in #pod the future. #pod #pod =attr append #pod #pod This is an arrayref of hashrefs, each of which looks like: #pod #pod { file => $filename, content => $character_string } #pod #pod The content will be UTF-8 encoded and put into a file with the given name. #pod #pod This feature is a bit weird. Maybe it will go away eventually. #pod #pod =attr mtime #pod #pod If given, this is the epoch seconds to which to set the mtime of the generated #pod file. This is useful in rare occasions. #pod #pod =cut # Module::Faker options has cpan_author => (is => 'ro', isa => 'Maybe[Str]', default => 'LOCAL'); has archive_ext => (is => 'ro', isa => 'Str', default => 'tar.gz'); has append => (is => 'ro', isa => 'ArrayRef[HashRef]', default => sub {[]}); has mtime => (is => 'ro', isa => 'Int', predicate => 'has_mtime'); #pod =attr x_authority #pod #pod This is the C header that gets put into the META files. #pod #pod =cut has x_authority => (is => 'ro', isa => 'Str'); #pod =attr license #pod #pod This is the meta spec license string for the distribution. It defaults to #pod C. #pod #pod =cut has license => ( is => 'ro', isa => 'ArrayRef[Str]', default => sub { [ 'perl_5' ] }, ); #pod =attr authors #pod #pod This is an array of strings who are used as the authors in the dist metadata. #pod The default is: #pod #pod [ "AUTHOR " ] #pod #pod ...where C is the C of the dist. #pod #pod =cut has authors => ( isa => 'ArrayRef[Str]', lazy => 1, traits => [ 'Array' ], handles => { authors => 'elements' }, default => sub { my ($self) = @_; return [ sprintf '%s <%s@cpan.local>', ($self->cpan_author) x 2 ]; }, ); #pod =attr include_provides_in_meta #pod #pod This is a bool. If true, the produced META files will include a C #pod key based on the packages in the dist. It defaults to false, to match the #pod most common behavior of dists in the wild. #pod #pod =cut has include_provides_in_meta => ( is => 'ro', isa => 'Bool', default => 0, ); #pod =attr provides #pod #pod This is a hashref that gets used as the C in the metadata. #pod #pod If no provided, it is built from the C provided in construction. #pod #pod If no packages were provided, for a dist named Foo-Bar, it defaults to: #pod #pod { 'Foo::Bar' => { version => $DIST_VERSION, file => "lib/Foo/Bar.pm" } } #pod #pod =cut has provides => ( is => 'ro', isa => 'HashRef', lazy_build => 1, ); sub _build_provides { my ($self) = @_; if ($self->has_packages) { return { map {; $_->name => { file => $_->in_file, (defined $_->version ? (version => $_->version) : ()), } } $self->packages } } my $pkg = __dist_to_pkg($self->name); return { $pkg => { version => $self->version, file => __pkg_to_file($pkg), } }; }; sub __dor { defined $_[0] ? $_[0] : $_[1] } sub append_for { my ($self, $filename) = @_; return [ # YAML and JSON should both be in utf8 (if not plain ascii) map { encode_utf8($_->{content}) } grep { $filename eq $_->{file} } @{ $self->append } ]; } #pod =attr archive_basename #pod #pod If written to disk, the archive will be written to... #pod #pod $dist->archive_basename . '.' . $dist->archive_ext #pod #pod The default is: #pod #pod $dist->name . '.' . ($dist->version // 'undef') #pod #pod =cut has archive_basename => ( is => 'ro', isa => 'Str', lazy => 1, default => sub { my ($self) = @_; return sprintf '%s-%s', $self->name, __dor($self->version, 'undef'); }, ); #pod =attr omitted_files #pod #pod If given, this is an arrayref of filenames that shouldn't be automatically #pod generated and included. #pod #pod =cut has omitted_files => ( isa => 'ArrayRef[Str]', traits => [ 'Array' ], handles => { omitted_files => 'elements' }, lazy => 1, default => sub { [] }, ); sub __dist_to_pkg { my $str = shift; $str =~ s/-/::/g; return $str; } sub __pkg_to_file { my $str = shift; $str =~ s{::}{/}g; return "lib/$str.pm"; } # This is stupid, but copes with MakeMaker wanting to have a module name as its # NAME parameter. Ugh! -- rjbs, 2008-03-13 sub _pkgy_name { my $name = shift->name; $name =~ s/-/::/g; return $name; } #pod =attr packages #pod #pod This is an array of L objects. It's built by #pod C if needed, but you might want to look at using the #pod C> method to set it up. #pod #pod =cut has packages => ( isa => 'Module::Faker::Type::Packages', lazy => 1, builder => '_build_packages', traits => [ 'Array' ], handles => { packages => 'elements' }, predicate => 'has_packages', ); sub _build_packages { my ($self) = @_; my $provides = $self->provides; # do this dance so we don't autovivify X_Module_Faker in provides my %package_order = map {; $_ => (exists $provides->{$_}{X_Module_Faker} ? $provides->{$_}{X_Module_Faker}{order} : 0 ) } keys %$provides; my @pkg_names = do { no warnings 'uninitialized'; sort { $package_order{$a} <=> $package_order{$b} } keys %package_order; }; my @packages; for my $name (@pkg_names) { push @packages, Module::Faker::Package->new({ name => $name, version => $provides->{$name}{version}, in_file => $provides->{$name}{file}, ($provides->{$name}{style} ? (style => $provides->{$name}{style}) : ()), }); } return \@packages; } #pod =method modules #pod #pod This produces and returns a list of L objects, #pod representing modules. Modules, if you're not as steeped in CPAN toolchain #pod nonsense, are the C<.pm> files in which packages are defined. #pod #pod These are produced by combining the packages from C> into files #pod based on their C attributes. #pod #pod =cut sub modules { my ($self) = @_; my %module; for my $pkg ($self->packages) { my $filename = $pkg->in_file; push @{ $module{ $filename } ||= [] }, $pkg; } my @modules = map { Module::Faker::Module->new({ packages => $module{$_}, filename => $_, append => $self->append_for($_) }); } keys %module; return @modules; } sub _mk_container_path { my ($self, $filename) = @_; my (@parts) = File::Spec->splitdir($filename); my $leaf_filename = pop @parts; File::Path::mkpath(File::Spec->catdir(@parts)); } #pod =method C #pod #pod my $directory_name = $dist->make_dist_dir(\%arg); #pod #pod This returns the name of a directory into which the dist's contents have been #pod written. If a C argument is provided, the dist will be written to a #pod directory beneath that dir. Otherwise, it will be written below a temporary #pod directory. #pod #pod =cut sub make_dist_dir { my ($self, $arg) = @_; $arg ||= {}; my $dir = $arg->{dir} || File::Temp::tempdir; my $dist_dir = File::Spec->catdir($dir, $self->archive_basename); for my $file ($self->files) { my $fqfn = File::Spec->catfile($dist_dir, $file->filename); $self->_mk_container_path($fqfn); open my $fh, '>', $fqfn or die "couldn't open $fqfn for writing: $!"; print $fh $file->as_string; close $fh or die "error when closing $fqfn: $!"; } return $dist_dir; } sub _author_dir_infix { my ($self) = @_; Carp::croak "can't put archive in author dir with no author defined" unless my $pauseid = $self->cpan_author; # Sorta like pow- pow- power-wheels! -- rjbs, 2008-03-14 my ($pa, $p) = $pauseid =~ /^((.).)/; return ($p, $pa, $pauseid); } sub archive_filename { my ($self, $arg) = @_; my $base = $self->archive_basename; my $ext = $self->archive_ext; return File::Spec->catfile( ($arg->{author_prefix} ? $self->_author_dir_infix : ()), "$base.$ext", ); } #pod =method make_archive #pod #pod my $archive_filename = $dist->make_archive(\%arg); #pod #pod This writes the dist archive file, like a tarball or zip file. If a C #pod argument is given, it will be written in that directory. Otherwise, it will be #pod written to a temporary directory. If the C argument is given #pod and true, it will be written under a hashed author dir, like: #pod #pod U/US/USERID/Foo-Bar-1.23.tar.gz #pod #pod =cut sub make_archive { my ($self, $arg) = @_; $arg ||= {}; my $dir = $arg->{dir} || File::Temp::tempdir; my $archive = Archive::Any::Create->new; my $container = $self->archive_basename; $archive->container($container); for my $file ($self->files) { $archive->add_file($file->filename, $file->as_string); } my $archive_filename = File::Spec->catfile( $dir, $self->archive_filename({ author_prefix => $arg->{author_prefix} }) ); $self->_mk_container_path($archive_filename); $archive->write_file($archive_filename); utime time, $self->mtime, $archive_filename if $self->has_mtime; return $archive_filename; } sub files { my ($self) = @_; my @files = ($self->modules, $self->_extras, $self->_manifest_file); for my $file (@{$self->append}) { next if grep { $_->filename eq $file->{file} } @files; push(@files, $self->_file_class->new( filename => $file->{file}, content => '', append => $self->append_for($file->{file}), ) ); } return @files; } sub _file_class { 'Module::Faker::File' } around BUILDARGS => sub { my ($orig, $self, @rest) = @_; my $arg = $self->$orig(@rest); confess "can't supply both requires and prereqs" if $arg->{prereqs} && $arg->{requires}; if ($arg->{requires}) { $arg->{prereqs} = { runtime => { requires => delete $arg->{requires} } }; } return $arg; }; sub BUILD { my ($self) = @_; my $provides = $self->provides; $provides->{$_}{file} //= __pkg_to_file($_) for keys %$provides; } has prereqs => ( is => 'ro', isa => 'HashRef', default => sub { {} }, ); has _manifest_file => ( is => 'ro', isa => 'Module::Faker::File', lazy => 1, default => sub { my ($self) = @_; my @files = ($self->modules, $self->_extras); return $self->_file_class->new({ filename => 'MANIFEST', content => join("\n", 'MANIFEST', map { $_->filename } @files ), }); }, ); #pod =attr more_metadata #pod #pod This can be given as a hashref of data to merge into the CPAN::Meta files. #pod #pod =cut has more_metadata => ( is => 'ro', isa => 'HashRef', predicate => 'has_more_metadata', ); #pod =attr meta_munger #pod #pod If given, this is a coderef that's called just before the CPAN::Meta data for #pod the dist is written to disk, an can be used to change things, especially into #pod invalid data. It is expected to return the new content to serialize. #pod #pod It's called like this: #pod #pod $coderef->($struct, { format => $format, version => $version }); #pod #pod ...where C<$struct> is the result of C<< $cpan_meta->as_struct >>. #pod C<$version> is the version number of the target metafile. Normally, both #pod version 1.4 and 2 are requested. C<$format> is either C or C. #pod #pod If the munger returns a string instead of a structure, it will be used as the #pod content of the file being written. This lets you put all kinds of nonsense in #pod those meta files. Have fun, go nuts! #pod #pod =cut has meta_munger => ( isa => 'CodeRef', predicate => 'has_meta_munger', traits => [ 'Code' ], handles => { munge_meta => 'execute' }, ); has _cpan_meta => ( is => 'ro', isa => 'CPAN::Meta', lazy_build => 1, ); sub _build__cpan_meta { my ($self) = @_; my $meta = { 'meta-spec' => { version => '2' }, dynamic_config => 0, author => [ $self->authors ], # plural attribute that derefs }; # required fields for my $key ( qw/abstract license name release_status version/ ) { $meta->{$key} = $self->$key; } # optional fields for my $key ( qw/prereqs x_authority/ ) { my $value = $self->$key; $meta->{$key} = $value if $value; } if ($self->provides && $self->include_provides_in_meta) { $meta->{provides} = $self->provides; } my $cpanmeta = CPAN::Meta->new( $meta, {lazy_validation => 1} ); return $cpanmeta unless $self->has_more_metadata; return CPAN::Meta->new( CPAN::Meta::Merge->new(default_version => 2)->merge( $cpanmeta, $self->more_metadata, ), { lazy_validation => 1 } ); } has _extras => ( isa => 'ArrayRef[Module::Faker::File]', lazy => 1, traits => [ 'Array' ], handles => { _extras => 'elements' }, default => sub { my ($self) = @_; my @files; for my $filename (qw(Makefile.PL t/00-nop.t)) { next if grep { $_ eq $filename } $self->omitted_files; push @files, $self->_file_class->new({ filename => $filename, content => Module::Faker::Heavy->_render( $filename, { dist => $self }, ), }); } unless ( grep { $_ eq 'META.json' } $self->omitted_files ) { push @files, $self->_file_class->new({ filename => 'META.json', content => $self->_meta_file_content(json => 2), }); } unless ( grep { $_ eq 'META.yml' } $self->omitted_files ) { push @files, $self->_file_class->new({ filename => 'META.yml', content => $self->_meta_file_content(yaml => 1.4), }); } return \@files; }, ); # This code is based on the code in CPAN::Meta v2.150010 # -- rjbs, 2019-04-28 sub _meta_file_content { my ($self, $format, $version) = @_; my $meta = $self->_cpan_meta; my $struct; if ($meta->meta_spec_version ne $version) { $struct = CPAN::Meta::Converter->new($meta->as_struct) ->convert(version => $version); } else { $struct = $meta->as_struct; } if ($self->has_meta_munger) { # Is that dclone() paranoia? Maybe. -- rjbs, 2019-04-28 $struct = $self->munge_meta( dclone($struct), { format => $format, version => $version }, ); return $struct unless ref $struct; } my ($data, $backend); if ($format eq 'json') { $backend = Parse::CPAN::Meta->json_backend(); local $struct->{x_serialization_backend} = sprintf '%s version %s', $backend, $backend->VERSION; $data = $backend->new->pretty->canonical->encode($struct); } elsif ($format eq 'yaml') { $backend = Parse::CPAN::Meta->yaml_backend(); local $struct->{x_serialization_backend} = sprintf '%s version %s', $backend, $backend->VERSION; $data = eval { no strict 'refs'; &{"$backend\::Dump"}($struct) }; if ( $@ ) { croak($backend->can('errstr') ? $backend->errstr : $@); } } else { confess "unknown meta format: $format" } return $data; } #pod =method from_file #pod #pod my $dist = Module::Faker::Dist->from_file($filename); #pod #pod Given a filename with dist configuration, this builds the dist described by the #pod file. #pod #pod Given a file ending in C or C or C, it's treated as a #pod CPAN::Meta file and interpreted as such. The key C can be #pod present to provide attributes that don't match data found in a meta file. #pod #pod Given a file ending in C, all the configuration comes from the filename, #pod which should look like this: #pod #pod AUTHOR_Dist-Name-1.234.tar.gz.dist #pod #pod =cut # TODO: make this a registry -- rjbs, 2008-03-12 my %HANDLER_FOR = ( yaml => '_from_meta_file', yml => '_from_meta_file', json => '_from_meta_file', dist => '_from_distnameinfo' ); sub from_file { my ($self, $filename) = @_; my ($ext) = $filename =~ /.*\.(.+?)\z/; Carp::croak "don't know how to handle file $filename" unless $ext and my $method = $HANDLER_FOR{$ext}; $self->$method($filename); } sub _from_distnameinfo { my ($self, $filename) = @_; $filename = file($filename)->basename; $filename =~ s/\.dist$//; my ($author, $path) = split /_/, $filename, 2; my $dni = CPAN::DistnameInfo->new($path); return $self->new({ name => $dni->dist, version => $dni->version, abstract => sprintf('the %s dist', $dni->dist), archive_ext => $dni->extension, cpan_author => $author, }); } sub _from_meta_file { my ($self, $filename) = @_; my $data = Parse::CPAN::Meta->load_file($filename); my $extra = (delete $data->{X_Module_Faker}) || {}; my $dist = $self->new({ %$data, %$extra }); } sub _flat_prereqs { my ($self) = @_; my $prereqs = $self->_cpan_meta->effective_prereqs; my $req = CPAN::Meta::Requirements->new; for my $phase ( qw/runtime build test/ ) { $req->add_requirements( $prereqs->requirements_for( $phase, 'requires' ) ); } return %{ $req->as_string_hash }; } #pod =method from_struct #pod #pod my $dist = Module::Faker::Dist->from_struct(\%arg); #pod #pod This is sugar over C, working like this: #pod #pod =for :list #pod * packages version defaults to the dist version unless specified #pod * packages for dist Foo-Bar defaults to Foo::Bar unless specified #pod * if specified, packages is an L #pod #pod =cut sub from_struct { my ($self, $arg) = @_; my $version = exists $arg->{version} ? $arg->{version} : $DEFAULT_VERSION; my $specs = Data::OptList::mkopt( ! exists $arg->{packages} ? [ __dist_to_pkg($arg->{name}) ] : ref $arg->{packages} ? $arg->{packages} : defined $arg->{packages} ? [ $arg->{packages} ] : () ); my @packages; for my $spec (@$specs) { my %spec = $spec->[1] ? %{ $spec->[1] } : (); push @packages, Module::Faker::Package->new({ name => $spec->[0], in_file => __pkg_to_file($spec->[0]), # to be overridden below if needed %spec, version => (exists $spec{version} ? $spec{version} : $version), }); } return $self->new({ %$arg, version => $version, packages => \@packages, }); } 1; # vim: ts=2 sts=2 sw=2 et: __END__ =pod =encoding UTF-8 =head1 NAME Module::Faker::Dist - a fake CPAN distribution =head1 VERSION version 0.025 =head1 SYNOPSIS Building one dist at a time makes plenty of sense, so Module::Faker::Dist makes it easy. Building dists from definitions in files is also useful for doing things in bulk (see L), so there are a bunch of ways to build dists from a definition in a file. # Build from a META.yml or META.json file, or the delightful # AUTHOR_Foo-Bar-1.234.tar.gz.dist file, which can be zero bytes and gets # all the relevant data from the filename. my $dist = Module::Faker::Dist->from_file($filename); META files can contain a key called X_Module_Faker that contains attributes to use in constructing the dist. C files can contain anything you want, but the contents won't do a thing. You can use the C method on Module::Faker::Dist, of course, but it's a bit of a pain. You might, instead, want to use C, which is very close to C, but with more sugar. =head1 PERL VERSION This module should work on any version of perl still receiving updates from the Perl 5 Porters. This means it should work on any version of perl released in the last two to three years. (That is, if the most recently released version is v5.40, then this module should work on both v5.40 and v5.38.) 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 ATTRIBUTES =head2 name This is the name of the dist. It will usually look like C. =head2 version This is the version of the dist, usually some kind of versiony string like C<1.234> or maybe C<1.2.3>. =head2 abstract The abstract! This is a short, pithy description of the distribution, usually less than a sentence. =head2 release_status This is the dist's release status. (See L.) It defaults to C but C and C are valid values. =head2 cpan_author This is the PAUSE id of the author, like C. =head2 archive_ext This is the extension of the archive to build, when you build an archive. This defaults to C. C should work, but right now it doesn't. So probably stuck to C. It would be cool to support more attributes in the future. =head2 append This is an arrayref of hashrefs, each of which looks like: { file => $filename, content => $character_string } The content will be UTF-8 encoded and put into a file with the given name. This feature is a bit weird. Maybe it will go away eventually. =head2 mtime If given, this is the epoch seconds to which to set the mtime of the generated file. This is useful in rare occasions. =head2 x_authority This is the C header that gets put into the META files. =head2 license This is the meta spec license string for the distribution. It defaults to C. =head2 authors This is an array of strings who are used as the authors in the dist metadata. The default is: [ "AUTHOR " ] ...where C is the C of the dist. =head2 include_provides_in_meta This is a bool. If true, the produced META files will include a C key based on the packages in the dist. It defaults to false, to match the most common behavior of dists in the wild. =head2 provides This is a hashref that gets used as the C in the metadata. If no provided, it is built from the C provided in construction. If no packages were provided, for a dist named Foo-Bar, it defaults to: { 'Foo::Bar' => { version => $DIST_VERSION, file => "lib/Foo/Bar.pm" } } =head2 archive_basename If written to disk, the archive will be written to... $dist->archive_basename . '.' . $dist->archive_ext The default is: $dist->name . '.' . ($dist->version // 'undef') =head2 omitted_files If given, this is an arrayref of filenames that shouldn't be automatically generated and included. =head2 packages This is an array of L objects. It's built by C if needed, but you might want to look at using the C> method to set it up. =head2 more_metadata This can be given as a hashref of data to merge into the CPAN::Meta files. =head2 meta_munger If given, this is a coderef that's called just before the CPAN::Meta data for the dist is written to disk, an can be used to change things, especially into invalid data. It is expected to return the new content to serialize. It's called like this: $coderef->($struct, { format => $format, version => $version }); ...where C<$struct> is the result of C<< $cpan_meta->as_struct >>. C<$version> is the version number of the target metafile. Normally, both version 1.4 and 2 are requested. C<$format> is either C or C. If the munger returns a string instead of a structure, it will be used as the content of the file being written. This lets you put all kinds of nonsense in those meta files. Have fun, go nuts! =head1 METHODS =head2 modules This produces and returns a list of L objects, representing modules. Modules, if you're not as steeped in CPAN toolchain nonsense, are the C<.pm> files in which packages are defined. These are produced by combining the packages from C> into files based on their C attributes. =head2 C my $directory_name = $dist->make_dist_dir(\%arg); This returns the name of a directory into which the dist's contents have been written. If a C argument is provided, the dist will be written to a directory beneath that dir. Otherwise, it will be written below a temporary directory. =head2 make_archive my $archive_filename = $dist->make_archive(\%arg); This writes the dist archive file, like a tarball or zip file. If a C argument is given, it will be written in that directory. Otherwise, it will be written to a temporary directory. If the C argument is given and true, it will be written under a hashed author dir, like: U/US/USERID/Foo-Bar-1.23.tar.gz =head2 from_file my $dist = Module::Faker::Dist->from_file($filename); Given a filename with dist configuration, this builds the dist described by the file. Given a file ending in C or C or C, it's treated as a CPAN::Meta file and interpreted as such. The key C can be present to provide attributes that don't match data found in a meta file. Given a file ending in C, all the configuration comes from the filename, which should look like this: AUTHOR_Dist-Name-1.234.tar.gz.dist =head2 from_struct my $dist = Module::Faker::Dist->from_struct(\%arg); This is sugar over C, working like this: =over 4 =item * packages version defaults to the dist version unless specified =item * packages for dist Foo-Bar defaults to Foo::Bar unless specified =item * if specified, packages is an L =back =head1 AUTHOR Ricardo Signes =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2008 by Ricardo Signes. 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 Module-Faker-0.025/xt/author/000755 000765 000024 00000000000 14423147746 016047 5ustar00rjbsstaff000000 000000 Module-Faker-0.025/xt/release/000755 000765 000024 00000000000 14423147746 016165 5ustar00rjbsstaff000000 000000 Module-Faker-0.025/xt/release/changes_has_content.t000644 000765 000024 00000002101 14423147746 022341 0ustar00rjbsstaff000000 000000 use Test::More tests => 2; note 'Checking Changes'; my $changes_file = 'Changes'; my $newver = '0.025'; 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; } Module-Faker-0.025/xt/author/pod-syntax.t000644 000765 000024 00000000252 14423147746 020341 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(); Module-Faker-0.025/t/omit-file.t000644 000765 000024 00000000661 14423147746 016432 0ustar00rjbsstaff000000 000000 use strict; use warnings; use Test::More tests => 3; use Module::Faker::Dist; use File::Temp (); my $MFD = 'Module::Faker::Dist'; my $tmpdir = File::Temp::tempdir(CLEANUP => 1); my $dist = $MFD->from_file('./eg/Lacks-META.json'); isa_ok($dist, $MFD); my $dir = $dist->make_dist_dir({ dir => $tmpdir }); ok( -e "$dir/Makefile.PL", "there's a Makefile.PL", ); ok( ! -e "$dir/META.yml", "but there is no META.yml", ); Module-Faker-0.025/t/basic.t000644 000765 000024 00000002242 14423147746 015623 0ustar00rjbsstaff000000 000000 use strict; use warnings; use Test::More; use Module::Faker; use File::Temp (); my $MF = 'Module::Faker'; my $tmpdir = File::Temp::tempdir(CLEANUP => 1); $MF->make_fakes({ source => './eg', dest => $tmpdir, }); ok( -e "$tmpdir/Mostly-Auto-0.01.tar.gz", "we got the mostly-auto dist", ); is((stat("$tmpdir/Mostly-Auto-0.01.tar.gz"))[9], 100, "got mtime set"); subtest "from YAML file" => sub { my $dist = Module::Faker::Dist->from_file('./eg/RJBS-Dist.yml'); is($dist->cpan_author, 'RJBS', "get cpan author from Faker META section"); }; subtest "from .dist file" => sub { my $dist = Module::Faker::Dist->from_file('./eg/RJBS_Another-Dist-1.24.tar.gz.dist'); is($dist->cpan_author, 'RJBS', "get cpan author from .dist filename"); is($dist->name, 'Another-Dist', "correct dist name"); is($dist->version, '1.24', "correct version"); }; subtest "from struct, with undef version" => sub { my $dist = Module::Faker::Dist->new({name => 'Some-Dist', version => undef}); is($dist->name, 'Some-Dist', "correct dist name"); is($dist->version, undef, "correct version"); is($dist->archive_basename, 'Some-Dist-undef', "correct basename"); }; done_testing; Module-Faker-0.025/t/requires.t000644 000765 000024 00000002324 14423147746 016402 0ustar00rjbsstaff000000 000000 use strict; use warnings; use Test::More; use Module::Faker::Dist; use CPAN::Meta; use CPAN::Meta::Requirements; my $runtime_requires = { 'Mostly::Auto' => '1.00', 'Provides::Inner' => '0', 'Some::Other' => '2.00', }; my @cases = qw( Simple-Prereq.yml V2-Prereq.yml ); plan tests => scalar @cases * (1 + scalar keys %$runtime_requires); for my $c ( @cases ) { my $dist = Module::Faker::Dist->from_file("./eg/$c"); my $dir = $dist->make_dist_dir; open my $fh, '<', "$dir/Makefile.PL" or die "Can't open $dir/Makefile.PL: $!"; my $data = do { local $/; <$fh> }; ($data) = $data =~ /^ PREREQ_PM => \{(.+?)\n \}/ms; my %p = eval $data; die $@ if $@; is_deeply( \%p, $runtime_requires, "$c\: PREREQ_PM extracted"); my $meta = CPAN::Meta->load_file("$dir/META.json"); my $req = CPAN::Meta::Requirements->new; for my $phase ( qw/runtime build test/ ) { $req->add_requirements( $meta->effective_prereqs->requirements_for( $phase, 'requires' ) ) } for my $mod ( keys %$runtime_requires ) { my $mod_req = $req->requirements_for_module( $mod ); is( $mod_req, $runtime_requires->{$mod}, "$c\: $mod prereq in META" ); } } # vim: ts=2 sts=2 sw=2 et: Module-Faker-0.025/t/meta-files.t000644 000765 000024 00000003013 14423147746 016565 0ustar00rjbsstaff000000 000000 use strict; use warnings; use Test::More tests => 2; use CPAN::Meta; use File::Temp (); use JSON::PP; use Module::Faker::Dist; use Path::Class; my @expected = qw( Makefile.PL META.yml META.json ); my $MFD = 'Module::Faker::Dist'; my $tmpdir = File::Temp::tempdir(CLEANUP => 1); subtest "dist without meta provides" => sub { my $dist = $MFD->from_file('./eg/Provides-Inner.yml'); isa_ok($dist, $MFD); my $dir = $dist->make_dist_dir({ dir => $tmpdir }); for my $f ( @expected ) { ok( -e "$dir/$f", "there's a $f"); } my $content = file("$dir/META.json")->slurp; my $meta = JSON::PP->new->decode( $content ); ok( ! exists $meta->{provides}, "provides is absent" ) or note explain($meta->{provides}); }; subtest "dist with meta provides" => sub { my $dist = $MFD->from_file('./eg/Provides-Inner.yml'); $dist->{include_provides_in_meta} = 1; # Violation! -- rjbs, 2019-04-25 isa_ok($dist, $MFD); my $dir = $dist->make_dist_dir({ dir => $tmpdir }); for my $f ( @expected ) { ok( -e "$dir/$f", "there's a $f"); } my $content = file("$dir/META.json")->slurp; my $meta = JSON::PP->new->decode( $content ); is_deeply( $meta->{provides}, { 'Provides::Inner' => { file => 'lib/Provides/Inner.pm', version => 0.001, }, 'Provides::Inner::Util' => { file => 'lib/Provides/Inner.pm', version => 0.867, }, 'Provides::Outer' => { file => 'lib/Provides/Outer.pm', }, }, "provides is correct" ); }; Module-Faker-0.025/t/append-utf8.t000644 000765 000024 00000002210 14423147746 016670 0ustar00rjbsstaff000000 000000 use strict; use warnings; use Test::More 0.88; # Archive::Any::Create 0.02 uses this my $extractor = 'Archive::Tar'; eval "require $extractor" or plan skip_all => "$extractor required for this test"; use Cwd (); use Encode qw( decode_utf8 encode_utf8 ); use Module::Faker::Dist; use File::Temp (); use Path::Class 0.06 qw( file ); my $MFD = 'Module::Faker::Dist'; my $tmpdir = File::Temp::tempdir(CLEANUP => 1); my $dist = $MFD->from_file(file(qw(eg Append-UTF8.json))->stringify); isa_ok($dist, $MFD); my $archive = $dist->make_archive({ dir => $tmpdir }); { my $old_pwd = Cwd::getcwd(); chdir $tmpdir or die "Failed to chdir to $tmpdir: $!"; $extractor->extract_archive($archive) or die $extractor->error; chdir $old_pwd; } (my $dir = $archive) =~ s/\.(zip|tar\.(gz|bz2))$//; my $file = file($dir, 'Changes'); ok( -e "$file", "file extracted" ); # on 5.14+ this will fail unless the file was passed through # encode_utf8 before passing to Archive::Tar like( # decode the slurped octects b/c we expect the file to be utf8 decode_utf8(scalar $file->slurp), qr/codename 'M\x{fc}nchen'/, 'file preserves utf8' ); done_testing; Module-Faker-0.025/t/00-report-prereqs.t000644 000765 000024 00000013601 14423147746 017752 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: Module-Faker-0.025/t/00-report-prereqs.dd000644 000765 000024 00000005110 14423147746 020072 0ustar00rjbsstaff000000 000000 do { my $x = { 'configure' => { 'requires' => { 'ExtUtils::MakeMaker' => '6.78' } }, 'develop' => { 'requires' => { 'Test::More' => '0', 'Test::Pod' => '1.41' } }, 'runtime' => { 'requires' => { 'Archive::Any::Create' => '0', 'CPAN::DistnameInfo' => '0', 'CPAN::Meta' => '2.130880', 'CPAN::Meta::Converter' => '0', 'CPAN::Meta::Merge' => '0', 'CPAN::Meta::Requirements' => '0', 'Carp' => '0', 'Data::OptList' => '0', 'Encode' => '0', 'File::Next' => '0', 'File::Path' => '0', 'File::Temp' => '0', 'Getopt::Long::Descriptive' => '0', 'Moose' => '0.33', 'Moose::Role' => '0', 'Moose::Util::TypeConstraints' => '0', 'Parse::CPAN::Meta' => '1.4401', 'Path::Class' => '0.06', 'Storable' => '0', 'Text::Template' => '0', 'perl' => 'v5.14.0', 'strict' => '0', 'warnings' => '0' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'Cwd' => '0', 'ExtUtils::MakeMaker' => '0', 'File::Spec' => '0', 'JSON::PP' => '0', 'Path::Class' => '0.06', 'Test::More' => '0.96' } } }; $x; }Module-Faker-0.025/t/makefile-pl.t000644 000765 000024 00000001223 14423147746 016726 0ustar00rjbsstaff000000 000000 use strict; use warnings; use Test::More; use Module::Faker::Dist; use File::Temp (); use Path::Class; my @matches = ( [ qr/^ \s* NAME \s* => \s* "Provides::Inner::Sorted", \s* $/mx, 'Makefile.PL gets NAME that looks like a package' ], ); plan tests => 2 + @matches; my $MFD = 'Module::Faker::Dist'; my $tmpdir = File::Temp::tempdir(CLEANUP => 1); my $dist = $MFD->from_file('./eg/Provides-Inner-Sorted.yml'); isa_ok($dist, $MFD); my $dir = $dist->make_dist_dir({ dir => $tmpdir }); my $path = file($dir, 'Makefile.PL'); ok -e $path; my $content = $path->slurp; foreach my $match ( @matches ){ like $content, $match->[0], $match->[1]; } Module-Faker-0.025/t/append.t000644 000765 000024 00000001112 14423147746 016004 0ustar00rjbsstaff000000 000000 use strict; use warnings; use Test::More tests => 4; use Module::Faker::Dist; use File::Temp (); use Path::Class qw(file); my $MFD = 'Module::Faker::Dist'; my $tmpdir = File::Temp::tempdir(CLEANUP => 1); my $dist = $MFD->from_file('./eg/Append.yml'); isa_ok($dist, $MFD); my $dir = $dist->make_dist_dir({ dir => $tmpdir }); ok( -e "$dir/t/foo.t", "there's my test file", ); is( file("$dir/t/foo.t")->slurp, "use Test::More;\n\nok(1);", 'test written' ); like( file("$dir/lib/Provides/Inner.pm")->slurp, qr/1\n\n=head1 NAME\n\nAppend - here I am/, 'appended pod' );Module-Faker-0.025/t/provide-order.t000644 000765 000024 00000001446 14423147746 017330 0ustar00rjbsstaff000000 000000 use strict; use warnings; use Test::More tests => 4; use Module::Faker::Dist; use File::Temp (); my $MFD = 'Module::Faker::Dist'; my $tmpdir = File::Temp::tempdir(CLEANUP => 1); my $dist = $MFD->from_file('./eg/Provides-Inner-Sorted.yml'); isa_ok($dist, $MFD); my $dir = $dist->make_dist_dir({ dir => $tmpdir }); my $file = File::Spec->catfile($dir, qw(lib Provides Inner), 'Sorted.pm'); ok(-e $file, "there's a package file"); my @pkg_lines = do { open my $fh, '<', $file or die "couldn't open file $file: $!"; grep { /^package/ } <$fh>; }; chomp @pkg_lines; s/^package (.+);/$1/ for @pkg_lines; is(@pkg_lines, 4, 'there! are! four! lines!'); is_deeply( \@pkg_lines, [ map { "Provides::Inner::Sorted::$_" } qw(Alfa Charlie Delta Bravo) ], "the packages are in the right order", ); Module-Faker-0.025/bin/module-faker000644 000765 000024 00000004250 14423147746 017161 0ustar00rjbsstaff000000 000000 #!perl use v5.14.0; use warnings; # PODNAME: module-faker # ABSTRACT: fake up CPAN distributions with Module::Faker #pod =head1 SYNOPSIS #pod #pod B [B<-s|--src> STR] [B<-d|--dest> STR] [B<-p|--author-dir>] #pod #pod =head1 OPTIONS #pod #pod =for :list #pod = B<-s> STR, B<--src> STR #pod source directory #pod = B<-d> STR, B<--dest> STR #pod destination directory #pod = B<-p>, B<--author-dir> #pod write dists into A/U/AUTHOR dirs #pod #pod =cut use Getopt::Long::Descriptive; use Module::Faker; my ($opt, $desc) = describe_options( '%c %o', [ 'src|s=s', "source directory", { required => 1 } ], [ 'dest|d=s', "destination directory", { required => 1 } ], [ 'author-dir|p!', "write dists into A/U/AUTHOR dirs", { default => 0 } ], ); Module::Faker->make_fakes({ source => $opt->src, dest => $opt->dest, author_prefix => $opt->author_dir, }); __END__ =pod =encoding UTF-8 =head1 NAME module-faker - fake up CPAN distributions with Module::Faker =head1 VERSION version 0.025 =head1 SYNOPSIS B [B<-s|--src> STR] [B<-d|--dest> STR] [B<-p|--author-dir>] =head1 PERL VERSION This module should work on any version of perl still receiving updates from the Perl 5 Porters. This means it should work on any version of perl released in the last two to three years. (That is, if the most recently released version is v5.40, then this module should work on both v5.40 and v5.38.) 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 OPTIONS =over 4 =item B<-s> STR, B<--src> STR source directory =item B<-d> STR, B<--dest> STR destination directory =item B<-p>, B<--author-dir> write dists into A/U/AUTHOR dirs =back =head1 AUTHOR Ricardo Signes =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2008 by Ricardo Signes. 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