Module-Faker-0.027/000755 000765 000024 00000000000 14624471710 014106 5ustar00rjbsstaff000000 000000 Module-Faker-0.027/LICENSE000644 000765 000024 00000046435 14624471710 015127 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 Perl Artistic License 1.0 --- This software is Copyright (c) 2008 by Ricardo Signes. This is free software, licensed under: The Perl 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 as specified below. "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 uunet.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) give non-standard executables non-standard names, and clearly document 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. You may embed this Package's interpreter within an executable of yours (by linking); this shall be construed as a mere form of aggregation, provided that the complete Standard Version of the interpreter is so embedded. 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 whoever generated them, and may be sold commercially, and may be aggregated with this Package. If such scripts or library files are aggregated with this Package via the so-called "undump" or "unexec" methods of producing a binary executable image, then distribution of such an image shall neither be construed as a distribution of this Package nor shall it fall under the restrictions of Paragraphs 3 and 4, provided that you do not represent such an executable image as a Standard Version of this Package. 7. C subroutines (or comparably compiled subroutines in other languages) supplied by you and linked into this Package in order to emulate subroutines and variables of the language defined by this Package shall not be considered part of this Package, but are the equivalent of input as in Paragraph 6, provided these subroutines do not change the language in any way that would cause it to fail the regression tests for the language. 8. Aggregation of this Package with a commercial distribution is always permitted provided that the use of this Package is embedded; that is, when no overt attempt is made to make this Package's interfaces visible to the end user of the commercial distribution. Such use shall not be construed as a distribution of this Package. 9. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 10. 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.027/bin/000755 000765 000024 00000000000 14624471710 014656 5ustar00rjbsstaff000000 000000 Module-Faker-0.027/nonsense/000755 000765 000024 00000000000 14624471710 015736 5ustar00rjbsstaff000000 000000 Module-Faker-0.027/Changes000644 000765 000024 00000010636 14624471710 015407 0ustar00rjbsstaff000000 000000 Revision history for Module-Faker 0.027 2024-05-25 19:27:03-04:00 America/New_York - support creating zipfile archives 0.026 2024-04-28 14:23:57+01:00 Europe/Lisbon - add Data::Fake::CPAN for fully automated generation of fakes 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.027/MANIFEST000644 000765 000024 00000001511 14624471710 015235 0ustar00rjbsstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.032. 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/Data/Fake/CPAN.pm 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 nonsense/module-blaster 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.027/t/000755 000765 000024 00000000000 14624471710 014351 5ustar00rjbsstaff000000 000000 Module-Faker-0.027/xt/000755 000765 000024 00000000000 14624471710 014541 5ustar00rjbsstaff000000 000000 Module-Faker-0.027/README000644 000765 000024 00000000567 14624471710 014776 0ustar00rjbsstaff000000 000000 This archive contains the distribution Module-Faker, version 0.027: 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.032. Module-Faker-0.027/META.yml000644 000765 000024 00000031062 14624471710 015361 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.032, 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' Archive::Any::Create::Zip: '0' CPAN::DistnameInfo: '0' CPAN::Meta: '2.130880' CPAN::Meta::Converter: '0' CPAN::Meta::Merge: '0' CPAN::Meta::Requirements: '0' Carp: '0' Data::Fake: '0' Data::Fake::Names: '0' Data::OptList: '0' Encode: '0' File::Next: '0' File::Path: '0' File::Temp: '0' Getopt::Long::Descriptive: '0' List::Util: '0' Moose: '0.33' Moose::Role: '0' Moose::Util::TypeConstraints: '0' Parse::CPAN::Meta: '1.4401' Path::Class: '0.06' Storable: '0' Sub::Exporter: '0' Text::Template: '0' experimental: '0' parent: '0' perl: v5.20.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.027' x_Dist_Zilla: perl: version: '5.038000' plugins: - class: Dist::Zilla::Plugin::Git::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: [] exclude_match: [] include_dotfiles: 0 prefix: '' prune_directory: [] root: . Dist::Zilla::Plugin::Git::GatherDir: include_untracked: 0 name: '@RJBS/Git::GatherDir' version: '2.049' - 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.060' - 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.060' - class: Dist::Zilla::Plugin::PruneCruft name: '@RJBS/@Filter/PruneCruft' version: '6.032' - class: Dist::Zilla::Plugin::ManifestSkip name: '@RJBS/@Filter/ManifestSkip' version: '6.032' - class: Dist::Zilla::Plugin::MetaYAML name: '@RJBS/@Filter/MetaYAML' version: '6.032' - class: Dist::Zilla::Plugin::License name: '@RJBS/@Filter/License' version: '6.032' - class: Dist::Zilla::Plugin::Readme name: '@RJBS/@Filter/Readme' version: '6.032' - class: Dist::Zilla::Plugin::ExecDir name: '@RJBS/@Filter/ExecDir' version: '6.032' - class: Dist::Zilla::Plugin::ShareDir name: '@RJBS/@Filter/ShareDir' version: '6.032' - class: Dist::Zilla::Plugin::Manifest name: '@RJBS/@Filter/Manifest' version: '6.032' - class: Dist::Zilla::Plugin::TestRelease name: '@RJBS/@Filter/TestRelease' version: '6.032' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@RJBS/@Filter/ConfirmRelease' version: '6.032' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@RJBS/@Filter/UploadToCPAN' version: '6.032' - class: Dist::Zilla::Plugin::MakeMaker config: Dist::Zilla::Role::TestRunner: default_jobs: 9 name: '@RJBS/MakeMaker' version: '6.032' - class: Dist::Zilla::Plugin::AutoPrereqs name: '@RJBS/AutoPrereqs' version: '6.032' - 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.44.0 repo_root: . name: '@RJBS/Git::NextVersion' version: '2.049' - class: Dist::Zilla::Plugin::PkgVersion name: '@RJBS/PkgVersion' version: '6.032' - class: Dist::Zilla::Plugin::MetaConfig name: '@RJBS/MetaConfig' version: '6.032' - class: Dist::Zilla::Plugin::MetaJSON name: '@RJBS/MetaJSON' version: '6.032' - class: Dist::Zilla::Plugin::NextRelease name: '@RJBS/NextRelease' version: '6.032' - class: Dist::Zilla::Plugin::Test::ChangesHasContent name: '@RJBS/Test::ChangesHasContent' version: '0.011' - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@RJBS/PodSyntaxTests' version: '6.032' - 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.032' - 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.020' - class: Pod::Weaver::Plugin::H1Nester name: '@CorePrep/H1Nester' version: '4.020' - class: Pod::Weaver::Plugin::SingleEncoding name: '@RJBS/SingleEncoding' version: '4.020' - class: Pod::Weaver::Section::Name name: '@RJBS/Name' version: '4.020' - class: Pod::Weaver::Section::Version name: '@RJBS/Version' version: '4.020' - class: Pod::Weaver::Section::Region name: '@RJBS/Prelude' version: '4.020' - class: Pod::Weaver::Section::Generic name: '@RJBS/Synopsis' version: '4.020' - class: Pod::Weaver::Section::Generic name: '@RJBS/Description' version: '4.020' - class: Pod::Weaver::Section::Generic name: '@RJBS/Overview' version: '4.020' - class: Pod::Weaver::Section::Generic name: '@RJBS/Stability' version: '4.020' - class: Pod::Weaver::Section::GenerateSection name: '@RJBS/PerlSupport' version: '4.020' - class: Pod::Weaver::Section::Collect name: Attributes version: '4.020' - class: Pod::Weaver::Section::Collect name: Methods version: '4.020' - class: Pod::Weaver::Section::Collect name: Functions version: '4.020' - class: Pod::Weaver::Section::Leftovers name: '@RJBS/Leftovers' version: '4.020' - class: Pod::Weaver::Section::Region name: '@RJBS/postlude' version: '4.020' - class: Pod::Weaver::Section::Authors name: '@RJBS/Authors' version: '4.020' - class: Pod::Weaver::Section::Contributors name: '@RJBS/Contributors' version: '0.009' - class: Pod::Weaver::Section::Legal name: '@RJBS/Legal' version: '4.020' - class: Pod::Weaver::Plugin::Transformer name: '@RJBS/List' version: '4.020' name: '@RJBS/PodWeaver' version: '4.010' - class: Dist::Zilla::Plugin::RJBSMisc name: '@RJBS/RJBSMisc' version: '5.029' - 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.44.0 repo_root: . name: '@RJBS/@Git/Check' version: '2.049' - 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.44.0 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@RJBS/@Git/Commit' version: '2.049' - class: Dist::Zilla::Plugin::Git::Tag config: Dist::Zilla::Plugin::Git::Tag: branch: ~ changelog: Changes signed: 0 tag: '0.027' tag_format: '%v' tag_message: v%V Dist::Zilla::Role::Git::Repo: git_version: 2.44.0 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@RJBS/@Git/Tag' version: '2.049' - 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.44.0 repo_root: . name: '@RJBS/@Git/Push' version: '2.049' - class: Dist::Zilla::Plugin::Git::Contributors config: Dist::Zilla::Plugin::Git::Contributors: git_version: 2.44.0 include_authors: 0 include_releaser: 1 order_by: name paths: [] name: '@RJBS/Git::Contributors' version: '0.037' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '6.032' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '6.032' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '6.032' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '6.032' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '6.032' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '6.032' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '6.032' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '6.032' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '6.032' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '6.032' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: 0 version: '6.032' x_contributors: - 'Colin Newell ' - 'David Golden ' - 'David Steinbrunner ' - 'gregor herrmann ' - 'Jeffrey Ryan Thalhammer ' - 'Mohammad S Anwar ' - 'Moritz Onken ' - 'Randy Stauner ' - 'Ricardo Signes ' x_generated_by_perl: v5.38.0 x_rjbs_perl_window: standard x_serialization_backend: 'YAML::Tiny version 1.74' x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later' Module-Faker-0.027/lib/000755 000765 000024 00000000000 14624471710 014654 5ustar00rjbsstaff000000 000000 Module-Faker-0.027/Makefile.PL000644 000765 000024 00000005367 14624471710 016073 0ustar00rjbsstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.032. use strict; use warnings; use 5.020000; 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.020000", "NAME" => "Module::Faker", "PREREQ_PM" => { "Archive::Any::Create" => 0, "Archive::Any::Create::Zip" => 0, "CPAN::DistnameInfo" => 0, "CPAN::Meta" => "2.130880", "CPAN::Meta::Converter" => 0, "CPAN::Meta::Merge" => 0, "CPAN::Meta::Requirements" => 0, "Carp" => 0, "Data::Fake" => 0, "Data::Fake::Names" => 0, "Data::OptList" => 0, "Encode" => 0, "File::Next" => 0, "File::Path" => 0, "File::Temp" => 0, "Getopt::Long::Descriptive" => 0, "List::Util" => 0, "Moose" => "0.33", "Moose::Role" => 0, "Moose::Util::TypeConstraints" => 0, "Parse::CPAN::Meta" => "1.4401", "Path::Class" => "0.06", "Storable" => 0, "Sub::Exporter" => 0, "Text::Template" => 0, "experimental" => 0, "parent" => 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.027", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Archive::Any::Create" => 0, "Archive::Any::Create::Zip" => 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::Fake" => 0, "Data::Fake::Names" => 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, "List::Util" => 0, "Moose" => "0.33", "Moose::Role" => 0, "Moose::Util::TypeConstraints" => 0, "Parse::CPAN::Meta" => "1.4401", "Path::Class" => "0.06", "Storable" => 0, "Sub::Exporter" => 0, "Test::More" => "0.96", "Text::Template" => 0, "experimental" => 0, "parent" => 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.027/eg/000755 000765 000024 00000000000 14624471710 014501 5ustar00rjbsstaff000000 000000 Module-Faker-0.027/META.json000644 000765 000024 00000047032 14624471710 015535 0ustar00rjbsstaff000000 000000 { "abstract" : "build fake dists for testing CPAN tools", "author" : [ "Ricardo Signes " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.032, 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", "Archive::Any::Create::Zip" : "0", "CPAN::DistnameInfo" : "0", "CPAN::Meta" : "2.130880", "CPAN::Meta::Converter" : "0", "CPAN::Meta::Merge" : "0", "CPAN::Meta::Requirements" : "0", "Carp" : "0", "Data::Fake" : "0", "Data::Fake::Names" : "0", "Data::OptList" : "0", "Encode" : "0", "File::Next" : "0", "File::Path" : "0", "File::Temp" : "0", "Getopt::Long::Descriptive" : "0", "List::Util" : "0", "Moose" : "0.33", "Moose::Role" : "0", "Moose::Util::TypeConstraints" : "0", "Parse::CPAN::Meta" : "1.4401", "Path::Class" : "0.06", "Storable" : "0", "Sub::Exporter" : "0", "Text::Template" : "0", "experimental" : "0", "parent" : "0", "perl" : "v5.20.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.027", "x_Dist_Zilla" : { "perl" : { "version" : "5.038000" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [], "exclude_match" : [], "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." }, "Dist::Zilla::Plugin::Git::GatherDir" : { "include_untracked" : 0 } }, "name" : "@RJBS/Git::GatherDir", "version" : "2.049" }, { "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.060" }, { "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.060" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@RJBS/@Filter/PruneCruft", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@RJBS/@Filter/ManifestSkip", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@RJBS/@Filter/MetaYAML", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@RJBS/@Filter/License", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::Readme", "name" : "@RJBS/@Filter/Readme", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@RJBS/@Filter/ExecDir", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@RJBS/@Filter/ShareDir", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@RJBS/@Filter/Manifest", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@RJBS/@Filter/TestRelease", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@RJBS/@Filter/ConfirmRelease", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@RJBS/@Filter/UploadToCPAN", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::MakeMaker", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "@RJBS/MakeMaker", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@RJBS/AutoPrereqs", "version" : "6.032" }, { "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.44.0", "repo_root" : "." } }, "name" : "@RJBS/Git::NextVersion", "version" : "2.049" }, { "class" : "Dist::Zilla::Plugin::PkgVersion", "name" : "@RJBS/PkgVersion", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@RJBS/MetaConfig", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@RJBS/MetaJSON", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@RJBS/NextRelease", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::Test::ChangesHasContent", "name" : "@RJBS/Test::ChangesHasContent", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@RJBS/PodSyntaxTests", "version" : "6.032" }, { "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.032" }, { "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.020" }, { "class" : "Pod::Weaver::Plugin::H1Nester", "name" : "@CorePrep/H1Nester", "version" : "4.020" }, { "class" : "Pod::Weaver::Plugin::SingleEncoding", "name" : "@RJBS/SingleEncoding", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Name", "name" : "@RJBS/Name", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Version", "name" : "@RJBS/Version", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@RJBS/Prelude", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@RJBS/Synopsis", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@RJBS/Description", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@RJBS/Overview", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@RJBS/Stability", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::GenerateSection", "name" : "@RJBS/PerlSupport", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "Attributes", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "Methods", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "Functions", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Leftovers", "name" : "@RJBS/Leftovers", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@RJBS/postlude", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Authors", "name" : "@RJBS/Authors", "version" : "4.020" }, { "class" : "Pod::Weaver::Section::Contributors", "name" : "@RJBS/Contributors", "version" : "0.009" }, { "class" : "Pod::Weaver::Section::Legal", "name" : "@RJBS/Legal", "version" : "4.020" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "@RJBS/List", "version" : "4.020" } ] } }, "name" : "@RJBS/PodWeaver", "version" : "4.010" }, { "class" : "Dist::Zilla::Plugin::RJBSMisc", "name" : "@RJBS/RJBSMisc", "version" : "5.029" }, { "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.44.0", "repo_root" : "." } }, "name" : "@RJBS/@Git/Check", "version" : "2.049" }, { "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.44.0", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@RJBS/@Git/Commit", "version" : "2.049" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "config" : { "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "changelog" : "Changes", "signed" : 0, "tag" : "0.027", "tag_format" : "%v", "tag_message" : "v%V" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.44.0", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@RJBS/@Git/Tag", "version" : "2.049" }, { "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.44.0", "repo_root" : "." } }, "name" : "@RJBS/@Git/Push", "version" : "2.049" }, { "class" : "Dist::Zilla::Plugin::Git::Contributors", "config" : { "Dist::Zilla::Plugin::Git::Contributors" : { "git_version" : "2.44.0", "include_authors" : 0, "include_releaser" : 1, "order_by" : "name", "paths" : [] } }, "name" : "@RJBS/Git::Contributors", "version" : "0.037" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "6.032" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "6.032" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : 0 }, "version" : "6.032" } }, "x_contributors" : [ "Colin Newell ", "David Golden ", "David Steinbrunner ", "gregor herrmann ", "Jeffrey Ryan Thalhammer ", "Mohammad S Anwar ", "Moritz Onken ", "Randy Stauner ", "Ricardo Signes " ], "x_generated_by_perl" : "v5.38.0", "x_rjbs_perl_window" : "standard", "x_serialization_backend" : "Cpanel::JSON::XS version 4.37", "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later" } Module-Faker-0.027/dist.ini000644 000765 000024 00000000263 14624471710 015553 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.027/eg/RJBS-Dist.yml000644 000765 000024 00000000145 14624471710 016665 0ustar00rjbsstaff000000 000000 --- #YAML:1.0 name: Email-Infinite abstract: please make it stop X_Module_Faker: cpan_author: RJBS Module-Faker-0.027/eg/Provides-Inner.yml000644 000765 000024 00000000420 14624471710 020064 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.027/eg/Append.yml000644 000765 000024 00000000634 14624471710 016436 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.027/eg/V2-Prereq.yml000644 000765 000024 00000000326 14624471710 016750 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.027/eg/Provides-Inner-Sorted.yml000644 000765 000024 00000001166 14624471710 021332 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.027/eg/Simple-Prereq.yml000644 000765 000024 00000000202 14624471710 017703 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.027/eg/Stylish.yml000644 000765 000024 00000000453 14624471710 016665 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.027/eg/RJBS_Another-Dist-1.24.tar.gz.dist000644 000765 000024 00000000000 14624471710 022263 0ustar00rjbsstaff000000 000000 Module-Faker-0.027/eg/Lacks-META.json000644 000765 000024 00000000206 14624471710 017153 0ustar00rjbsstaff000000 000000 { "name": "Lacks-META", "abstract": "this dist has no META.yaml", "X_Module_Faker": { "omitted_files": [ "META.yml" ] } } Module-Faker-0.027/eg/Append-UTF8.json000644 000765 000024 00000000533 14624471710 017330 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.027/eg/Mostly-Auto.yml000644 000765 000024 00000000111 14624471710 017412 0ustar00rjbsstaff000000 000000 --- #YAML:1.0 name: Mostly-Auto abstract: nothing to see here mtime: 100 Module-Faker-0.027/lib/Module/000755 000765 000024 00000000000 14624471710 016101 5ustar00rjbsstaff000000 000000 Module-Faker-0.027/lib/Data/000755 000765 000024 00000000000 14624471710 015525 5ustar00rjbsstaff000000 000000 Module-Faker-0.027/lib/Data/Fake/000755 000765 000024 00000000000 14624471710 016373 5ustar00rjbsstaff000000 000000 Module-Faker-0.027/lib/Data/Fake/CPAN.pm000644 000765 000024 00000061201 14624471710 017452 0ustar00rjbsstaff000000 000000 package Data::Fake::CPAN 0.027; use v5.20.0; use warnings; # ABSTRACT: a Data::Fake plugin for CPAN data and distributions # Back off, man, I'm a scientist. use experimental qw(lexical_subs postderef signatures); #pod =head1 SYNOPSIS #pod #pod use Data::Fake qw(CPAN); #pod #pod my $dist = fake_cpan_distribution()->(); #pod #pod my $archive = $dist->make_archive({ dir => '.' }); #pod say "Produced archive as $archive (cpan author: " . $dist->cpan_author . ")"; #pod say "- $_" for sort map {; $_->name } $dist->packages; #pod #pod This is a Data::Fake plugin for generating CPAN distributions. Right now, it #pod can't be configured in any way, but future revisions might add some options. #pod You can use this to generate libraries to test your CPAN-related tooling, to #pod test L. Make 10,000 and host your own competing #pod CPAN. The possibilities are endless. #pod #pod All the C functions exported by Data::Fake::CPAN are exported by #pod default, and you're meant to use them via C. Like the rest of #pod Data::Fake generators, they return subroutines that you must call to get the #pod actual faked data. #pod #pod =cut use Data::Fake qw( Core Dates ); use List::Util qw(uniq); use Sub::Exporter -setup => { groups => { default => [ '-all' ] }, exports => [ qw( fake_cpan_author fake_cpan_distribution fake_license fake_package_names fake_prereqs fake_version ) ], }; #pod =func fake_cpan_author #pod #pod This generator generates objects representing CPAN authors. These methods are #pod provided #pod #pod =for :list #pod * given_name - a first name from Data::Fake::Names #pod * surname - a surname from Data::Fake::Names #pod * full_name - given name, space, surname #pod * pauseid - an all caps PAUSE user id #pod * email_address - an email address #pod * name_and_email - a string in the form "full_name " #pod #pod If you call this generator many times, you might get duplicated data, but the #pod odds are not high. #pod #pod =cut sub fake_cpan_author { sub { Module::Faker::Blaster::Author->new } } #pod =func fake_cpan_distribution #pod #pod This creates an entire CPAN distribution, as a Module::Faker::Dist object. It #pod will contain at least one package, and possibly several. #pod #pod =cut my sub _package ($name) { state $config = { layout => { pkgword => fake_weighted( [ package => 4 ], [ class => 1 ], [ role => 1 ], )->(), style => fake_pick(qw( statement block ))->(), version => fake_pick(qw( our our-literal inline ))->(), }, }; return $name => $config; } sub fake_cpan_distribution { require Module::Faker::Dist; sub { my @package_names = fake_package_names(fake_int(1,6)->())->(); my $author = fake_cpan_author()->(); my $ext = fake_weighted( [ 'tar.gz' => 4 ], [ zip => 1 ], )->(); my $dist = Module::Faker::Dist->from_struct({ name => ($package_names[0] =~ s/::/-/gr), version => fake_version()->(), authors => [ $author->name_and_email ], cpan_author => $author->pauseid, license => [ fake_license()->() ], archive_ext => $ext, packages => [ map {; _package($_) } sort @package_names ], prereqs => fake_prereqs()->(), }); } } #pod =func fake_license #pod #pod This generator will spit out license values for a CPAN::Meta file, like #pod C or C or C. #pod #pod =cut sub fake_license { state @specific = qw( agpl_3 apache_1_1 apache_2_0 artistic_1 artistic_2 bsd freebsd gfdl_1_2 gfdl_1_3 gpl_1 gpl_2 gpl_3 lgpl_2_1 lgpl_3_0 mit mozilla_1_0 mozilla_1_1 openssl perl_5 qpl_1_0 ssleay sun zlib ); state @general = qw( open_source restricted unrestricted unknown ); fake_pick(@specific, @general); } #pod =func fake_package_names #pod #pod my $generator = fake_package_names($n); #pod #pod The constructed generator will return I package names. The first package #pod name will be a prefix of all the rest of the package names. #pod #pod =cut my sub make_identifier ($str) { my @bits = split /[^A-Za-z0-9_]/, $str; join q{}, map {; ucfirst } @bits; } sub fake_package_names ($n) { return unless $n >= 1; sub { my @base = map { make_identifier( _noun() ) } (1 .. fake_int(1,2)->()); my @names = join q{::}, @base; my @adjs = uniq map {; make_identifier( _adj() ) } (1 .. $n-1); push @names, map {; join q{::}, $names[0], $_ } @adjs; return @names; } } #pod =func fake_prereqs #pod #pod This generator will produce a reference to a hash that can be used as the #pod C entry in a CPAN::Meta file. Various type and phase combinations #pod will be produced with unevenly distributed probabilities. All package names #pod will be faked with C. #pod #pod =cut sub fake_prereqs { sub { my %prereqs; my $mk_phase = fake_weighted( [ configure => 1 ], [ runtime => 10 ], [ build => 2 ], [ test => 3 ], [ develop => 2 ], ); my $mk_type = fake_weighted( [ conflicts => 1 ], [ recommends => 3 ], [ requires => 15 ], [ suggests => 1 ], ); for (1 .. fake_int(0, 20)->()) { my $phase = $mk_phase->(); my $type = $mk_type->(); my ($package) = fake_package_names(1)->(); $prereqs{$phase}{$type}{$package} = fake_version()->(); } return \%prereqs; } } package Module::Faker::Blaster::Author 0.027 { use Moose; use Data::Fake::Names (); use v5.20.0; # I collect spores, molds and fungus. use experimental qw(lexical_subs postderef signatures); has given_name => ( is => 'ro', default => sub { Data::Fake::Names::fake_first_name()->() }, ); has surname => ( is => 'ro', default => sub { Data::Fake::Names::fake_surname()->() }, ); sub full_name ($self) { join q{ }, $self->given_name, $self->surname; } has pauseid => ( is => 'ro', lazy => 1, default => sub ($self) { uc( substr($self->given_name, 0, 1) . substr($self->surname, 0, 7)); }, ); has email_address => ( is => 'ro', lazy => 1, default => sub ($self) { lc $self->pauseid . '@fakecpan.org'; }, ); sub name_and_email ($self) { sprintf "%s <%s>", $self->full_name, $self->email_address; } no Moose; } my @v_generators = ( sub { # n.nnn my $ver_x = int rand 10; my $ver_y = int rand 1000; return sprintf '%d.%03d', $ver_x, $ver_y; }, sub { # YYYYMMDD.nnn my $date = fake_past_datetime('%Y%m%d')->(); return sprintf '%d.%03d', $date, int rand 1000; }, sub { # x.y.z return join q{.}, map {; int rand 20 } (1..3); }, ); sub fake_version { fake_pick(@v_generators); } my @ADJECTIVES = qw( abandoned able absolute adorable adventurous academic acceptable acclaimed accomplished accurate aching acidic acrobatic active actual adept admirable admired adolescent adorable adored advanced afraid affectionate aged aggravating aggressive agile agitated agonizing agreeable ajar alarmed alarming alert alienated alive all altruistic amazing ambitious ample amused amusing anchored ancient angelic angry anguished animated annual another antique anxious any apprehensive appropriate apt arctic arid aromatic artistic ashamed assured astonishing athletic attached attentive attractive austere authentic authorized automatic avaricious average aware awesome awful awkward babyish bad back baggy bare barren basic beautiful belated beloved beneficial better best bewitched big big-hearted biodegradable bite-sized bitter black black-and-white bland blank blaring bleak blind blissful blond blue blushing bogus boiling bold bony boring bossy both bouncy bountiful bowed brave breakable brief bright brilliant brisk broken bronze brown bruised bubbly bulky bumpy buoyant burdensome burly bustling busy buttery buzzing calculating calm candid canine capital carefree careful careless caring cautious cavernous celebrated charming cheap cheerful cheery chief chilly chubby circular classic clean clear clear-cut clever close closed cloudy clueless clumsy cluttered coarse cold colorful colorless colossal comfortable common compassionate competent complete complex complicated composed concerned concrete confused conscious considerate constant content conventional cooked cool cooperative coordinated corny corrupt costly courageous courteous crafty crazy creamy creative creepy criminal crisp critical crooked crowded cruel crushing cuddly cultivated cultured cumbersome curly curvy cute cylindrical damaged damp dangerous dapper daring darling dark dazzling dead deadly deafening dear dearest decent decimal decisive deep defenseless defensive defiant deficient definite definitive delayed delectable delicious delightful delirious demanding dense dental dependable dependent descriptive deserted detailed determined devoted different difficult digital diligent dim dimpled dimwitted direct disastrous discrete disfigured disgusting disloyal dismal distant downright dreary dirty disguised dishonest dismal distant distinct distorted dizzy dopey doting double downright drab drafty dramatic dreary droopy dry dual dull dutiful each eager earnest early easy easy-going ecstatic edible educated elaborate elastic elated elderly electric elegant elementary elliptical embarrassed embellished eminent emotional empty enchanted enchanting energetic enlightened enormous enraged entire envious equal equatorial essential esteemed ethical euphoric even evergreen everlasting every evil exalted excellent exemplary exhausted excitable excited exciting exotic expensive experienced expert extraneous extroverted extra-large extra-small fabulous failing faint fair faithful fake false familiar famous fancy fantastic far faraway far-flung far-off fast fat fatal fatherly favorable favorite fearful fearless feisty feline female feminine few fickle filthy fine finished firm first firsthand fitting fixed flaky flamboyant flashy flat flawed flawless flickering flimsy flippant flowery fluffy fluid flustered focused fond foolhardy foolish forceful forked formal forsaken forthright fortunate fragrant frail frank frayed free French fresh frequent friendly frightened frightening frigid frilly frizzy frivolous front frosty frozen frugal fruitful full fumbling functional funny fussy fuzzy gargantuan gaseous general generous gentle genuine giant giddy gigantic gifted giving glamorous glaring glass gleaming gleeful glistening glittering gloomy glorious glossy glum golden good good-natured gorgeous graceful gracious grand grandiose granular grateful grave gray great greedy green gregarious grim grimy gripping grizzled gross grotesque grouchy grounded growing growling grown grubby gruesome grumpy guilty gullible gummy hairy half handmade handsome handy happy happy-go-lucky hard hard-to-find harmful harmless harmonious harsh hasty hateful haunting healthy heartfelt hearty heavenly heavy hefty helpful helpless hidden hideous high high-level hilarious hoarse hollow homely honest honorable honored hopeful horrible hospitable hot huge humble humiliating humming humongous hungry hurtful husky icky icy ideal idealistic identical idle idiotic idolized ignorant ill illegal ill-fated ill-informed illiterate illustrious imaginary imaginative immaculate immaterial immediate immense impassioned impeccable impartial imperfect imperturbable impish impolite important impossible impractical impressionable impressive improbable impure inborn incomparable incompatible incomplete inconsequential incredible indelible inexperienced indolent infamous infantile infatuated inferior infinite informal innocent insecure insidious insignificant insistent instructive insubstantial intelligent intent intentional interesting internal international intrepid ironclad irresponsible irritating itchy jaded jagged jam-packed jaunty jealous jittery joint jolly jovial joyful joyous jubilant judicious juicy jumbo junior jumpy juvenile kaleidoscopic keen key kind kindhearted kindly klutzy knobby knotty knowledgeable knowing known kooky kosher lame lanky large last lasting late lavish lawful lazy leading lean leafy left legal legitimate light lighthearted likable likely limited limp limping linear lined liquid little live lively livid loathsome lone lonely long long-term loose lopsided lost loud lovable lovely loving low loyal lucky lumbering luminous lumpy lustrous luxurious mad made-up magnificent majestic major male mammoth married marvelous masculine massive mature meager mealy mean measly meaty medical mediocre medium meek mellow melodic memorable menacing merry messy metallic mild milky mindless miniature minor minty miserable miserly misguided misty mixed modern modest moist monstrous monthly monumental moral mortified motherly motionless mountainous muddy muffled multicolored mundane murky mushy musty muted mysterious naive narrow nasty natural naughty nautical near neat necessary needy negative neglected negligible neighboring nervous new next nice nifty nimble nippy nocturnal noisy nonstop normal notable noted noteworthy novel noxious numb nutritious nutty obedient obese oblong oily oblong obvious occasional odd oddball offbeat offensive official old old-fashioned only open optimal optimistic opulent orange orderly organic ornate ornery ordinary original other our outlying outgoing outlandish outrageous outstanding oval overcooked overdue overjoyed overlooked palatable pale paltry parallel parched partial passionate past pastel peaceful peppery perfect perfumed periodic perky personal pertinent pesky pessimistic petty phony physical piercing pink pitiful plain plaintive plastic playful pleasant pleased pleasing plump plush polished polite political pointed pointless poised poor popular portly posh positive possible potable powerful powerless practical precious present prestigious pretty precious previous pricey prickly primary prime pristine private prize probable productive profitable profuse proper proud prudent punctual pungent puny pure purple pushy putrid puzzled puzzling quaint qualified quarrelsome quarterly queasy querulous questionable quick quick-witted quiet quintessential quirky quixotic quizzical radiant ragged rapid rare rash raw recent reckless rectangular ready real realistic reasonable red reflecting regal regular reliable relieved remarkable remorseful remote repentant required respectful responsible repulsive revolving rewarding rich rigid right ringed ripe roasted robust rosy rotating rotten rough round rowdy royal rubbery rundown ruddy rude runny rural rusty sad safe salty same sandy sane sarcastic sardonic satisfied scaly scarce scared scary scented scholarly scientific scornful scratchy scrawny second secondary second-hand secret self-assured self-reliant selfish sentimental separate serene serious serpentine several severe shabby shadowy shady shallow shameful shameless sharp shimmering shiny shocked shocking shoddy short short-term showy shrill shy sick silent silky silly silver similar simple simplistic sinful single sizzling skeletal skinny sleepy slight slim slimy slippery slow slushy small smart smoggy smooth smug snappy snarling sneaky sniveling snoopy sociable soft soggy solid somber some spherical sophisticated sore sorrowful soulful soupy sour Spanish sparkling sparse specific spectacular speedy spicy spiffy spirited spiteful splendid spotless spotted spry square squeaky squiggly stable staid stained stale standard starchy stark starry steep sticky stiff stimulating stingy stormy straight strange steel strict strident striking striped strong studious stunning stupendous stupid sturdy stylish subdued submissive substantial subtle suburban sudden sugary sunny super superb superficial superior supportive sure-footed surprised suspicious svelte sweaty sweet sweltering swift sympathetic tall talkative tame tan tangible tart tasty tattered taut tedious teeming tempting tender tense tepid terrible terrific testy thankful that these thick thin third thirsty this thorough thorny those thoughtful threadbare thrifty thunderous tidy tight timely tinted tiny tired torn total tough traumatic treasured tremendous tragic trained tremendous triangular tricky trifling trim trivial troubled true trusting trustworthy trusty truthful tubby turbulent twin ugly ultimate unacceptable unaware uncomfortable uncommon unconscious understated unequaled uneven unfinished unfit unfolded unfortunate unhappy unhealthy uniform unimportant unique united unkempt unknown unlawful unlined unlucky unnatural unpleasant unrealistic unripe unruly unselfish unsightly unsteady unsung untidy untimely untried untrue unused unusual unwelcome unwieldy unwilling unwitting unwritten upbeat upright upset urban usable used useful useless utilized utter vacant vague vain valid valuable vapid variable vast velvety venerated vengeful verifiable vibrant vicious victorious vigilant vigorous villainous violet violent virtual virtuous visible vital vivacious vivid voluminous wan warlike warm warmhearted warped wary wasteful watchful waterlogged watery wavy wealthy weak weary webbed wee weekly weepy weighty weird welcome well-documented well-groomed well-informed well-lit well-made well-off well-to-do well-worn wet which whimsical whirlwind whispered white whole whopping wicked wide wide-eyed wiggly wild willing wilted winding windy winged wiry wise witty wobbly woeful wonderful wooden woozy wordy worldly worn worried worrisome worse worst worthless worthwhile worthy wrathful wretched writhing wrong wry yawning yearly yellow yellowish young youthful yummy zany zealous zesty ); my @NOUNS = qw( ability accident activity actor ad addition administration advertising advice agency agreement airport alcohol analysis anxiety apartment appearance application appointment area argument army arrival art article aspect assistance association assumption atmosphere attention attitude audience awareness baseball basis basket bath bird blood bonus boyfriend bread breath buyer cabinet camera cancer candidate category cell chapter charity chemistry chest child childhood chocolate church cigarette city classroom climate clothes coffee collection college combination committee communication community comparison competition complaint computer concept conclusion confusion connection construction context contract contribution control conversation cookie country county courage cousin criticism currency customer dad data database dealer death debt decision definition delivery department depression depth description desk development device difference difficulty dinner direction director disaster discussion disease disk distribution drama drawer drawing driver economics editor education efficiency effort election elevator emotion emphasis employee employer employment energy engine engineering entertainment enthusiasm entry environment equipment error establishment estate event exam examination excitement explanation expression extent fact failure family farmer feedback finding fishing flight food football foundation freedom garbage gate girl goal government grandmother grocery growth guest guidance guitar hair hall health hearing heart height highway historian history homework honey hospital hotel housing idea imagination importance impression improvement income independence industry inflation information initiative injury insect inspection inspector instance instruction insurance interaction internet introduction investment judgment king knowledge lab ladder lake language law leader leadership length library literature location loss love magazine maintenance mall management manager manufacturer map marketing marriage math meal meaning measurement meat media medicine member membership memory menu message method mixture mode mom moment month mood movie mud music nation nature news newspaper night office operation opinion opportunity orange organization outcome oven owner painting paper passion patience payment penalty people percentage perception performance permission person personality perspective philosophy phone photo physics piano pie player poem poetry police policy politics population possession possibility potato power preference preparation presence presentation president priority problem procedure product profession professor promotion property proposal protection psychology quality quantity queen ratio reaction reading reality reception recipe recommendation recording reflection refrigerator region relation relationship replacement republic requirement resolution resource response responsibility restaurant revenue revolution river road role safety salad sample satisfaction scene science secretary sector security selection series session setting shopping signature significance singer sister situation skill society software solution son song soup speech statement steak storage story strategy student studio success suggestion supermarket system tea teacher teaching technology television temperature tennis tension thanks theory thing thought tongue tooth topic town tradition transportation truth two understanding union unit university user variation variety vehicle version video village virus volume warning way weakness wealth wedding week wife winner woman wood worker world writer writing year ); sub _noun { return $NOUNS[ rand @NOUNS ] } sub _adj { return $ADJECTIVES[ rand @ADJECTIVES ] } 1; __END__ =pod =encoding UTF-8 =head1 NAME Data::Fake::CPAN - a Data::Fake plugin for CPAN data and distributions =head1 VERSION version 0.027 =head1 SYNOPSIS use Data::Fake qw(CPAN); my $dist = fake_cpan_distribution()->(); my $archive = $dist->make_archive({ dir => '.' }); say "Produced archive as $archive (cpan author: " . $dist->cpan_author . ")"; say "- $_" for sort map {; $_->name } $dist->packages; This is a Data::Fake plugin for generating CPAN distributions. Right now, it can't be configured in any way, but future revisions might add some options. You can use this to generate libraries to test your CPAN-related tooling, to test L. Make 10,000 and host your own competing CPAN. The possibilities are endless. All the C functions exported by Data::Fake::CPAN are exported by default, and you're meant to use them via C. Like the rest of Data::Fake generators, they return subroutines that you must call to get the actual faked data. =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 FUNCTIONS =head2 fake_cpan_author This generator generates objects representing CPAN authors. These methods are provided =over 4 =item * given_name - a first name from Data::Fake::Names =item * surname - a surname from Data::Fake::Names =item * full_name - given name, space, surname =item * pauseid - an all caps PAUSE user id =item * email_address - an email address =item * name_and_email - a string in the form "full_name " =back If you call this generator many times, you might get duplicated data, but the odds are not high. =head2 fake_cpan_distribution This creates an entire CPAN distribution, as a Module::Faker::Dist object. It will contain at least one package, and possibly several. =head2 fake_license This generator will spit out license values for a CPAN::Meta file, like C or C or C. =head2 fake_package_names my $generator = fake_package_names($n); The constructed generator will return I package names. The first package name will be a prefix of all the rest of the package names. =head2 fake_prereqs This generator will produce a reference to a hash that can be used as the C entry in a CPAN::Meta file. Various type and phase combinations will be produced with unevenly distributed probabilities. All package names will be faked with C. =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.027/lib/Module/Faker/000755 000765 000024 00000000000 14624471710 017131 5ustar00rjbsstaff000000 000000 Module-Faker-0.027/lib/Module/Faker.pm000644 000765 000024 00000021713 14624471710 017473 0ustar00rjbsstaff000000 000000 package Module::Faker 0.027; # ABSTRACT: build fake dists for testing CPAN tools use v5.20.0; 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.027 =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 =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.027/lib/Module/Faker/Package.pm000644 000765 000024 00000010500 14624471710 021016 0ustar00rjbsstaff000000 000000 package Module::Faker::Package 0.027; # ABSTRACT: a faked package in a faked module use v5.20.0; 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.027 =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.027/lib/Module/Faker/Appendix.pm000644 000765 000024 00000002452 14624471710 021242 0ustar00rjbsstaff000000 000000 package Module::Faker::Appendix 0.027; # ABSTRACT: a thing that appends use v5.20.0; 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.027 =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.027/lib/Module/Faker/File.pm000644 000765 000024 00000002415 14624471710 020350 0ustar00rjbsstaff000000 000000 package Module::Faker::File 0.027; # ABSTRACT: a fake file in a fake dist use v5.20.0; 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.027 =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.027/lib/Module/Faker/Heavy.pm000644 000765 000024 00000005660 14624471710 020552 0ustar00rjbsstaff000000 000000 use v5.20.0; use warnings; package Module::Faker::Heavy 0.027; # 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.027 =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.027/lib/Module/Faker/Module.pm000644 000765 000024 00000003226 14624471710 020717 0ustar00rjbsstaff000000 000000 package Module::Faker::Module 0.027; # ABSTRACT: a faked module use v5.20.0; 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.027 =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.027/lib/Module/Faker/Dist.pm000644 000765 000024 00000070306 14624471710 020400 0ustar00rjbsstaff000000 000000 package Module::Faker::Dist 0.027; # ABSTRACT: a fake CPAN distribution use v5.20.0; 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 works. Other things might. Try it and find #pod out. #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 not 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 package Module::Faker::Dist::ZipCreator { use parent 'Archive::Any::Create::Zip'; sub add_file { my $self = shift; my($file, $data) = @_; my $member = $self->SUPER::add_file($file, $data); $member->unixFileAttributes(0644); return $member; } } sub make_archive { my ($self, $arg) = @_; $arg ||= {}; my $dir = $arg->{dir} || File::Temp::tempdir; # This is, admittedly, sort of bananas. We're doing this because by default, # Archive::Any::Create would make the files a+w. PAUSE will reject uploaded # archives with files like that, and we want these archives to be useful for # testing PAUSE. local $Archive::Any::Create::Type2Class{zip} = [ 'Module::Faker::Dist::ZipCreator' ]; local $INC{'Module/Faker/Dist/ZipCreator.pm'} = 1; 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.027 =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 works. Other things might. Try it and find out. =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 not 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.027/xt/author/000755 000765 000024 00000000000 14624471710 016043 5ustar00rjbsstaff000000 000000 Module-Faker-0.027/xt/release/000755 000765 000024 00000000000 14624471710 016161 5ustar00rjbsstaff000000 000000 Module-Faker-0.027/xt/release/changes_has_content.t000644 000765 000024 00000002101 14624471710 022335 0ustar00rjbsstaff000000 000000 use Test::More tests => 2; note 'Checking Changes'; my $changes_file = 'Changes'; my $newver = '0.027'; 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.027/xt/author/pod-syntax.t000644 000765 000024 00000000252 14624471710 020335 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.027/t/omit-file.t000644 000765 000024 00000000661 14624471710 016426 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.027/t/basic.t000644 000765 000024 00000003065 14624471710 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"); }; subtest "from struct, written to a zip" => sub { my $dist = Module::Faker::Dist->new({ name => 'Some-Dist', version => '1.23' }); # We're not goign to test anything yet, but just make sure that this works, # in case someday Archive::Any::Create is changed in a way that breaks our # hack. my $filename = $dist->make_archive({ dir => $tmpdir }); ok(-e $filename, "we wrote the archive"); }; done_testing; Module-Faker-0.027/t/requires.t000644 000765 000024 00000002324 14624471710 016376 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.027/t/meta-files.t000644 000765 000024 00000003013 14624471710 016561 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.027/t/append-utf8.t000644 000765 000024 00000002210 14624471710 016664 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.027/t/00-report-prereqs.t000644 000765 000024 00000013601 14624471710 017746 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.027/t/00-report-prereqs.dd000644 000765 000024 00000005774 14624471710 020106 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', 'Archive::Any::Create::Zip' => '0', 'CPAN::DistnameInfo' => '0', 'CPAN::Meta' => '2.130880', 'CPAN::Meta::Converter' => '0', 'CPAN::Meta::Merge' => '0', 'CPAN::Meta::Requirements' => '0', 'Carp' => '0', 'Data::Fake' => '0', 'Data::Fake::Names' => '0', 'Data::OptList' => '0', 'Encode' => '0', 'File::Next' => '0', 'File::Path' => '0', 'File::Temp' => '0', 'Getopt::Long::Descriptive' => '0', 'List::Util' => '0', 'Moose' => '0.33', 'Moose::Role' => '0', 'Moose::Util::TypeConstraints' => '0', 'Parse::CPAN::Meta' => '1.4401', 'Path::Class' => '0.06', 'Storable' => '0', 'Sub::Exporter' => '0', 'Text::Template' => '0', 'experimental' => '0', 'parent' => '0', 'perl' => 'v5.20.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.027/t/makefile-pl.t000644 000765 000024 00000001223 14624471710 016722 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.027/t/append.t000644 000765 000024 00000001112 14624471710 016000 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.027/t/provide-order.t000644 000765 000024 00000001446 14624471710 017324 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.027/nonsense/module-blaster000744 000765 000024 00000001307 14624471710 020602 0ustar00rjbsstaff000000 000000 #!perl use v5.20.0; use warnings; # PODNAME: module-blaster # ABSTRACT: create a random CPAN distribution # This goofy little program spits out one or more faked up CPAN distributions. # They should be valid, but will have no useful code in them. use lib 'lib'; use Data::Fake qw(CPAN); use Getopt::Long::Descriptive; my ($opt, $usage) = describe_options( '%c %o', [ 'number|n=i', 'how many dists to blast out', { default => 1 } ], ); for my $n (1 .. $opt->number) { my $dist = fake_cpan_distribution()->(); my $archive = $dist->make_archive({ dir => '.' }); say "Produced archive as $archive (cpan author: " . $dist->cpan_author . ")"; say "- $_" for sort map {; $_->name } $dist->packages; } Module-Faker-0.027/bin/module-faker000744 000765 000024 00000004250 14624471710 017156 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.027 =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