CONTRIBUTING000664001750001750 614612406251330 13760 0ustar00taitai000000000000Dist-Inkt-0.023NAME CONTRIBUTING DESCRIPTION If you're reading this document, that means you might be thinking about helping me out with this project. Thanks! Here's some ways you could help out: * Bug reports Found a bug? Great! (Well, not so great I suppose.) The place to report them is . Don't e-mail me about it, as your e-mail is more than likely to get lost amongst the spam. An example script clearly demonstrating the bug (preferably written using Test::More) would be greatly appreciated. * Patches If you've found a bug and written a fix for it, even better! Generally speaking you should check out the latest copy of the code from the source repository rather than using the CPAN distribution. The file META.yml should contain a link to the source repository. If not, then try or submit a bug report. (As far as I'm concerned the lack of a link is a bug.) Many of my distributions are also mirrored at . To submit the patch, do a pull request on GitHub or Bitbucket, or attach a diff file to a bug report. Unless otherwise stated, I'll assume that your contributions are licensed under the same terms as the rest of the project. (If using git, feel free to work in a branch. For Mercurial, I'd prefer bookmarks within the default branch.) * Documentation If there's anything unclear in the documentation, please submit this as a bug report or patch as above. Non-toy example scripts that I can bundle would also be appreciated. * Translation Translations of documentation would be welcome. For translations of error messages and other strings embedded in the code, check with me first. Sometimes the English strings may not in a stable state, so it would be a waste of time translating them. Coding Style I tend to write using something approximating the Allman style, using tabs for indentation and Unix-style line breaks. * * I nominally encode all source files as UTF-8, though in practice most of them use a 7-bit-safe ASCII-compatible subset of UTF-8. AUTHOR Toby Inkster . COPYRIGHT AND LICENCE Copyright (c) 2012-2014 by Toby Inkster. CONTRIBUTING is available under three different licences permitting its redistribution: the CC-BY-SA_UK-2.0 licence, plus the same licences as Perl itself, which is distributed under the GNU General Public Licence version 1, and the Artistic Licence. This file is licensed under the Creative Commons Attribution-ShareAlike 2.0 UK: England & Wales License. To view a copy of this license, visit . This file is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. COPYRIGHT000664001750001750 375512406251330 13424 0ustar00taitai000000000000Dist-Inkt-0.023Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Dist-Inkt Upstream-Contact: Toby Inkster (TOBYINK) Source: https://metacpan.org/release/Dist-Inkt Files: Changes META.json META.yml bin/distinkt-dist bin/distinkt-travisyml doap.ttl lib/Dist/Inkt/Profile/Simple.pm lib/Dist/Inkt/Role/CPANfile.pm lib/Dist/Inkt/Role/CopyFiles.pm lib/Dist/Inkt/Role/CopyStandardDocuments.pm lib/Dist/Inkt/Role/MetaProvides.pm lib/Dist/Inkt/Role/MetaProvidesScripts.pm lib/Dist/Inkt/Role/SignDistribution.pm lib/Dist/Inkt/Role/WriteDOAPLite.pm lib/Dist/Inkt/Role/WriteINSTALL.pm lib/Dist/Inkt/Role/WriteLICENSE.pm lib/Dist/Inkt/Role/WriteMakefilePL.pm lib/Dist/Inkt/Role/WriteMetaJSON.pm lib/Dist/Inkt/Role/WriteMetaYML.pm lib/Dist/Inkt/Role/WriteREADME.pm Copyright: Copyright 2014 Toby Inkster. License: GPL-1.0+ or Artistic-1.0 Files: CONTRIBUTING INSTALL LICENSE examples/p5-acme-example-dist/cpanfile examples/p5-acme-example-dist/dist.ini Copyright: Unknown License: Unknown Files: COPYRIGHT CREDITS SIGNATURE Copyright: None License: public-domain Files: README lib/Dist/Inkt.pm Copyright: This software is copyright (c) 2013-2014 by Toby Inkster. License: GPL-1.0+ or Artistic-1.0 Files: examples/p5-acme-example-dist/lib/Acme/Example/Dist.pm examples/p5-acme-example-dist/t/01basic.t Copyright: This software is copyright (c) 2014 by Toby Inkster. License: GPL-1.0+ or Artistic-1.0 Files: Makefile.PL dist.ini Copyright: Copyright 2013 Toby Inkster. License: GPL-1.0+ or Artistic-1.0 Files: t/01basic.t Copyright: This software is copyright (c) 2013 by Toby Inkster. License: GPL-1.0+ or Artistic-1.0 License: Artistic-1.0 This software is Copyright (c) 2014 by the copyright holder(s). This is free software, licensed under: The Artistic License 1.0 License: GPL-1.0 This software is Copyright (c) 2014 by the copyright holder(s). This is free software, licensed under: The GNU General Public License, Version 1, February 1989 CREDITS000664001750001750 15112406251321 13114 0ustar00taitai000000000000Dist-Inkt-0.023Maintainer: - Toby Inkster (TOBYINK) Thanks: - Graham Knop (HAARG) Changes000664001750001750 776012406251321 13424 0ustar00taitai000000000000Dist-Inkt-0.023Dist-Inkt ========= Created: 2013-08-07 Home page: Bug tracker: Wiki: Maintainer: Toby Inkster (TOBYINK) 0.023 2014-09-17 - Avoid outputting anonymous class names. - Improve command-line option handling. 0.022 2014-06-19 [ Bug Fixes ] - Fix check for existence of meta/META.PL. [ Other ] - Filter $meta->{provides} using $meta->{no_index}. 0.021 2014-06-19 [ Documentation ] - Fix documentation of the `--TRAVIS` option. [ Other ] - Generated Makefile.PL should cope better if CPAN::Meta::Requirements is missing. 0.020 2014-06-16 [ Documentation ] - Added stub pod to command line scripts. [ Other ] - Better integration with haarg's perl-travis-helper stuff. - Improvements to command line scripts. 0.019 2014-06-15 [ Packaging ] - Add missing Path::FindDev dependency. [ Other ] - Cope when ~/perl5/standard-documents/ is missing. - Support PERL_DIST_INKT_NOSIGNATURE environment variable to skip building a SIGNATURE file. 0.018 2014-06-14 [ Packaging ] - Add missing File::chdir dependency. 0.017 2014-05-26 - Simplify usage of Dist::Inkt::Profile::Simple, and example. 0.016 2014-05-26 [ Packaging ] - Split out a lot of functionality into Dist-Inkt-DOAP. [ Other ] - Added: Dist::Inkt::Profile::Simple. - Added: Dist::Inkt::Role::CPANfile. - Added: Dist::Inkt::Role::WriteDOAPLite. 0.015 2014-03-10 - Guess repository details from repository web URL for github.com. 0.014 2014-01-21 - Added: Bundle a `distinkt-travisyml` script to automate creating .travis.yml files. - Generated Makefile.PL explicitly lists test suite directories. - Use Path::Tiny's `subsumes` method over home-brew version. 0.013 2013-09-22 - Generated Makefile.PL performs a better check for minimum Perl version. 0.012 2013-09-19 [ Bug Fixes ] - Generating LICENSE files now understands CPAN::Meta::Spec 2.0 license codes. 0.011 2013-09-19 [ Bug Fixes ] - META.json/yml license codes now conform to CPAN::Meta::Spec 2.0 instead of META-spec 1.4. 0.010 2013-09-11 - Added: Output an INSTALL file. - Added: Output optional_features in META.json. - Added: Use dynamic config in Makefile.PL to add dependencies for optional features. - Updated: Support `feature` property from DOAP deps. 0.009 2013-09-06 [ Bug Fixes ] - Correct %script to %scripts in Dist::Inkt::Role::MetaProvidesScripts. - Make sure EUMM $VERSION gets evaled. Graham Knop++ - Replace => with = in assignment in Makefile.PL. Graham Knop++ 0.008 2013-09-06 [ Packaging ] - Depend on a newer version of RDF::DOAP, thus we get more awesome Changes files. [ Other ] - Add `x_breaks` key to META.json if appropriate. - Allow `source_for_readme` to be set in Dist::Inkt constructor (and thus in dist.ini). - Don't add `x_provides_scripts` to META.json unless scripts are actually provided. - Perform conflicts checking in Makefile.PL. 0.007 2013-08-27 - Rename META.ttl -> doap.ttl. 0.006 2013-08-13 - Guess some copyrights for the COPYRIGHT file. 0.005 2013-08-13 - Added: Support the `x_help_wanted` key for META.json/META.yml. - Updated: Use the shiny, new RDF::DOAP for a lot of the behind-the-scenes DOAP processing. 0.004 2013-08-10 - Attempt to support ExtUtils::MakeMaker 6.17. Don't pass WriteMakefile a LICENSE unless EUMM >= 6.3001; don't pass it a DISTVNAME at all. - For ExtUtils::MakeMaker versions that don't support BUILD_REQUIRES, bundle it in with PREREQ_PM, not CONFIGURE_REQUIRES. - For ExtUtils::MakeMaker versions that don't support TEST_REQUIRES, bundle it in with BUILD_REQUIRES, not CONFIGURE_REQUIRES. 0.003 2013-08-10 - Don't pass ExtUtils::MakeMaker the AUTHOR as an arrayref unless its version number >= 6.5702. 0.002 2013-08-09 - Add shebang to `bin/distinkt-dist`. - Avoid creating empty 'x_contributors' keys in META.json/META.yml. 0.001 2013-08-09 Initial release INSTALL000664001750001750 165312406251317 13162 0ustar00taitai000000000000Dist-Inkt-0.023 Installing Dist-Inkt should be straightforward. INSTALLATION WITH CPANMINUS If you have cpanm, you only need one line: % cpanm Dist::Inkt If you are installing into a system-wide directory, you may need to pass the "-S" flag to cpanm, which uses sudo to install the module: % cpanm -S Dist::Inkt INSTALLATION WITH THE CPAN SHELL Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan Dist::Inkt MANUAL INSTALLATION As a last resort, you can manually install it. Download the tarball and unpack it. Consult the file META.json for a list of pre-requisites. Install these first. To build Dist-Inkt: % perl Makefile.PL % make && make test Then install it: % make install If you are installing into a system-wide directory, you may need to run: % sudo make install LICENSE000664001750001750 4365512406251317 13166 0ustar00taitai000000000000Dist-Inkt-0.023This software is copyright (c) 2014 by Toby Inkster. 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) 2014 by Toby Inkster. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2014 by Toby Inkster. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End MANIFEST000664001750001750 155712406251330 13260 0ustar00taitai000000000000Dist-Inkt-0.023CONTRIBUTING COPYRIGHT CREDITS Changes INSTALL LICENSE MANIFEST META.json META.yml Makefile.PL README SIGNATURE bin/distinkt-dist bin/distinkt-travisyml dist.ini doap.ttl examples/p5-acme-example-dist/cpanfile examples/p5-acme-example-dist/dist.ini examples/p5-acme-example-dist/lib/Acme/Example/Dist.pm examples/p5-acme-example-dist/t/01basic.t lib/Dist/Inkt.pm lib/Dist/Inkt/Profile/Simple.pm lib/Dist/Inkt/Role/CPANfile.pm lib/Dist/Inkt/Role/CopyFiles.pm lib/Dist/Inkt/Role/CopyStandardDocuments.pm lib/Dist/Inkt/Role/MetaProvides.pm lib/Dist/Inkt/Role/MetaProvidesScripts.pm lib/Dist/Inkt/Role/SignDistribution.pm lib/Dist/Inkt/Role/WriteDOAPLite.pm lib/Dist/Inkt/Role/WriteINSTALL.pm lib/Dist/Inkt/Role/WriteLICENSE.pm lib/Dist/Inkt/Role/WriteMakefilePL.pm lib/Dist/Inkt/Role/WriteMetaJSON.pm lib/Dist/Inkt/Role/WriteMetaYML.pm lib/Dist/Inkt/Role/WriteREADME.pm t/01basic.t META.json000664001750001750 1112112406251327 13562 0ustar00taitai000000000000Dist-Inkt-0.023{ "abstract" : "yet another distribution builder", "author" : [ "Toby Inkster (TOBYINK) " ], "dynamic_config" : 0, "generated_by" : "Dist::Inkt::Profile::TOBYINK version 0.022, CPAN::Meta::Converter version 2.140640", "keywords" : [ "CPAN", "Distribution", "Package", "Perl", "Release" ], "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Dist-Inkt", "no_index" : { "directory" : [ "eg", "examples", "inc", "t", "xt" ] }, "optional_features" : {}, "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.17" } }, "runtime" : { "requires" : { "CPAN::Changes" : "0", "CPAN::Meta" : "0", "CPAN::Meta::Requirements" : "0", "Data::Dump" : "0", "File::chdir" : "0", "List::MoreUtils" : "0", "Module::CPANfile" : "1.0002", "Module::Metadata" : "0", "Module::Runtime" : "0", "Module::Signature" : "0", "Moose" : "2.0800", "Path::FindDev" : "0", "Path::Iterator::Rule" : "0", "Path::Tiny" : "0", "RDF::DOAP::Lite" : "0", "Software::License" : "0", "Types::Path::Tiny" : "0", "Types::Standard" : "0", "namespace::autoclean" : "0", "perl" : "5.010001" } }, "test" : { "requires" : { "Test::More" : "0.96" } } }, "provides" : { "Dist::Inkt" : { "file" : "lib/Dist/Inkt.pm", "version" : "0.023" }, "Dist::Inkt::Profile::Simple" : { "file" : "lib/Dist/Inkt/Profile/Simple.pm", "version" : "0.023" }, "Dist::Inkt::Role::CPANfile" : { "file" : "lib/Dist/Inkt/Role/CPANfile.pm", "version" : "0.023" }, "Dist::Inkt::Role::CopyFiles" : { "file" : "lib/Dist/Inkt/Role/CopyFiles.pm", "version" : "0.023" }, "Dist::Inkt::Role::CopyStandardDocuments" : { "file" : "lib/Dist/Inkt/Role/CopyStandardDocuments.pm", "version" : "0.023" }, "Dist::Inkt::Role::MetaProvides" : { "file" : "lib/Dist/Inkt/Role/MetaProvides.pm", "version" : "0.023" }, "Dist::Inkt::Role::MetaProvidesScripts" : { "file" : "lib/Dist/Inkt/Role/MetaProvidesScripts.pm", "version" : "0.023" }, "Dist::Inkt::Role::SignDistribution" : { "file" : "lib/Dist/Inkt/Role/SignDistribution.pm", "version" : "0.023" }, "Dist::Inkt::Role::WriteDOAPLite" : { "file" : "lib/Dist/Inkt/Role/WriteDOAPLite.pm", "version" : "0.023" }, "Dist::Inkt::Role::WriteINSTALL" : { "file" : "lib/Dist/Inkt/Role/WriteINSTALL.pm", "version" : "0.023" }, "Dist::Inkt::Role::WriteLICENSE" : { "file" : "lib/Dist/Inkt/Role/WriteLICENSE.pm", "version" : "0.023" }, "Dist::Inkt::Role::WriteMakefilePL" : { "file" : "lib/Dist/Inkt/Role/WriteMakefilePL.pm", "version" : "0.023" }, "Dist::Inkt::Role::WriteMetaJSON" : { "file" : "lib/Dist/Inkt/Role/WriteMetaJSON.pm", "version" : "0.023" }, "Dist::Inkt::Role::WriteMetaYML" : { "file" : "lib/Dist/Inkt/Role/WriteMetaYML.pm", "version" : "0.023" }, "Dist::Inkt::Role::WriteREADME" : { "file" : "lib/Dist/Inkt/Role/WriteREADME.pm", "version" : "0.023" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "http://rt.cpan.org/Dist/Display.html?Queue=Dist-Inkt" }, "homepage" : "https://metacpan.org/release/Dist-Inkt", "license" : [ "http://dev.perl.org/licenses/" ], "repository" : { "type" : "git", "url" : "git://github.com/tobyink/p5-dist-inkt.git", "web" : "https://github.com/tobyink/p5-dist-inkt" }, "x_identifier" : "http://purl.org/NET/cpan-uri/dist/Dist-Inkt/project", "x_wiki" : "https://github.com/tobyink/p5-dist-inkt/wiki" }, "version" : "0.023", "x_help_wanted" : [ "tester", "documenter" ], "x_provides_scripts" : { "distinkt-dist" : { "file" : "bin/distinkt-dist" }, "distinkt-travisyml" : { "file" : "bin/distinkt-travisyml" } } } META.yml000664001750001750 602012406251327 13374 0ustar00taitai000000000000Dist-Inkt-0.023--- abstract: 'yet another distribution builder' author: - 'Toby Inkster (TOBYINK) ' build_requires: Test::More: '0.96' configure_requires: ExtUtils::MakeMaker: '6.17' dynamic_config: 0 generated_by: 'Dist::Inkt::Profile::TOBYINK version 0.022, CPAN::Meta::Converter version 2.140640' keywords: - CPAN - Distribution - Package - Perl - Release license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Dist-Inkt no_index: directory: - eg - examples - inc - t - xt optional_features: {} provides: Dist::Inkt: file: lib/Dist/Inkt.pm version: '0.023' Dist::Inkt::Profile::Simple: file: lib/Dist/Inkt/Profile/Simple.pm version: '0.023' Dist::Inkt::Role::CPANfile: file: lib/Dist/Inkt/Role/CPANfile.pm version: '0.023' Dist::Inkt::Role::CopyFiles: file: lib/Dist/Inkt/Role/CopyFiles.pm version: '0.023' Dist::Inkt::Role::CopyStandardDocuments: file: lib/Dist/Inkt/Role/CopyStandardDocuments.pm version: '0.023' Dist::Inkt::Role::MetaProvides: file: lib/Dist/Inkt/Role/MetaProvides.pm version: '0.023' Dist::Inkt::Role::MetaProvidesScripts: file: lib/Dist/Inkt/Role/MetaProvidesScripts.pm version: '0.023' Dist::Inkt::Role::SignDistribution: file: lib/Dist/Inkt/Role/SignDistribution.pm version: '0.023' Dist::Inkt::Role::WriteDOAPLite: file: lib/Dist/Inkt/Role/WriteDOAPLite.pm version: '0.023' Dist::Inkt::Role::WriteINSTALL: file: lib/Dist/Inkt/Role/WriteINSTALL.pm version: '0.023' Dist::Inkt::Role::WriteLICENSE: file: lib/Dist/Inkt/Role/WriteLICENSE.pm version: '0.023' Dist::Inkt::Role::WriteMakefilePL: file: lib/Dist/Inkt/Role/WriteMakefilePL.pm version: '0.023' Dist::Inkt::Role::WriteMetaJSON: file: lib/Dist/Inkt/Role/WriteMetaJSON.pm version: '0.023' Dist::Inkt::Role::WriteMetaYML: file: lib/Dist/Inkt/Role/WriteMetaYML.pm version: '0.023' Dist::Inkt::Role::WriteREADME: file: lib/Dist/Inkt/Role/WriteREADME.pm version: '0.023' requires: CPAN::Changes: '0' CPAN::Meta: '0' CPAN::Meta::Requirements: '0' Data::Dump: '0' File::chdir: '0' List::MoreUtils: '0' Module::CPANfile: '1.0002' Module::Metadata: '0' Module::Runtime: '0' Module::Signature: '0' Moose: '2.0800' Path::FindDev: '0' Path::Iterator::Rule: '0' Path::Tiny: '0' RDF::DOAP::Lite: '0' Software::License: '0' Types::Path::Tiny: '0' Types::Standard: '0' namespace::autoclean: '0' perl: '5.010001' resources: Identifier: http://purl.org/NET/cpan-uri/dist/Dist-Inkt/project Wiki: https://github.com/tobyink/p5-dist-inkt/wiki bugtracker: http://rt.cpan.org/Dist/Display.html?Queue=Dist-Inkt homepage: https://metacpan.org/release/Dist-Inkt license: http://dev.perl.org/licenses/ repository: git://github.com/tobyink/p5-dist-inkt.git version: '0.023' x_help_wanted: - tester - documenter x_provides_scripts: distinkt-dist: file: bin/distinkt-dist distinkt-travisyml: file: bin/distinkt-travisyml Makefile.PL000664001750001750 2154012406251330 14113 0ustar00taitai000000000000Dist-Inkt-0.023use strict; use ExtUtils::MakeMaker 6.17; my $EUMM = eval( $ExtUtils::MakeMaker::VERSION ); my $meta = { "abstract" => "yet another distribution builder", "author" => ["Toby Inkster (TOBYINK) "], "dynamic_config" => 0, "generated_by" => "Dist::Inkt::Profile::TOBYINK version 0.022, CPAN::Meta::Converter version 2.140640", "keywords" => ["CPAN", "Distribution", "Package", "Perl", "Release"], "license" => ["perl_5"], "meta-spec" => { url => "http://search.cpan.org/perldoc?CPAN::Meta::Spec", version => 2, }, "name" => "Dist-Inkt", "no_index" => { directory => ["eg", "examples", "inc", "t", "xt"] }, "prereqs" => { configure => { requires => { "ExtUtils::MakeMaker" => 6.17 } }, runtime => { requires => { "CPAN::Changes" => 0, "CPAN::Meta" => 0, "CPAN::Meta::Requirements" => 0, "Data::Dump" => 0, "File::chdir" => 0, "List::MoreUtils" => 0, "Module::CPANfile" => 1.0002, "Module::Metadata" => 0, "Module::Runtime" => 0, "Module::Signature" => 0, "Moose" => "2.0800", "namespace::autoclean" => 0, "Path::FindDev" => 0, "Path::Iterator::Rule" => 0, "Path::Tiny" => 0, "perl" => 5.010001, "RDF::DOAP::Lite" => 0, "Software::License" => 0, "Types::Path::Tiny" => 0, "Types::Standard" => 0, }, }, test => { requires => { "Test::More" => 0.96 } }, }, "provides" => { "Dist::Inkt" => { file => "lib/Dist/Inkt.pm", version => 0.023 }, "Dist::Inkt::Profile::Simple" => { file => "lib/Dist/Inkt/Profile/Simple.pm", version => 0.023 }, "Dist::Inkt::Role::CopyFiles" => { file => "lib/Dist/Inkt/Role/CopyFiles.pm", version => 0.023 }, "Dist::Inkt::Role::CopyStandardDocuments" => { file => "lib/Dist/Inkt/Role/CopyStandardDocuments.pm", version => 0.023, }, "Dist::Inkt::Role::CPANfile" => { file => "lib/Dist/Inkt/Role/CPANfile.pm", version => 0.023 }, "Dist::Inkt::Role::MetaProvides" => { file => "lib/Dist/Inkt/Role/MetaProvides.pm", version => 0.023 }, "Dist::Inkt::Role::MetaProvidesScripts" => { file => "lib/Dist/Inkt/Role/MetaProvidesScripts.pm", version => 0.023, }, "Dist::Inkt::Role::SignDistribution" => { file => "lib/Dist/Inkt/Role/SignDistribution.pm", version => 0.023 }, "Dist::Inkt::Role::WriteDOAPLite" => { file => "lib/Dist/Inkt/Role/WriteDOAPLite.pm", version => 0.023 }, "Dist::Inkt::Role::WriteINSTALL" => { file => "lib/Dist/Inkt/Role/WriteINSTALL.pm", version => 0.023 }, "Dist::Inkt::Role::WriteLICENSE" => { file => "lib/Dist/Inkt/Role/WriteLICENSE.pm", version => 0.023 }, "Dist::Inkt::Role::WriteMakefilePL" => { file => "lib/Dist/Inkt/Role/WriteMakefilePL.pm", version => 0.023 }, "Dist::Inkt::Role::WriteMetaJSON" => { file => "lib/Dist/Inkt/Role/WriteMetaJSON.pm", version => 0.023 }, "Dist::Inkt::Role::WriteMetaYML" => { file => "lib/Dist/Inkt/Role/WriteMetaYML.pm", version => 0.023 }, "Dist::Inkt::Role::WriteREADME" => { file => "lib/Dist/Inkt/Role/WriteREADME.pm", version => 0.023 }, }, "release_status" => "stable", "resources" => { bugtracker => { web => "http://rt.cpan.org/Dist/Display.html?Queue=Dist-Inkt" }, homepage => "https://metacpan.org/release/Dist-Inkt", license => ["http://dev.perl.org/licenses/"], repository => { type => "git", url => "git://github.com/tobyink/p5-dist-inkt.git", web => "https://github.com/tobyink/p5-dist-inkt", }, x_identifier => "http://purl.org/NET/cpan-uri/dist/Dist-Inkt/project", x_wiki => "https://github.com/tobyink/p5-dist-inkt/wiki", }, "version" => 0.023, "x_help_wanted" => ["tester", "documenter"], "x_provides_scripts" => { "distinkt-dist" => { file => "bin/distinkt-dist" }, "distinkt-travisyml" => { file => "bin/distinkt-travisyml" }, }, }; my %dynamic_config; my %WriteMakefileArgs = ( ABSTRACT => $meta->{abstract}, AUTHOR => ($EUMM >= 6.5702 ? $meta->{author} : $meta->{author}[0]), DISTNAME => $meta->{name}, VERSION => $meta->{version}, EXE_FILES => [ map $_->{file}, values %{ $meta->{x_provides_scripts} || {} } ], NAME => do { my $n = $meta->{name}; $n =~ s/-/::/g; $n }, test => { TESTS => "t/*.t" }, %dynamic_config, ); $WriteMakefileArgs{LICENSE} = $meta->{license}[0] if $EUMM >= 6.3001; sub deps { my %r; for my $stage (@_) { for my $dep (keys %{$meta->{prereqs}{$stage}{requires}}) { next if $dep eq 'perl'; my $ver = $meta->{prereqs}{$stage}{requires}{$dep}; $r{$dep} = $ver if !exists($r{$dep}) || $ver >= $r{$dep}; } } \%r; } my ($build_requires, $configure_requires, $runtime_requires, $test_requires); if ($EUMM >= 6.6303) { $WriteMakefileArgs{BUILD_REQUIRES} ||= deps('build'); $WriteMakefileArgs{CONFIGURE_REQUIRES} ||= deps('configure'); $WriteMakefileArgs{TEST_REQUIRES} ||= deps('test'); $WriteMakefileArgs{PREREQ_PM} ||= deps('runtime'); } elsif ($EUMM >= 6.5503) { $WriteMakefileArgs{BUILD_REQUIRES} ||= deps('build', 'test'); $WriteMakefileArgs{CONFIGURE_REQUIRES} ||= deps('configure'); $WriteMakefileArgs{PREREQ_PM} ||= deps('runtime'); } elsif ($EUMM >= 6.52) { $WriteMakefileArgs{CONFIGURE_REQUIRES} ||= deps('configure'); $WriteMakefileArgs{PREREQ_PM} ||= deps('runtime', 'build', 'test'); } else { $WriteMakefileArgs{PREREQ_PM} ||= deps('configure', 'build', 'test', 'runtime'); } { my ($minperl) = reverse sort( grep defined && /^[0-9]+(\.[0-9]+)?$/, map $meta->{prereqs}{$_}{requires}{perl}, qw( configure build runtime ) ); if (defined($minperl)) { die "Installing $meta->{name} requires Perl >= $minperl" unless $] >= $minperl; $WriteMakefileArgs{MIN_PERL_VERSION} ||= $minperl if $EUMM >= 6.48; } } sub FixMakefile { return unless -d 'inc'; my $file = shift; local *MAKEFILE; open MAKEFILE, "< $file" or die "FixMakefile: Couldn't open $file: $!; bailing out"; my $makefile = do { local $/; }; close MAKEFILE or die $!; $makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /; $makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g; $makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g; $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m; $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m; open MAKEFILE, "> $file" or die "FixMakefile: Couldn't open $file: $!; bailing out"; print MAKEFILE $makefile or die $!; close MAKEFILE or die $!; } my $mm = WriteMakefile(%WriteMakefileArgs); FixMakefile($mm->{FIRST_MAKEFILE} || 'Makefile'); exit(0); README000664001750001750 470312406251317 13010 0ustar00taitai000000000000Dist-Inkt-0.023NAME Dist::Inkt - yet another distribution builder STATUS Experimental. DESCRIPTION Dist::Zilla didn't have the prerequisite amount of crazy for me, so I wrote this instead. Dist::Inkt itself does virtually nothing; it creates an empty directory, generates a MANIFEST file, and then wraps it all up into a gzipped tarball. But it provides various hooks along the way for subclasses to grab hold of. So the general idea is that you write a subclass of Dist::Inkt, which consumes various Moose::Roles to do the actual work of populating the distribution with files. As such, Dist::Inkt is not so much a distribution builder, as it is a framework for writing your own distribution builder. Several roles of varying utility are bundled with Dist::Inkt, as is Dist::Inkt::Profile::Simple, a subclass of Dist::Inkt which consumes most of these roles. COMPANIONS Dist::Inkt does just one thing - building the tarball from some checkout of the repo. Although roles could theoretically be written for other tasks, out of the box, Dist::Inkt doesn't do any of the following: Minting new distributions I'm writing a separate tool, Dist::Inktly::Minty for that. Test suite running Use App::Prove or App::ForkProve. CPAN Uploading Use CPAN::Uploader. Changing the version number across many files Use Perl::Version. Integration with version control tools Just use `hg` or `svn` or `git` of whatever as you normally would. None of the files generated by Dist::Inkt should probably be checked into your repo. BUGS Please report any bugs to . SEE ALSO If you are not me, then you may well want one of these instead: * Dist::Zilla * Dist::Milla * Minilla Various extensions for Dist::Inkt: * Dist::Inkt::DOAP * Dist::Inkt::Profile::TOBYINK AUTHOR Toby Inkster . COPYRIGHT AND LICENCE This software is copyright (c) 2013-2014 by Toby Inkster. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. DISCLAIMER OF WARRANTIES THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. SIGNATURE000664001750001750 617212406251331 13412 0ustar00taitai000000000000Dist-Inkt-0.023This file contains message digests of all files listed in MANIFEST, signed via the Module::Signature module, version 0.73. To verify the content in this distribution, first make sure you have Module::Signature installed, then type: % cpansign -v It will check each file's integrity, as well as the signature's validity. If "==> Signature verified OK! <==" is not displayed, the distribution may already have been compromised, and you should not run its Makefile.PL or Build.PL. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 SHA1 33317486c4fa2cf7fec85bf92ed38ac0f64233a0 CONTRIBUTING SHA1 a020c898602ea858a82975e83264e99fb785278e COPYRIGHT SHA1 fcc0855cf164ac1fe3b59e6c6aee83afc2624e37 CREDITS SHA1 2cfa752abef50333bdb9d63824b8f1f9faaa107b Changes SHA1 dcd4206242b4a950ac03e6ce2bdb9e51d89ba817 INSTALL SHA1 34f5e12514b91055de4b164a1f2327ef5c30ba53 LICENSE SHA1 99ace97e8366b8c24484b0ba8f6c29bafc355594 MANIFEST SHA1 eef6705b5ecc776a72de476c9b0918fbfb5c84a8 META.json SHA1 8eb44810cb07b3fa8ba2ad4f9c27d4f8a0fa4287 META.yml SHA1 673422e5aae02ed608b76ad73d863f874c7dfc95 Makefile.PL SHA1 40616f90fbef6ba6e868703ca78726c4b7100a9c README SHA1 5ba76616e3d569942971a08fb82e9ce13ba950e4 bin/distinkt-dist SHA1 33c68bcd6f6bf9cea1a3530d0278856bb621e61d bin/distinkt-travisyml SHA1 ca02c63e94f49d94b46fe19ab88b401ad63a6cf2 dist.ini SHA1 f599290ffd63daed5e1aea3a13fb0204d21d35eb doap.ttl SHA1 82c7c07e605d952cbe2f3516c98c290282c3c0de examples/p5-acme-example-dist/cpanfile SHA1 a690b388032c6a3f4ee2e39be738fe9e35eb3130 examples/p5-acme-example-dist/dist.ini SHA1 e47ef7ecef48b27d0d9467b59d2ce15ff8f71d32 examples/p5-acme-example-dist/lib/Acme/Example/Dist.pm SHA1 b4c6387b21ed54fa72c5cba9646292bb0a725781 examples/p5-acme-example-dist/t/01basic.t SHA1 286531cf64576cb09095537059336eb3cabff89e lib/Dist/Inkt.pm SHA1 a0efbe1406071a94c5bdbf9cf7e2ddb80cf6f366 lib/Dist/Inkt/Profile/Simple.pm SHA1 454089ac28f2302e7d94aa29d8185018b756e736 lib/Dist/Inkt/Role/CPANfile.pm SHA1 5ad54843095bd9a888d998182d37c0fa2aa489ba lib/Dist/Inkt/Role/CopyFiles.pm SHA1 b7aaa2c55699cb925259af33d4f21001da6b063c lib/Dist/Inkt/Role/CopyStandardDocuments.pm SHA1 1b734778b1f5a093b29d1847778446c263e26bd3 lib/Dist/Inkt/Role/MetaProvides.pm SHA1 72f1ff30fe19946a36352eb54a399cddd91a52af lib/Dist/Inkt/Role/MetaProvidesScripts.pm SHA1 6abbaf54b9000d6d4876543922da4323c3edfff6 lib/Dist/Inkt/Role/SignDistribution.pm SHA1 6b9eb591e28ac0802f42387a4db85db8ab8ae5a3 lib/Dist/Inkt/Role/WriteDOAPLite.pm SHA1 8b8f0fe30d62d9b30aabc79ac27f896e7a3ae872 lib/Dist/Inkt/Role/WriteINSTALL.pm SHA1 b1d208ec4474371be8092a961ee5fb7060b7287c lib/Dist/Inkt/Role/WriteLICENSE.pm SHA1 84b1437f959117a1848788fd2790ccd32f749933 lib/Dist/Inkt/Role/WriteMakefilePL.pm SHA1 c714a1373faf1d0889c7dd79939fe0c526eefb3f lib/Dist/Inkt/Role/WriteMetaJSON.pm SHA1 7085199e764f23b038dfa8c8c4a769c67458714f lib/Dist/Inkt/Role/WriteMetaYML.pm SHA1 b32e55ed52c858647cf9709aeadbffc266e8bf14 lib/Dist/Inkt/Role/WriteREADME.pm SHA1 70cfda8dedef237f2ac1ba42bd929dd1c5e29a4e t/01basic.t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlQZUtgACgkQzr+BKGoqfTl3RgCfXy3NTGzxJtd3cWhuWf2K31/L Z3wAoIHANUiGwgADwFuoeYPkAhKBJpxX =pwv/ -----END PGP SIGNATURE----- dist.ini000664001750001750 14612406251317 13551 0ustar00taitai000000000000Dist-Inkt-0.023; Configuration file for Dist::Inkt ; ;; class = 'Dist::Inkt::Profile::TOBYINK' ;; name = 'Dist-Inkt' doap.ttl000664001750001750 5033312406251327 13621 0ustar00taitai000000000000Dist-Inkt-0.023@prefix cpan-uri: . @prefix dc: . @prefix doap: . @prefix doap-changeset: . @prefix doap-deps: . @prefix foaf: . @prefix rdfs: . @prefix xsd: . dc:title "the same terms as the perl 5 programming language system itself". a doap:Project; cpan-uri:x_help_wanted , ; dc:contributor ; doap-deps:runtime-requirement [ doap-deps:on "CPAN::Changes 0"^^doap-deps:CpanId ], [ doap-deps:on "CPAN::Meta 0"^^doap-deps:CpanId ], [ doap-deps:on "Moose 2.0800"^^doap-deps:CpanId ], [ doap-deps:on "Path::Iterator::Rule 0"^^doap-deps:CpanId; ], [ doap-deps:on "Path::Tiny 0"^^doap-deps:CpanId ], [ doap-deps:on "Path::FindDev 0"^^doap-deps:CpanId ], [ doap-deps:on "RDF::DOAP::Lite 0"^^doap-deps:CpanId ], [ doap-deps:on "Software::License 0"^^doap-deps:CpanId; ], [ doap-deps:on "Types::Path::Tiny 0"^^doap-deps:CpanId; ], [ doap-deps:on "Types::Standard 0"^^doap-deps:CpanId ], [ doap-deps:on "namespace::autoclean 0"^^doap-deps:CpanId; ], [ doap-deps:on "perl 5.010001"^^doap-deps:CpanId ], [ doap-deps:on "CPAN::Meta::Requirements"^^doap-deps:CpanId; ], [ doap-deps:on "Data::Dump 0"^^doap-deps:CpanId ], [ doap-deps:on "File::chdir 0"^^doap-deps:CpanId ], [ doap-deps:on "List::MoreUtils 0"^^doap-deps:CpanId ], [ doap-deps:on "Module::CPANfile 1.0002"^^doap-deps:CpanId; ], [ doap-deps:on "Module::Metadata 0"^^doap-deps:CpanId ], [ doap-deps:on "Module::Signature 0"^^doap-deps:CpanId; ], [ doap-deps:on "Module::Runtime 0"^^doap-deps:CpanId ]; doap-deps:test-requirement [ doap-deps:on "Test::More 0.96"^^doap-deps:CpanId ]; doap:bug-database ; doap:category [ rdfs:label "CPAN" ], [ rdfs:label "Perl" ], [ rdfs:label "Package" ], [ rdfs:label "Distribution" ], [ rdfs:label "Release" ]; doap:created "2013-08-07"^^xsd:date; doap:developer ; doap:download-page ; doap:homepage ; doap:license ; doap:maintainer ; doap:name "Dist-Inkt"; doap:programming-language "Perl"; doap:release , , , , , , , , , , , , , , , , , , , , , , ; doap:repository [ a doap:GitRepository; doap:browse ; ]; doap:shortdesc "yet another distribution builder"; doap:wiki . a doap:Version; rdfs:label "Initial release"; dc:identifier "Dist-Inkt-0.001"^^xsd:string; dc:issued "2013-08-09"^^xsd:date; doap-changeset:released-by ; doap:file-release ; doap:revision "0.001"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-0.002"^^xsd:string; dc:issued "2013-08-09"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Change; rdfs:label "Add shebang to `bin/distinkt-dist`."; ], [ a doap-changeset:Change; rdfs:label "Avoid creating empty 'x_contributors' keys in META.json/META.yml."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.002"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-0.003"^^xsd:string; dc:issued "2013-08-10"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Change; rdfs:label "Don't pass ExtUtils::MakeMaker the AUTHOR as an arrayref unless its version number >= 6.5702."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.003"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-0.004"^^xsd:string; dc:issued "2013-08-10"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Change; rdfs:label "Attempt to support ExtUtils::MakeMaker 6.17. Don't pass WriteMakefile a LICENSE unless EUMM >= 6.3001; don't pass it a DISTVNAME at all."; ], [ a doap-changeset:Change; rdfs:label "For ExtUtils::MakeMaker versions that don't support TEST_REQUIRES, bundle it in with BUILD_REQUIRES, not CONFIGURE_REQUIRES."; ], [ a doap-changeset:Change; rdfs:label "For ExtUtils::MakeMaker versions that don't support BUILD_REQUIRES, bundle it in with PREREQ_PM, not CONFIGURE_REQUIRES."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.004"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-0.005"^^xsd:string; dc:issued "2013-08-13"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Update; rdfs:label "Use the shiny, new RDF::DOAP for a lot of the behind-the-scenes DOAP processing."; ], [ a doap-changeset:Addition; rdfs:label "Support the `x_help_wanted` key for META.json/META.yml."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.005"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-0.006"^^xsd:string; dc:issued "2013-08-13"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Change; rdfs:label "Guess some copyrights for the COPYRIGHT file."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.006"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-0.007"^^xsd:string; dc:issued "2013-08-27"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Change; rdfs:label "Rename META.ttl -> doap.ttl."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.007"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-0.008"^^xsd:string; dc:issued "2013-09-06"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Change; rdfs:label "Perform conflicts checking in Makefile.PL."; ], [ a doap-changeset:Change; rdfs:label "Add `x_breaks` key to META.json if appropriate."; ], [ a doap-changeset:Change; rdfs:label "Don't add `x_provides_scripts` to META.json unless scripts are actually provided."; ], [ a doap-changeset:Change; rdfs:label "Allow `source_for_readme` to be set in Dist::Inkt constructor (and thus in dist.ini)."; ], [ a doap-changeset:Packaging; rdfs:label "Depend on a newer version of RDF::DOAP, thus we get more awesome Changes files."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.008"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-0.009"^^xsd:string; dc:issued "2013-09-06"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Bugfix; rdfs:label "Correct %script to %scripts in Dist::Inkt::Role::MetaProvidesScripts."; ], [ a doap-changeset:Bugfix; rdfs:label "Replace => with = in assignment in Makefile.PL."; doap-changeset:thanks ; ], [ a doap-changeset:Bugfix; rdfs:label "Make sure EUMM $VERSION gets evaled."; doap-changeset:thanks ; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.009"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-0.010"^^xsd:string; dc:issued "2013-09-11"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Update; rdfs:label "Support `feature` property from DOAP deps."; ], [ a doap-changeset:Addition; rdfs:label "Output optional_features in META.json."; ], [ a doap-changeset:Addition; rdfs:label "Use dynamic config in Makefile.PL to add dependencies for optional features."; ], [ a doap-changeset:Addition; rdfs:label "Output an INSTALL file."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.010"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-0.011"^^xsd:string; dc:issued "2013-09-19"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Bugfix; rdfs:label "META.json/yml license codes now conform to CPAN::Meta::Spec 2.0 instead of META-spec 1.4."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.011"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-0.012"^^xsd:string; dc:issued "2013-09-19"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Bugfix; rdfs:label "Generating LICENSE files now understands CPAN::Meta::Spec 2.0 license codes."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.012"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-0.013"^^xsd:string; dc:issued "2013-09-22"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Change; rdfs:label "Generated Makefile.PL performs a better check for minimum Perl version."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.013"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-0.014"^^xsd:string; dc:issued "2014-01-21"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Change; rdfs:label "Generated Makefile.PL explicitly lists test suite directories."; ], [ a doap-changeset:Change; rdfs:label "Use Path::Tiny's `subsumes` method over home-brew version."; ], [ a doap-changeset:Addition; rdfs:label "Bundle a `distinkt-travisyml` script to automate creating .travis.yml files."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.014"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-0.015"^^xsd:string; dc:issued "2014-03-10"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Change; rdfs:label "Guess repository details from repository web URL for github.com."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.015"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-0.016"^^xsd:string; dc:issued "2014-05-26"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Packaging; rdfs:label "Split out a lot of functionality into Dist-Inkt-DOAP."; ], [ a doap-changeset:Addition; rdfs:label "Dist::Inkt::Profile::Simple."; ], [ a doap-changeset:Addition; rdfs:label "Dist::Inkt::Role::CPANfile."; ], [ a doap-changeset:Addition; rdfs:label "Dist::Inkt::Role::WriteDOAPLite."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.016"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-0.017"^^xsd:string; dc:issued "2014-05-26"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Change; rdfs:label "Simplify usage of Dist::Inkt::Profile::Simple, and example."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.017"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-0.018"^^xsd:string; dc:issued "2014-06-14"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Packaging; rdfs:label "Add missing File::chdir dependency."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.018"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-0.019"^^xsd:string; dc:issued "2014-06-15"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Packaging; rdfs:label "Add missing Path::FindDev dependency."; ], [ a doap-changeset:Change; rdfs:label "Cope when ~/perl5/standard-documents/ is missing."; ], [ a doap-changeset:Change; rdfs:label "Support PERL_DIST_INKT_NOSIGNATURE environment variable to skip building a SIGNATURE file."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.019"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-0.020"^^xsd:string; dc:issued "2014-06-16"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Change; rdfs:label "Improvements to command line scripts."; ], [ a doap-changeset:Change; rdfs:label "Better integration with haarg's perl-travis-helper stuff."; ], [ a doap-changeset:Documentation; rdfs:label "Added stub pod to command line scripts."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.020"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-0.021"^^xsd:string; dc:issued "2014-06-19"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Documentation; rdfs:label "Fix documentation of the `--TRAVIS` option."; ], [ a doap-changeset:Change; rdfs:label "Generated Makefile.PL should cope better if CPAN::Meta::Requirements is missing."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.021"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-0.022"^^xsd:string; dc:issued "2014-06-19"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Bugfix; rdfs:label "Fix check for existence of meta/META.PL."; ], [ a doap-changeset:Change; rdfs:label "Filter $meta->{provides} using $meta->{no_index}."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.022"^^xsd:string. a doap:Version; dc:identifier "Dist-Inkt-0.023"^^xsd:string; dc:issued "2014-09-17"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Change; rdfs:label "Improve command-line option handling."; ], [ a doap-changeset:Change; rdfs:label "Avoid outputting anonymous class names."; ]; ]; doap-changeset:released-by ; doap:file-release ; doap:revision "0.023"^^xsd:string. a foaf:Person; foaf:name "Graham Knop"; foaf:nick "HAARG"; foaf:page . a foaf:Person; foaf:mbox ; foaf:name "Toby Inkster"; foaf:nick "TOBYINK"; foaf:page . distinkt-dist000664001750001750 333412406251317 15414 0ustar00taitai000000000000Dist-Inkt-0.023/bin#!/usr/bin/env perl use strict; use warnings; use Cwd qw(cwd); use File::chdir; use Path::FindDev qw(find_dev); local($CWD) = find_dev(cwd); my %travis_opts = ( should_sign => 0, should_compress => 0, should_release => 0, skip_prebuild_tests => 1, skip_build_tests => 1, skip_tarball_tests => 1, ); my %opts = map { /^--TRAVIS$/ ? (%travis_opts) : /^--(\w+)=(.+)$/ ? ($1 => $2) : /^--(\w+)$/ ? ($1 => 1) : die("Unrecognized argument: $_"); } @ARGV; require Dist::Inkt; my $dist = 'Dist::Inkt'->new_from_ini(undef, %opts); $dist->BuildAll; exit(0); __END__ =pod =encoding utf-8 =for stopwords gzipped tarball distinkt-dist --targetdir --travis =head1 NAME distinkt-dist - build a tarball for a Dist::Inkt-based distribution =head1 SYNOPSIS distinkt-dist [OPTIONS] =head1 DESCRIPTION Supported options: =over =item B<< --targetdir=Str >> Defaults to "$name-$version". =item B<< --should_compress=Bool >> Defaults to true. =item B<< --should_sign=Bool >> Defaults to true. =item B<< --TRAVIS >> Shortcut for C<< --should_sign=0 --should_compress=0 >>. =back By rooting through the source code for Dist::Inkt you may be able to find other options that might or might not work. =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT AND LICENCE This software is copyright (c) 2013-2014 by Toby Inkster. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =head1 DISCLAIMER OF WARRANTIES THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. distinkt-travisyml000664001750001750 230512406251317 16500 0ustar00taitai000000000000Dist-Inkt-0.023/bin#!/usr/bin/env perl use strict; use warnings; use Cwd qw(cwd); use File::chdir; use Path::FindDev qw(find_dev); local($CWD) = find_dev(cwd); my %opts = map { /^--TRAVIS$/ ? (should_sign => 0, should_compress => 0) : /^--(\w+)=(.+)$/ ? ($1 => $2) : die("Unrecognized argument: $_"); } @ARGV; require Dist::Inkt; my $dist = 'Dist::Inkt'->new_from_ini(undef, %opts); $dist->BuildTravisYml; exit(0); __END__ =pod =encoding utf-8 =for stopwords gzipped tarball distinkt-travisyml =head1 NAME distinkt-travisyml - build a Travis-CI config file for a Dist::Inkt-based distribution =head1 SYNOPSIS distinkt-travisyml =head1 DESCRIPTION After generating the file, you probably want to tweak it by hand. =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT AND LICENCE This software is copyright (c) 2014 by Toby Inkster. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =head1 DISCLAIMER OF WARRANTIES THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 01basic.t000664001750001750 66412406251317 13764 0ustar00taitai000000000000Dist-Inkt-0.023/t=pod =encoding utf-8 =head1 PURPOSE Test that Dist::Inkt compiles. =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT AND LICENCE This software is copyright (c) 2013 by Toby Inkster. 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 use strict; use warnings; use Test::More; use_ok('Dist::Inkt'); done_testing; cpanfile000664001750001750 6712406251317 21232 0ustar00taitai000000000000Dist-Inkt-0.023/examples/p5-acme-example-distrequires 'JSON', '2.50'; recommends 'JSON::XS', '3.0'; dist.ini000664001750001750 33712406251317 21212 0ustar00taitai000000000000Dist-Inkt-0.023/examples/p5-acme-example-dist;;class = 'Dist::Inkt::Profile::Simple' ;;name = 'Acme-Example-Dist' ;;abstract = 'a distribution that does something-or-other' ;;author = [ 'Joe Bloggs ' ] ;;license = [ 'perl_5' ] Inkt.pm000664001750001750 2321312406251317 15061 0ustar00taitai000000000000Dist-Inkt-0.023/lib/Distpackage Dist::Inkt; use 5.010001; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.023'; use Moose; use Module::Metadata; use List::MoreUtils qw(uniq); use Types::Standard -types; use Types::Path::Tiny -types; use Path::Tiny 'path'; use Path::Iterator::Rule; use Module::Runtime qw(use_package_optimistically); use namespace::autoclean; sub builder_id { my $real_class = shift->_real_class; sprintf('%s version %s', $real_class, $real_class->VERSION); } sub _real_class { my $self = shift; my ($real_class) = grep !/__ANON__/, Moose::Util::find_meta($self)->class_precedence_list; $real_class; } has name => ( is => 'ro', isa => Str, required => 1, ); has lead_module => ( is => 'ro', isa => Str, lazy => 1, builder => '_build_lead_module', ); sub _build_lead_module { my $self = shift; (my $name = $self->name) =~ s/-/::/g; return $name; } has version => ( is => 'ro', isa => Str, lazy => 1, builder => '_build_version', ); sub _build_version { my $self = shift; my $mm = 'Module::Metadata'->new_from_module( $self->lead_module, inc => [$self->sourcefile('lib')], ); return $mm->{version}{original}; } has rootdir => ( is => 'ro', isa => AbsDir, required => 1, coerce => 1, handles => { sourcefile => 'child', }, ); has targetdir_pattern => ( is => 'ro', isa => Str, lazy => 1, builder => '_build_targetdir_pattern', ); sub _build_targetdir_pattern { '%(name)s-%(version)s' } has targetdir => ( is => 'ro', isa => Path, lazy => 1, coerce => 1, builder => '_build_targetdir', handles => { targetfile => 'child', cleartarget => 'remove_tree', }, ); sub _build_targetdir { my $self = shift; require Text::sprintfn; my $name = Text::sprintfn::sprintfn( $self->targetdir_pattern, { name => $self->name, version => $self->version, }, ); $self->rootdir->child($name); } has metadata => ( is => 'ro', isa => InstanceOf['CPAN::Meta'], lazy => 1, builder => '_build_metadata', ); sub _build_metadata { require CPAN::Meta; my $self = shift; my $meta = 'CPAN::Meta'->new({ name => $self->name, version => $self->version, no_index => { directory => [qw/ eg examples inc t xt /] }, generated_by => $self->builder_id, dynamic_config => 0, }); for (qw/ license author /) { $meta->{$_} = [] if @{$meta->{$_}}==1 && $meta->{$_}[0] eq 'unknown'; } if ($self->sourcefile('meta/META.PL')->exists) { local $_ = $meta; my $filename = $self->sourcefile('meta/META.PL')->absolute->stringify; do($filename); } return $meta; } has project_uri => ( is => 'ro', isa => Str, lazy => 1, builder => '_build_project_uri', ); sub _build_project_uri { my $self = shift; sprintf('http://purl.org/NET/cpan-uri/dist/%s/project', $self->name); } has targets => ( is => 'ro', isa => ArrayRef[Str], builder => '_build_targets', ); sub _build_targets { [] } has rights_for_generated_files => ( is => 'ro', isa => HashRef[ArrayRef], default => sub { +{ COPYRIGHT => [ 'None' => 'public-domain' ], }; }, ); sub _inherited_rights {} sub new_from_ini { my $self = shift; my $ini = shift; my (%args) = @_; if (defined $ini) { $ini = File->assert_coerce($ini); } else { require Cwd; $ini = path(Cwd::cwd)->child('dist.ini'); $ini->exists or confess("Could not find dist.ini; bailing out"); } my @lines = grep /^;;/, $ini->lines_utf8; chomp @lines; my %config = map { s/(?:^;;\s*)|(?:\s*$)//g; my ($key, $value) = split /\s*=\s*/, $_, 2; $key => scalar(eval($value)); } @lines; my $class = delete($config{class}) || 'Dist::Inkt::Profile::Simple'; $config{rootdir} ||= $ini->dirname; use_package_optimistically($class)->new(%config, %args); } sub BUILD { my $self = shift; return if $self->{_already_built}++; $self->PopulateModel; $self->PopulateMetadata; my $die = 0; my $l = $self->metadata->{license}; unless ($l and ref($l) eq 'ARRAY' and @$l and $l->[0] ne 'unknown') { $self->log("ERROR: licence unknown!"); $die++; } my $a = $self->metadata->{author}; unless ($a and ref($a) eq 'ARRAY' and @$a and $a->[0] ne 'unknown') { $self->log("ERROR: author unknown!"); $die++; } my $b = $self->metadata->{abstract}; unless (defined($b) and $b ne 'unknown') { $self->log("ERROR: abstract unknown!"); $die++; } die "Incomplete metadata; stopped" if $die; } sub PopulateModel {} sub PopulateMetadata {} sub BuildTargets { my $self = shift; $self->cleartarget; $self->targetdir->mkpath; $self->Build_Files if $self->DOES('Dist::Inkt::Role::CopyFiles'); for my $target (uniq @{ $self->targets }) { next if $self->DOES('Dist::Inkt::Role::CopyFiles') && $target eq 'Files'; my $method = "Build_$target"; $self->$method; } } sub BuildManifest { my $self = shift; my $file = $self->targetfile('MANIFEST'); $self->log("Writing $file"); $self->rights_for_generated_files->{'MANIFEST'} ||= [ 'None', 'public-domain' ]; my $rule = 'Path::Iterator::Rule'->new->file; my $root = $self->targetdir; my @files = map { path($_)->relative($root) } $rule->all($root); $file->spew(map "$_\n", sort 'MANIFEST', @files); } sub BuildTarball { my $self = shift; my $file = path($_[0] || sprintf('%s.tar.gz', $self->targetdir)); $self->log("Writing $file"); require Archive::Tar; my $tar = 'Archive::Tar'->new; my $rule = 'Path::Iterator::Rule'->new->file; my $root = $self->targetdir; my $pfx = $root->basename; for ($rule->all($root)) { my $abs = path($_); $tar->add_files($abs); $tar->rename(substr($abs, 1), "$pfx/".$abs->relative($root)); } $tar->write($file, Archive::Tar::COMPRESS_GZIP()); } has should_compress => ( is => 'ro', isa => Bool, default => sub { !$ENV{PERL_DIST_INKT_NOTARBALL} }, ); sub BuildAll { my $self = shift; $self->BuildTargets; $self->BuildManifest; if ($self->should_compress) { $self->BuildTarball; $self->cleartarget; } } sub BuildTravisYml { my $self = shift; $self->log("Generating .travis.yml"); my $yml = $self->sourcefile(".travis.yml")->openw; my $perl_ver = $self->metadata->{prereqs}{runtime}{requires}{perl} || '5.014'; print {$yml} "language: perl\n"; print {$yml} "perl:\n"; for my $v (8, 10, 12, 14, 16, 18, 20) { my $formatted = sprintf("5.%03d000", $v); $formatted = '5.008001' if $formatted eq '5.008000'; if ($formatted ge $perl_ver) { print {$yml} " - \"5.$v\"\n"; } } my $class = $self->_real_class; ## no Test::Tabs print {$yml} <<"TAIL"; matrix: include: - perl: 5.18.2 env: COVERAGE=1 before_install: - export DIST_INKT_PROFILE="$class" - git clone git://github.com/tobyink/perl-travis-helper - source perl-travis-helper/init - build-perl - perl -V - build-dist - cd \$BUILD_DIR install: - cpan-install --toolchain - cpan-install --deps - cpan-install --coverage before_script: - coverage-setup script: - prove -l \$(test-dirs) after_success: - coverage-report TAIL ## use Test::Tabs return; } sub log { my $self = shift; my ($fmt, @args) = @_; printf STDERR "$fmt\n", @args; } 1; __END__ =pod =encoding utf-8 =for stopwords gzipped tarball =head1 NAME Dist::Inkt - yet another distribution builder =head1 STATUS Experimental. =head1 DESCRIPTION L didn't have the prerequisite amount of crazy for me, so I wrote this instead. Dist::Inkt itself does virtually nothing; it creates an empty directory, generates a MANIFEST file, and then wraps it all up into a gzipped tarball. But it provides various hooks along the way for subclasses to grab hold of. So the general idea is that you write a subclass of Dist::Inkt, which consumes various Moose::Roles to do the actual work of populating the distribution with files. As such, Dist::Inkt is not so much a distribution builder, as it is a framework for writing your own distribution builder. Several roles of varying utility are bundled with Dist::Inkt, as is L, a subclass of Dist::Inkt which consumes most of these roles. =head1 COMPANIONS Dist::Inkt does just one thing - building the tarball from some checkout of the repo. Although roles could theoretically be written for other tasks, out of the box, Dist::Inkt doesn't do any of the following: =over =item B<< Minting new distributions >> I'm writing a separate tool, L for that. =item B<< Test suite running >> Use L or L. =item B<< CPAN Uploading >> Use L. =item B<< Changing the version number across many files >> Use L. =item B<< Integration with version control tools >> Just use C or C or C of whatever as you normally would. None of the files generated by Dist::Inkt should probably be checked into your repo. =back =head1 BUGS Please report any bugs to L. =head1 SEE ALSO If you are not me, then you may well want one of these instead: =over =item * L =item * L =item * L =back Various extensions for Dist::Inkt: =over =item * L =item * L =back =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT AND LICENCE This software is copyright (c) 2013-2014 by Toby Inkster. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =head1 DISCLAIMER OF WARRANTIES THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 01basic.t000664001750001750 70612406251317 21420 0ustar00taitai000000000000Dist-Inkt-0.023/examples/p5-acme-example-dist/t=pod =encoding utf-8 =head1 PURPOSE Test that Acme::Example::Dist compiles. =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT AND LICENCE This software is copyright (c) 2014 by Toby Inkster. 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 use strict; use warnings; use Test::More; use_ok('Acme::Example::Dist'); done_testing; Simple.pm000664001750001750 230412406251317 17670 0ustar00taitai000000000000Dist-Inkt-0.023/lib/Dist/Inkt/Profilepackage Dist::Inkt::Profile::Simple; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.023'; use Moose; use Types::Standard qw( ArrayRef Str ); use namespace::autoclean; extends 'Dist::Inkt'; with qw( Dist::Inkt::Role::CPANfile Dist::Inkt::Role::CopyStandardDocuments Dist::Inkt::Role::CopyFiles Dist::Inkt::Role::MetaProvides Dist::Inkt::Role::MetaProvidesScripts Dist::Inkt::Role::WriteMakefilePL Dist::Inkt::Role::WriteMetaJSON Dist::Inkt::Role::WriteMetaYML Dist::Inkt::Role::WriteDOAPLite Dist::Inkt::Role::WriteLICENSE Dist::Inkt::Role::WriteREADME Dist::Inkt::Role::WriteINSTALL ); has abstract => ( is => 'ro', isa => Str, predicate => 'has_abstract', ); has author => ( is => 'ro', isa => ArrayRef[Str], predicate => 'has_author', ); has license => ( is => 'ro', isa => ArrayRef[Str], predicate => 'has_license', ); around _build_metadata => sub { my $next = shift; my $self = shift; my $meta = $self->$next(@_); $meta->{abstract} = $self->abstract if $self->has_abstract; $meta->{author} = $self->author if $self->has_author; $meta->{license} = $self->license if $self->has_license; return $meta; }; 1; CPANfile.pm000664001750001750 114012406251317 17316 0ustar00taitai000000000000Dist-Inkt-0.023/lib/Dist/Inkt/Rolepackage Dist::Inkt::Role::CPANfile; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.023'; use Moose::Role; use namespace::autoclean; after PopulateMetadata => sub { my $self = shift; return unless $self->sourcefile('cpanfile')->exists; $self->log('Processing cpanfile'); require Module::CPANfile; my $file = Module::CPANfile->load( $self->sourcefile('cpanfile') ); my $orig = $self->metadata->prereqs; $orig = CPAN::Meta::Prereqs->new($orig) unless blessed($orig); my $merged = $file->prereqs->with_merged_prereqs($orig); $self->metadata->{prereqs} = $merged->as_string_hash; }; 1; CopyFiles.pm000664001750001750 365112406251317 17643 0ustar00taitai000000000000Dist-Inkt-0.023/lib/Dist/Inkt/Rolepackage Dist::Inkt::Role::CopyFiles; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.023'; use Moose::Role; use Types::Standard -types; use Path::Tiny 'path'; use Path::Iterator::Rule; use namespace::autoclean; use constant Skippable => (CodeRef | RegexpRef | Str)->create_child_type(name => 'Skippable'); has manifest_skip => ( is => 'ro', isa => ArrayRef[Skippable], lazy => 1, builder => '_build_manifest_skip', ); has also_skip => ( is => 'ro', isa => ArrayRef[Skippable], default => sub { [] }, ); sub _build_manifest_skip { my $self = shift; my $name = quotemeta($self->name); return [ qr!^(meta|xt|blib|cover_db)/!, qr!^(perl-travis-helper)/!, qr!^\..!, qr!^[Dd]evel.!, qr!~$!, qr!\.(orig|patch|rej|bak|old|tmp)$!, qr!^$name.*\.tar.gz$!, @{ $self->also_skip }, ]; } after BUILD => sub { my $self = shift; unshift @{ $self->targets }, 'Files'; }; *Path::Tiny::subsumes = sub { my ($self, $other) = @_; return !!1 if $self eq $other; return !!0 if !defined $other; return !!0 if $other->parent eq $other; return $self->subsumes($other->parent); } unless Path::Tiny->can('subsumes'); sub Build_Files { my $self = shift; my $src = $self->rootdir; my $dest = $self->targetdir; my @manifest_skip = @{ $self->manifest_skip }; my $rule = 'Path::Iterator::Rule'->new->and(sub { my $file = path($_); return \0 if $dest->subsumes($file); my $relative = $file->relative($src); for my $ms (@manifest_skip) { if (ref $ms eq 'CODE' and $ms->("$relative")) { return \0; } elsif (ref $ms eq 'Regexp' and "$relative" =~ /$ms/) { return \0; } elsif ($ms eq "$relative") { return \0; } } return 1; })->file; for ($rule->all($src)) { my $file = path($_); my $relative = $file->relative($src); my $destfile = $relative->absolute($dest); $self->log("Copying $file"); $destfile->parent->mkpath; $file->copy($destfile); } } 1; CopyStandardDocuments.pm000664001750001750 165612406251317 22226 0ustar00taitai000000000000Dist-Inkt-0.023/lib/Dist/Inkt/Rolepackage Dist::Inkt::Role::CopyStandardDocuments; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.023'; use Moose::Role; use Types::Path::Tiny -types; use Path::Tiny 'path'; use namespace::autoclean; has standard_documents_dir => ( is => 'ro', isa => AbsPath, coerce => 1, lazy => 1, builder => '_build_standard_documents_dir', ); sub _build_standard_documents_dir { return path('~/perl5/standard-documents'); } after BUILD => sub { my $self = shift; unshift @{ $self->targets }, 'StandardDocuments'; }; sub Build_StandardDocuments { my $self = shift; my $src = $self->standard_documents_dir; $src->exists or return; $src->is_dir or return; my $dest = $self->targetdir; for ($src->children) { my $file = path($_); $file->is_file or next; my $relative = $file->relative($src); my $destfile = $relative->absolute($dest); $self->log("Copying $file"); $file->copy($destfile); } } 1; MetaProvides.pm000664001750001750 213212406251317 20341 0ustar00taitai000000000000Dist-Inkt-0.023/lib/Dist/Inkt/Rolepackage Dist::Inkt::Role::MetaProvides; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.023'; use Moose::Role; use Module::Metadata; use namespace::autoclean; after PopulateMetadata => sub { my $self = shift; $self->log("Finding provided packages"); my $provides = 'Module::Metadata'->provides( version => '2', dir => $self->sourcefile('lib'), ); for my $pkg ( @{ $self->metadata->{no_index}{package} or [] } ) { delete $provides->{$pkg}; } for my $ns ( @{ $self->metadata->{no_index}{namespace} or [] } ) { for my $pkg (keys %$provides) { delete $provides->{$pkg} if $pkg =~ m{^\Q$ns\E::}; } } for my $dir ( @{ $self->metadata->{no_index}{directory} or [] } ) { for my $pkg (keys %$provides) { delete $provides->{$pkg} if $provides->{$pkg}{file} =~ m{^\Q$dir\E/}; } } for my $file ( @{ $self->metadata->{no_index}{file} or [] } ) { for my $pkg (keys %$provides) { delete $provides->{$pkg} if $provides->{$pkg}{file} eq $file; } } # XXX - should also filter result using manifest_skip $self->metadata->{provides} = $provides; }; 1; MetaProvidesScripts.pm000664001750001750 122112406251317 21707 0ustar00taitai000000000000Dist-Inkt-0.023/lib/Dist/Inkt/Rolepackage Dist::Inkt::Role::MetaProvidesScripts; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.023'; use Moose::Role; use Path::Tiny 'path'; use namespace::autoclean; after PopulateMetadata => sub { my $self = shift; $self->log("Finding provided scripts"); my $src = $self->sourcefile; ### XXX - should filter by manifest_skip my %scripts = ( map { my $path = path($_); $path->basename => { file => $path->relative($src) }; } map { $_->children; } grep { $_->exists; } ( $src->child('bin'), $src->child('script'), ), ); $self->metadata->{x_provides_scripts} = \%scripts if scalar keys %scripts; }; 1; SignDistribution.pm000664001750001750 204712406251317 21244 0ustar00taitai000000000000Dist-Inkt-0.023/lib/Dist/Inkt/Rolepackage Dist::Inkt::Role::SignDistribution; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.023'; use Moose::Role; use Module::Signature (); use Types::Standard qw(Bool); use File::chdir; use namespace::autoclean; has should_sign => ( is => 'ro', isa => Bool, default => sub { !$ENV{PERL_DIST_INKT_NOSIGNATURE} }, ); after BUILD => sub { my $self = shift; unshift @{ $self->targets }, 'SIGNATURE' if $self->should_sign; }; sub Build_SIGNATURE { my $self = shift; my $file = $self->targetfile('SIGNATURE'); $file->exists and return $self->log('Skipping %s; it already exists', $file); $self->log('Writing %s', $file); $self->rights_for_generated_files->{'SIGNATURE'} ||= [ 'None', 'public-domain' ]; $file->spew('placeholder'); } after BuildManifest => sub { my $self = shift; $self->should_sign or return; $self->targetfile('SIGNATURE')->exists or die("Missing SIGNATURE"); local $CWD = $self->targetdir; system("cpansign sign"); if ($?) { $self->log("ERROR: signature failed!!!"); die("Bailing out"); } }; 1; WriteDOAPLite.pm000664001750001750 156212406251317 20321 0ustar00taitai000000000000Dist-Inkt-0.023/lib/Dist/Inkt/Rolepackage Dist::Inkt::Role::WriteDOAPLite; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.023'; use Moose::Role; use namespace::autoclean; after BUILD => sub { my $self = shift; unshift @{ $self->targets }, 'DOAP'; }; sub Build_DOAP { my $self = shift; my $file = $self->targetfile('doap.ttl'); $file->exists and return $self->log('Skipping %s; it already exists', $file); $self->log('Writing %s', $file); $self->rights_for_generated_files->{'doap.ttl'} ||= [ $self->_inherited_rights ]; require CPAN::Changes; require RDF::DOAP::Lite; my $changes; $changes = CPAN::Changes->load($self->sourcefile('Changes')) if $self->sourcefile('Changes')->exists; my $doap = $changes ? RDF::DOAP::Lite->new(meta => $self->metadata, changes => $changes) : RDF::DOAP::Lite->new(meta => $self->metadata); $doap->doap_ttl( $file->absolute->stringify ); } 1; WriteINSTALL.pm000664001750001750 551612406251317 20071 0ustar00taitai000000000000Dist-Inkt-0.023/lib/Dist/Inkt/Rolepackage Dist::Inkt::Role::WriteINSTALL; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.023'; use Moose::Role; use namespace::autoclean; after BUILD => sub { my $self = shift; unshift @{ $self->targets }, 'INSTALL'; }; sub Build_INSTALL { my $self = shift; my $file = $self->targetfile('INSTALL'); $file->exists and return $self->log('Skipping %s; it already exists', $file); $self->log('Writing %s', $file); my $pod = 'Pod::Text'->new( sentance => 0, width => 78, errors => 'die', quotes => q[``], utf8 => 1, ); $pod->output_fh($file->openw_utf8); $pod->parse_string_document( join( "\n\n", "=pod", "=encoding utf-8", $self->installfile_summary, $self->installfile_cpanm, $self->installfile_cpan, $self->installfile_manual, $self->installfile_features, "=cut", "", ) ); } sub installfile_summary { my $self = shift; return sprintf("Installing %s should be straightforward.\n\n", $self->name); } sub installfile_cpanm { my $self = shift; return ( "=head1 INSTALLATION WITH CPANMINUS", "If you have cpanm, you only need one line:", sprintf("\t%% cpanm %s", $self->lead_module), "If you are installing into a system-wide directory, you may need to pass the \"-S\" flag to cpanm, which uses sudo to install the module:", sprintf("\t%% cpanm -S %s", $self->lead_module), ); } sub installfile_cpan { my $self = shift; return ( "=head1 INSTALLATION WITH THE CPAN SHELL", "Alternatively, if your CPAN shell is set up, you should just be able to do:", sprintf("\t%% cpan %s", $self->lead_module), ); } sub installfile_manual { my $self = shift; return ( "=head1 MANUAL INSTALLATION", "As a last resort, you can manually install it. Download the tarball and unpack it.", "Consult the file META.json for a list of pre-requisites. Install these first.", sprintf("To build %s:", $self->name), "\t% perl Makefile.PL\n". "\t% make && make test", "Then install it:", "\t% make install", "If you are installing into a system-wide directory, you may need to run:", "\t% sudo make install", ); } sub installfile_features { my $self = shift; my @features = sort keys %{$self->metadata->{optional_features}} or return; return ( "=head1 OPTIONAL FEATURES", sprintf("%s provides several optional features, which may require additional pre-requisites. These features are:", $self->name), "=over", map( sprintf( "=item *\n\n%s (%s)", $_, $self->metadata->{optional_features}{$_}{description} || 'no description' ), @features ), "=back", "cpanminus 1.7000 and above support installing optional features:", sprintf("\t%% cpanm --with-feature=%s %s", $features[0], $self->lead_module), "Otherwise, Makefile.PL can prompt you to select features. Set the C environment variable to \"1\" before running Makefile.PL.", ); } 1; WriteLICENSE.pm000664001750001750 472712406251317 20050 0ustar00taitai000000000000Dist-Inkt-0.023/lib/Dist/Inkt/Rolepackage Dist::Inkt::Role::WriteLICENSE; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.023'; use Moose::Role; use Software::LicenseUtils; use namespace::autoclean; after BUILD => sub { my $self = shift; unshift @{ $self->targets }, 'LICENSE'; }; # I've submitted this hash as a patch for Software::LicenseUtils. # Maybe I won't need to hard-code it here. # my %meta_keys = ( ## CPAN::Meta::Spec 2.0 ## agpl_3 => 'AGPL_3', apache_1_1 => 'Apache_1_1', apache_2_0 => 'Apache_2_0', artistic_1 => 'Artistic_1_0', artistic_2 => 'Artistic_2_0', bsd => 'BSD', freebsd => 'FreeBSD', gfdl_1_2 => 'GFDL_1_2', gfdl_1_3 => 'GFDL_1_3', gpl_1 => 'GPL_1', gpl_2 => 'GPL_2', gpl_3 => 'GPL_3', lgpl_2_1 => 'LGPL_2_1', lgpl_3_0 => 'LGPL_3_0', mit => 'MIT', mozilla_1_0 => 'Mozilla_1_0', mozilla_1_1 => 'Mozilla_1_1', openssl => 'OpenSSL', perl_5 => 'Perl_5', qpl_1_0 => 'QPL_1_0', ssleay => 'SSLeay', sun => 'Sun', zlib => 'Zlib', # open_source restricted => 'None', # unrestricted # unknown ## META-spec 1.4 ## apache => [ map { "Apache_$_" } qw(1_1 2_0) ], # apache_1_1 perl => 'Perl_5', artistic => 'Artistic_1_0', # artistic_2 # bsd gpl => [ map { "GPL_$_" } qw(1 2 3) ], lgpl => [ map { "LGPL_$_" } qw(2_1 3_0) ], # mit mozilla => [ map { "Mozilla_$_" } qw(1_0 1_1 2_0) ], # open_source restrictive => 'None', # unrestricted # unknown ); sub Build_LICENSE { my $self = shift; my $file = $self->targetfile('LICENSE'); $file->exists and return $self->log('Skipping %s; it already exists', $file); $self->log('Writing %s', $file); my $L = $self->metadata->{license}; unless (@{ $L || [] }==1) { $self->log('WARNING: did not find exactly one licence; found %d', scalar(@{ $L || [] })); return; } my $class; unless ($class = $meta_keys{$L->[0]}) { $self->log("WARNING: could not grok licence '%s'", @$L); return; } if (ref $class) { $self->log("WARNING: ambiguous licence '%s'", @$L); return; } my $holders = Moose::Util::english_list( $self->can('doap_project') ? map($_->to_string('compact'), @{$self->doap_project->maintainer}) : @{$self->metadata->{author}} ); $class = "Software::License::$class"; eval "require $class;"; my $licence = $class->new({ year => [localtime]->[5] + 1900, holder => $holders, }); $file->spew_utf8( $licence->fulltext ); } 1; WriteMakefilePL.pm000664001750001750 2072612406251317 20754 0ustar00taitai000000000000Dist-Inkt-0.023/lib/Dist/Inkt/Rolepackage Dist::Inkt::Role::WriteMakefilePL; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.023'; use Moose::Role; use Types::Standard -types; use Data::Dump 'pp'; use namespace::autoclean; sub DYNAMIC_CONFIG_PATH () { 'meta/DYNAMIC_CONFIG.PL' }; has has_shared_files => ( is => 'ro', isa => Bool, lazy => 1, builder => '_build_has_shared_files', ); sub _build_has_shared_files { my $self = shift; !! $self->sourcefile('share')->is_dir; } has directories_containing_tests => ( is => 'ro', isa => ArrayRef, lazy => 1, builder => '_build_directories_containing_tests', ); sub _build_directories_containing_tests { my $self = shift; my $rule = Path::Iterator::Rule->new->file->name('*.t'); my %dirs; $dirs{ Path::Tiny->new($_)->relative($self->rootdir)->dirname }++ for $rule->all( $self->sourcefile('t') ); [ sort keys %dirs ]; } has needs_conflict_check_code => ( is => 'ro', isa => Bool, lazy => 1, builder => '_build_needs_conflict_check_code', ); sub _build_needs_conflict_check_code { my $self = shift; !!grep { exists $self->metadata->{prereqs}{$_} and exists $self->metadata->{prereqs}{$_}{conflicts} and !!scalar keys %{ $self->metadata->{prereqs}{$_}{conflicts} } } qw( configure build runtime test develop ); } has needs_optional_features_code => ( is => 'ro', isa => Bool, lazy => 1, builder => '_build_needs_optional_features_code', ); sub _build_needs_optional_features_code { my $self = shift; !! %{ $self->metadata->{optional_features} || {} }; } after PopulateMetadata => sub { my $self = shift; $self->metadata->{prereqs}{configure}{requires}{'ExtUtils::MakeMaker'} = '6.17' if !defined $self->metadata->{prereqs}{configure}{requires}{'ExtUtils::MakeMaker'}; $self->metadata->{prereqs}{configure}{requires}{'File::ShareDir::Install'} = '0.02' if $self->has_shared_files && !defined $self->metadata->{prereqs}{configure}{requires}{'File::ShareDir::Install'}; $self->metadata->{prereqs}{configure}{recommends}{'CPAN::Meta::Requirements'} = '2.000' if $self->needs_conflict_check_code; $self->metadata->{dynamic_config} = 1 if $self->sourcefile(DYNAMIC_CONFIG_PATH)->exists; $self->metadata->{dynamic_config} = 1 if $self->needs_optional_features_code; }; after BUILD => sub { my $self = shift; unshift @{ $self->targets }, 'MakefilePL'; }; sub Build_MakefilePL { my $self = shift; my $file = $self->targetfile('Makefile.PL'); $file->exists and return $self->log('Skipping %s; it already exists', $file); $self->log('Writing %s', $file); chomp( my $dump = pp( $self->metadata->as_struct({version => '2'}) ) ); my $dynamic_config = do { my $dc = $self->sourcefile(DYNAMIC_CONFIG_PATH); $dc->exists ? "\ndo {\n${\ $dc->slurp_utf8 }\n};" : ''; }; $self->rights_for_generated_files->{'Makefile.PL'} ||= [ 'Copyright 2013 Toby Inkster.', "Software::License::Perl_5"->new({ holder => 'Toby Inkster', year => '2013' }), ] if !$dynamic_config; my $share = ''; if ($self->has_shared_files) { $share = "\nuse File::ShareDir::Install;\n" . "install_share 'share';\n" . "{ package MY; use File::ShareDir::Install qw(postamble) };\n"; } my $conflict_check = $self->needs_conflict_check_code ? $self->conflict_check_code : ''; my $optional_features = $self->needs_optional_features_code ? $self->optional_features_code : ''; my $tests = join(q[ ], map "$_\*.t", @{ $self->directories_containing_tests }); my $makefile = do { local $/ = }; $makefile =~ s/%%%METADATA%%%/$dump/; $makefile =~ s/%%%SHARE%%%/$share/; $makefile =~ s/%%%TESTS%%%/$tests/; $makefile =~ s/%%%DYNAMIC_CONFIG%%%/$dynamic_config/; $makefile =~ s/%%%CONFLICT_CHECK%%%/$conflict_check/; $makefile =~ s/%%%OPTIONAL_FEATURES%%%/$optional_features/; $file->spew_utf8($makefile); } sub conflict_check_code { <<'CODE' for my $stage (keys %{$meta->{prereqs}}) { my $conflicts = $meta->{prereqs}{$stage}{conflicts} or next; eval { require CPAN::Meta::Requirements } or last; $conflicts = 'CPAN::Meta::Requirements'->from_string_hash($conflicts); for my $module ($conflicts->required_modules) { eval "require $module" or next; my $installed = eval(sprintf('$%s::VERSION', $module)); $conflicts->accepts_module($module, $installed) or next; my $message = "\n". "** This version of $meta->{name} conflicts with the version of\n". "** module $module ($installed) you have installed.\n"; die($message . "\n" . "Bailing out") if $stage eq 'build' || $stage eq 'configure'; $message .= "**\n". "** It's strongly recommended that you update it after\n". "** installing this version of $meta->{name}.\n"; warn("$message\n"); } } CODE } sub optional_features_code { <<'CODE' if ($ENV{MM_INSTALL_FEATURES}) { my %features = %{ $meta->{optional_features} }; my @features = sort { $features{$b}{x_default} <=> $features{$a}{x_default} or $a cmp $b } keys %features; for my $feature_id (@features) { my %feature = %{ $features{$feature_id} }; next unless prompt( sprintf('Install %s (%s)?', $feature_id, $feature{description} || 'no description'), $feature{x_default} ? 'Y' : 'N', ) =~ /^Y/i; $features{$feature_id}{x_selected} = 1; for my $stage (keys %{$feature{prereqs}}) { for my $level (keys %{$feature{prereqs}{$stage}}) { for my $module (keys %{$feature{prereqs}{$stage}{$level}}) { $meta->{prereqs}{$stage}{$level}{$module} = $feature{prereqs}{$stage}{$level}{$module}; } } } } } else { print <<'MM_INSTALL_FEATURES'; ** Setting the MM_INSTALL_FEATURES environment variable to true ** would allow you to choose additional features. MM_INSTALL_FEATURES } CODE } 1; __DATA__ use strict; use ExtUtils::MakeMaker 6.17; my $EUMM = eval( $ExtUtils::MakeMaker::VERSION ); my $meta = %%%METADATA%%%; %%%OPTIONAL_FEATURES%%% my %dynamic_config;%%%DYNAMIC_CONFIG%%% %%%CONFLICT_CHECK%%% my %WriteMakefileArgs = ( ABSTRACT => $meta->{abstract}, AUTHOR => ($EUMM >= 6.5702 ? $meta->{author} : $meta->{author}[0]), DISTNAME => $meta->{name}, VERSION => $meta->{version}, EXE_FILES => [ map $_->{file}, values %{ $meta->{x_provides_scripts} || {} } ], NAME => do { my $n = $meta->{name}; $n =~ s/-/::/g; $n }, test => { TESTS => "%%%TESTS%%%" }, %dynamic_config, ); $WriteMakefileArgs{LICENSE} = $meta->{license}[0] if $EUMM >= 6.3001; sub deps { my %r; for my $stage (@_) { for my $dep (keys %{$meta->{prereqs}{$stage}{requires}}) { next if $dep eq 'perl'; my $ver = $meta->{prereqs}{$stage}{requires}{$dep}; $r{$dep} = $ver if !exists($r{$dep}) || $ver >= $r{$dep}; } } \%r; } my ($build_requires, $configure_requires, $runtime_requires, $test_requires); if ($EUMM >= 6.6303) { $WriteMakefileArgs{BUILD_REQUIRES} ||= deps('build'); $WriteMakefileArgs{CONFIGURE_REQUIRES} ||= deps('configure'); $WriteMakefileArgs{TEST_REQUIRES} ||= deps('test'); $WriteMakefileArgs{PREREQ_PM} ||= deps('runtime'); } elsif ($EUMM >= 6.5503) { $WriteMakefileArgs{BUILD_REQUIRES} ||= deps('build', 'test'); $WriteMakefileArgs{CONFIGURE_REQUIRES} ||= deps('configure'); $WriteMakefileArgs{PREREQ_PM} ||= deps('runtime'); } elsif ($EUMM >= 6.52) { $WriteMakefileArgs{CONFIGURE_REQUIRES} ||= deps('configure'); $WriteMakefileArgs{PREREQ_PM} ||= deps('runtime', 'build', 'test'); } else { $WriteMakefileArgs{PREREQ_PM} ||= deps('configure', 'build', 'test', 'runtime'); } { my ($minperl) = reverse sort( grep defined && /^[0-9]+(\.[0-9]+)?$/, map $meta->{prereqs}{$_}{requires}{perl}, qw( configure build runtime ) ); if (defined($minperl)) { die "Installing $meta->{name} requires Perl >= $minperl" unless $] >= $minperl; $WriteMakefileArgs{MIN_PERL_VERSION} ||= $minperl if $EUMM >= 6.48; } } sub FixMakefile { return unless -d 'inc'; my $file = shift; local *MAKEFILE; open MAKEFILE, "< $file" or die "FixMakefile: Couldn't open $file: $!; bailing out"; my $makefile = do { local $/; }; close MAKEFILE or die $!; $makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /; $makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g; $makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g; $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m; $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m; open MAKEFILE, "> $file" or die "FixMakefile: Couldn't open $file: $!; bailing out"; print MAKEFILE $makefile or die $!; close MAKEFILE or die $!; } %%%SHARE%%% my $mm = WriteMakefile(%WriteMakefileArgs); FixMakefile($mm->{FIRST_MAKEFILE} || 'Makefile'); exit(0); WriteMetaJSON.pm000664001750001750 107512406251317 20337 0ustar00taitai000000000000Dist-Inkt-0.023/lib/Dist/Inkt/Rolepackage Dist::Inkt::Role::WriteMetaJSON; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.023'; use Moose::Role; use namespace::autoclean; after BUILD => sub { my $self = shift; unshift @{ $self->targets }, 'MetaJSON'; }; sub Build_MetaJSON { my $self = shift; my $file = $self->targetfile('META.json'); $file->exists and return $self->log('Skipping %s; it already exists', $file); $self->log('Writing %s', $file); $self->rights_for_generated_files->{'META.json'} ||= [ $self->_inherited_rights ]; $self->metadata->save($file, { version => '2' }); } 1; WriteMetaYML.pm000664001750001750 107212406251317 20224 0ustar00taitai000000000000Dist-Inkt-0.023/lib/Dist/Inkt/Rolepackage Dist::Inkt::Role::WriteMetaYML; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.023'; use Moose::Role; use namespace::autoclean; after BUILD => sub { my $self = shift; unshift @{ $self->targets }, 'MetaYML'; }; sub Build_MetaYML { my $self = shift; my $file = $self->targetfile('META.yml'); $file->exists and return $self->log('Skipping %s; it already exists', $file); $self->log('Writing %s', $file); $self->rights_for_generated_files->{'META.yml'} ||= [ $self->_inherited_rights ]; $self->metadata->save($file, { version => '1.4' }); } 1; WriteREADME.pm000664001750001750 203212406251317 17706 0ustar00taitai000000000000Dist-Inkt-0.023/lib/Dist/Inkt/Rolepackage Dist::Inkt::Role::WriteREADME; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.023'; use Moose::Role; use Pod::Text; use namespace::autoclean; has source_for_readme => ( is => 'ro', lazy => 1, default => sub { shift->lead_module }, ); after BUILD => sub { my $self = shift; unshift @{ $self->targets }, 'README'; }; sub Build_README { my $self = shift; my $file = $self->targetfile('README'); $file->exists and return $self->log('Skipping %s; it already exists', $file); $self->log('Writing %s', $file); my $pod = 'Pod::Text'->new( sentance => 0, width => 78, errors => 'die', quotes => q[``], utf8 => 1, ); my $input = $self->source_for_readme; unless ($input =~ /\.(pm|pod)$/) { $input =~ s{::}{/}g; $input = "lib/$input.pm"; } $input = $self->sourcefile($input); # inherit rights from input pod $self->rights_for_generated_files->{'README'} ||= [ $self->_determine_rights($input) ] if $self->can('_determine_rights'); $pod->parse_from_file("$input", "$file"); } 1; Dist.pm000664001750001750 160612406251317 24035 0ustar00taitai000000000000Dist-Inkt-0.023/examples/p5-acme-example-dist/lib/Acme/Exampleuse 5.010001; use strict; use warnings; package Acme::Example::Dist; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.001'; 1; __END__ =pod =encoding utf-8 =head1 NAME Acme::Example::Dist - a module that does something-or-other =head1 SYNOPSIS =head1 DESCRIPTION =head1 BUGS Please report any bugs to L. =head1 SEE ALSO =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT AND LICENCE This software is copyright (c) 2014 by Toby Inkster. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =head1 DISCLAIMER OF WARRANTIES THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.