MooseX-App-Cmd-0.27000755000764000764 012260552042 15206 5ustar00mjgardnermjgardner000000000000TODO100644000764000764 45212260552042 15740 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27Full support for Getopt::Long::Descriptive's abilities is not yet written. This entails taking apart the attributes and getting at the descriptions. This might actually be added upstream to MooseX::Getopt, so until we decide here's a functional but not very helpful (to the user) version anyway. README100644000764000764 1115012260552042 16165 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27NAME MooseX::App::Cmd - Mashes up MooseX::Getopt and App::Cmd VERSION version 0.27 SYNOPSIS package YourApp::Cmd; use Moose; extends qw(MooseX::App::Cmd); package YourApp::Cmd::Command::blort; use Moose; extends qw(MooseX::App::Cmd::Command); has blortex => ( traits => [qw(Getopt)], isa => 'Bool', is => 'rw', cmd_aliases => 'X', documentation => 'use the blortext algorithm', ); has recheck => ( traits => [qw(Getopt)], isa => 'Bool', is => 'rw', cmd_aliases => 'r', documentation => 'recheck all results', ); sub execute { my ( $self, $opt, $args ) = @_; # you may ignore $opt, it's in the attributes anyway my $result = $self->blortex ? blortex() : blort(); recheck($result) if $self->recheck; print $result; } DESCRIPTION This module marries App::Cmd with MooseX::Getopt. Use it like App::Cmd advises (especially see App::Cmd::Tutorial), swapping App::Cmd::Command for MooseX::App::Cmd::Command. Then you can write your moose commands as Moose classes, with MooseX::Getopt defining the options for you instead of opt_spec returning a Getopt::Long::Descriptive spec. METHODS BUILD After calling new this method is automatically run, setting underlying App::Cmd attributes as per its documentation. SEE ALSO App::Cmd App::Cmd::Tutorial MooseX::Getopt MooseX::App::Cmd::Command SUPPORT Perldoc You can find documentation for this module with the perldoc command. perldoc MooseX::App::Cmd Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. * Search CPAN The default CPAN search engine, useful to view POD in HTML format. http://search.cpan.org/dist/MooseX-App-Cmd * AnnoCPAN The AnnoCPAN is a website that allows community annotations of Perl module documentation. http://annocpan.org/dist/MooseX-App-Cmd * CPAN Ratings The CPAN Ratings is a website that allows community ratings and reviews of Perl modules. http://cpanratings.perl.org/d/MooseX-App-Cmd * CPANTS The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. http://cpants.perl.org/dist/overview/MooseX-App-Cmd * CPAN Testers The CPAN Testers is a network of smokers who run automated tests on uploaded CPAN distributions. http://www.cpantesters.org/distro/M/MooseX-App-Cmd * CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. http://matrix.cpantesters.org/?dist=MooseX-App-Cmd * CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. http://deps.cpantesters.org/?module=MooseX::App::Cmd Bugs / Feature Requests Please report any bugs or feature requests through the web interface at https://github.com/mjgardner/moosex-app-cmd/issues. You will be automatically notified of any progress on the request by the system. Source Code The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) https://github.com/mjgardner/moosex-app-cmd git clone git://github.com/mjgardner/moosex-app-cmd.git AUTHORS * Yuval Kogman * Guillermo Roditi * Daisuke Maki * Vladimir Timofeev * Bruno Vecchi * Offer Kaye * Mark Gardner * Yanick Champoux * Dann * Ken Crowell * Michael Joyce COPYRIGHT AND LICENSE This software is copyright (c) 2013 by Infinity Interactive, Yuval Kogman. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Changes100644000764000764 546712260552042 16576 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27Revision history for MooseX-App-Cmd 0.27 2013-12-31 14:26:29 UTC - update developer and Dist::Zilla author dependencies 0.26 2013-12-16 17:19:52 America/New_York (TRIAL RELEASE) - better reporting of skipped Moose/Mouse tests - add release test to check changelog for new content 0.25 2013-12-09 10:37:31 America/New_York (TRIAL RELEASE) - test for Mo(o|u)seX::Getopt before running Mo(o|u)se-specific tests 0.24 2013-12-08 21:01:55 America/New_York (TRIAL RELEASE) - add requirements, recommendations and provides to meta files 0.23 2013-12-08 15:52:56 America/New_York (TRIAL RELEASE) - fixes to Moose/Mouse tests 0.22 2013-12-02 10:56:59 America/New_York (TRIAL RELEASE) - forgot to update changelog last time, no code changes 0.21 2013-12-02 10:47:32 America/New_York (TRIAL RELEASE) - do a better job of not requiring Moose for build/install 0.20 2013-12-01 18:18:42 America/New_York (TRIAL RELEASE) - use Any::Moose for Moose and Mouse compatibility in the same package 0.11 2013-11-22 11:48:20 America/New_York - gh#6: document --configfile option added in 0.03 (reported by abraxxa) - gh#8: fix missing commands in test files (ubermichael) 0.10 2013-05-17 10:29:01 America/New_York - RT#84437: fix missing parameter in call to default function (chips, ouftete) - gh#3: fix failing test introduced by MooseX::ConfigFromFile 0.08 (ouftete) - point perlcritic author test to the correct perltidy config - add author dependencies to Dist::Zilla dist.ini file (omega) 0.09 2012-03-18 20:21:21 America/New_York - RT#74668: can use a sub {} for configfile default (yanick) - RT#75446: add all necessary metadata as part of conversion to Dist::Zilla (mjgardner) - RT#75447: require correct version of Getopt::Long::Descriptive so basic and configfile tests can pass (mjgardner) - lots of code and documentation cleanup, driven by release tests (mjgardner) 0.08 2012-03-14 - no code changes, just repackaging distribution archive with correct root (mjgardner) 0.07 2012-02-29 - fix tests that started failing due to dependency error string change (offerk) 0.06 2009-09-17 - various fixes for upstream version of App::Cmd (vovkasm & brunov) 0.05 2009-07-05 - Various minor fixes due to upstream module changes 0.04 2008-07-17 - Fix failing test when no Test::Output is available. No code change (lestrrat) 0.03 2008-07-15 - Emulate App::Cmd's new + tests (groditi) - Fix for newest MX::Getopt (dann) - Add the ability to handle --configfile when used with MX::ConfigFromFile (lestrrat) 0.02 2008-01-21 - Use MooseX::Getopt 0.09's Getopt::Long::Descriptive features 0.01 2008-01-15 - Initial version LICENSE100644000764000764 4375512260552042 16332 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27This software is copyright (c) 2013 by Infinity Interactive, Yuval Kogman. 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) 2013 by Infinity Interactive, Yuval Kogman. 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, Suite 500, Boston, MA 02110-1335 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) 2013 by Infinity Interactive, Yuval Kogman. 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 INSTALL100644000764000764 171412260552042 16323 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27 This is the Perl distribution MooseX-App-Cmd. Installing MooseX-App-Cmd is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm MooseX::App::Cmd 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 MooseX::App::Cmd ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan MooseX::App::Cmd ## Manual installation As a last resort, you can manually install it. Download the tarball, untar it, then build it: % perl Makefile.PL % make && make test Then install it: % make install If you are installing into a system-wide directory, you may need to run: % sudo make install ## Documentation MooseX-App-Cmd documentation is available as POD. You can run perldoc from a shell to read the documentation: % perldoc MooseX::App::Cmd dist.ini100644000764000764 475712260552042 16750 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27name = MooseX-App-Cmd author = Yuval Kogman author = Guillermo Roditi author = Daisuke Maki author = Vladimir Timofeev author = Bruno Vecchi author = Offer Kaye author = Mark Gardner author = Yanick Champoux author = Dann author = Ken Crowell author = Michael Joyce license = Perl_5 copyright_holder = Infinity Interactive, Yuval Kogman [@Filter] -bundle = @Basic -remove = Readme [AutoPrereqs] skip = ^Moose skip = ^Mouse [Prereqs] perl = 5.006 App::Cmd = 0.321 Getopt::Long::Descriptive = 0.091 Test::use::ok = 0 MouseX::Getopt = 0 [OptionalFeature / ConfigFromFile] -description = Command line options can be set from a configuration file -always_recommend = 1 MouseX::ConfigFromFile = 0 [OptionalFeature / Moose] -description = Support for the Moose postmodern object system -always_recommend = 1 Moose = 0.86 MooseX::ConfigFromFile = 0.08 MooseX::Getopt = 0.18 [MetaProvides::Package] [Prereqs / ConfigureRequires] ExtUtils::MakeMaker = 0 [Prereqs / BuildRequires] ExtUtils::MakeMaker = 0 [Prereqs / DevelopRequires] App::perlbrew = 0 App::cpanminus = 0 Dist::Zilla = 0 Perl::Critic::Bangs = 0 Perl::Critic::Lax = 0 Perl::Critic::Pulp = 0 Perl::Critic::StricterSubs = 0 Pod::Weaver::Plugin::StopWords = 0 Pod::Weaver::Section::Support = 0 MooseX::SimpleConfig = 0 [Prereqs / DevelopRecommends] Test::CPAN::Meta::JSON = 0 Test::DistManifest = 0 Test::EOL = 0 Test::MinimumVersion = 0 Test::Mojibake = 0 Test::Perl::Critic = 0 Test::Pod::Coverage = 1.08 Test::Pod::LinkCheck = 0 Test::Portability::Files = 0 Test::Synopsis = 0 Test::Vars = 0 Test::Version = 0 [NextRelease] [OurPkgVersion] [PodWeaver] [MetaConfig] [CheckChangeLog] [Test::ChangesHasContent] [@TestingMania] [PerlTidy] perltidyrc = xt/author/perltidy.rc [ReadmeAnyFromPod] [ReadmeAnyFromPod / ReadmePodInRoot] type = pod filename = README.pod location = root [ReportVersions] [Test::LocalBrew] brews = perl-latest-TEST [InstallGuide] [MetaJSON] [@Git] allow_dirty = README.pod [Git::CommitBuild] branch = release_branch = release_build/%b [Git::NextVersion] [@GitHub] metacpan = 1 [GitHub::Meta] fork = 0 [InstallRelease] ;authordep Pod::Weaver::Plugin::StopWords ;authordep Pod::Weaver::Section::Support ;authordep Perl::Critic::Lax ;authordep Perl::Critic::StricterSubs ;authordep MooseX::SimpleConfig ;authordep Test::Pod::Coverage META.yml100644000764000764 3473112260552042 16570 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27--- abstract: 'Mashes up MooseX::Getopt and App::Cmd' author: - 'Yuval Kogman ' - 'Guillermo Roditi ' - 'Daisuke Maki ' - 'Vladimir Timofeev ' - 'Bruno Vecchi ' - 'Offer Kaye ' - 'Mark Gardner ' - 'Yanick Champoux ' - 'Dann ' - 'Ken Crowell ' - 'Michael Joyce ' build_requires: Carp: 0 Data::Dumper: 0 ExtUtils::MakeMaker: 0 File::Spec: 0 IO::Handle: 0 IPC::Open3: 0 Scalar::Util: 0 Test::More: 0.94 Test::Output: 0 YAML: 0 base: 0 lib: 0 strict: 0 warnings: 0 configure_requires: ExtUtils::MakeMaker: 6.30 dynamic_config: 0 generated_by: 'Dist::Zilla version 5.008, CPAN::Meta::Converter version 2.133380' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: MooseX-App-Cmd optional_features: ConfigFromFile: description: 'Command line options can be set from a configuration file' requires: MouseX::ConfigFromFile: 0 Moose: description: 'Support for the Moose postmodern object system' requires: Moose: 0.86 MooseX::ConfigFromFile: 0.08 MooseX::Getopt: 0.18 provides: MooseX::App::Cmd: file: lib/MooseX/App/Cmd.pm version: 0.27 MooseX::App::Cmd::Command: file: lib/MooseX/App/Cmd/Command.pm version: 0.27 MouseX::App::Cmd: file: lib/MouseX/App/Cmd.pm version: 0.27 MouseX::App::Cmd::Command: file: lib/MouseX/App/Cmd/Command.pm version: 0.27 recommends: Moose: 0.86 MooseX::ConfigFromFile: 0.08 MooseX::Getopt: 0.18 MouseX::ConfigFromFile: 0 requires: Any::Moose: 0 App::Cmd: 0.321 App::Cmd::Command: 0 English: 0 File::Basename: 0 Getopt::Long::Descriptive: 0.091 MouseX::Getopt: 0 Test::use::ok: 0 namespace::clean: 0 perl: 5.006 resources: bugtracker: https://github.com/mjgardner/moosex-app-cmd/issues homepage: http://metacpan.org/release/MooseX-App-Cmd/ repository: git://github.com/mjgardner/moosex-app-cmd.git version: 0.27 x_Dist_Zilla: perl: version: 5.018001 plugins: - class: Dist::Zilla::Plugin::GatherDir name: '@Filter/GatherDir' version: 5.008 - class: Dist::Zilla::Plugin::PruneCruft name: '@Filter/PruneCruft' version: 5.008 - class: Dist::Zilla::Plugin::ManifestSkip name: '@Filter/ManifestSkip' version: 5.008 - class: Dist::Zilla::Plugin::MetaYAML name: '@Filter/MetaYAML' version: 5.008 - class: Dist::Zilla::Plugin::License name: '@Filter/License' version: 5.008 - class: Dist::Zilla::Plugin::ExtraTests name: '@Filter/ExtraTests' version: 5.008 - class: Dist::Zilla::Plugin::ExecDir name: '@Filter/ExecDir' version: 5.008 - class: Dist::Zilla::Plugin::ShareDir name: '@Filter/ShareDir' version: 5.008 - class: Dist::Zilla::Plugin::MakeMaker name: '@Filter/MakeMaker' version: 5.008 - class: Dist::Zilla::Plugin::Manifest name: '@Filter/Manifest' version: 5.008 - class: Dist::Zilla::Plugin::TestRelease name: '@Filter/TestRelease' version: 5.008 - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Filter/ConfirmRelease' version: 5.008 - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Filter/UploadToCPAN' version: 5.008 - class: Dist::Zilla::Plugin::AutoPrereqs name: AutoPrereqs version: 5.008 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: runtime type: requires name: Prereqs version: 5.008 - class: Dist::Zilla::Plugin::OptionalFeature name: ConfigFromFile version: 0.008 - class: Dist::Zilla::Plugin::OptionalFeature name: Moose version: 0.008 - class: Dist::Zilla::Plugin::FinderCode name: MetaProvides::Package/AUTOVIV/:InstallModulesPM version: 5.008 - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: {} Dist::Zilla::Role::MetaProvider::Provider: inherit_missing: 1 inherit_version: 1 meta_noindex: 1 name: MetaProvides::Package version: 1.15000001 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: configure type: requires name: ConfigureRequires version: 5.008 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: build type: requires name: BuildRequires version: 5.008 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: DevelopRequires version: 5.008 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: recommends name: DevelopRecommends version: 5.008 - class: Dist::Zilla::Plugin::NextRelease name: NextRelease version: 5.008 - class: Dist::Zilla::Plugin::OurPkgVersion name: OurPkgVersion version: 0.005001 - class: Dist::Zilla::Plugin::PodWeaver config: Dist::Zilla::Plugin::PodWeaver: finder: - ':InstallModules' - ':ExecFiles' plugins: - class: Pod::Weaver::Plugin::EnsurePod5 name: '@CorePrep/EnsurePod5' version: 4.005 - class: Pod::Weaver::Plugin::H1Nester name: '@CorePrep/H1Nester' version: 4.005 - class: Pod::Weaver::Plugin::StopWords name: '-StopWords' version: 1.008 - class: Pod::Weaver::Section::Region name: ':stopwords' version: 4.005 - class: Pod::Weaver::Section::Name name: Name version: 4.005 - class: Pod::Weaver::Section::Version name: Version version: 4.005 - class: Pod::Weaver::Section::Region name: prelude version: 4.005 - class: Pod::Weaver::Section::Generic name: SYNOPSIS version: 4.005 - class: Pod::Weaver::Section::Generic name: USAGE version: 4.005 - class: Pod::Weaver::Section::Generic name: DESCRIPTION version: 4.005 - class: Pod::Weaver::Section::Generic name: OVERVIEW version: 4.005 - class: Pod::Weaver::Section::Generic name: 'REQUIRED ARGUMENTS' version: 4.005 - class: Pod::Weaver::Section::Generic name: OPTIONS version: 4.005 - class: Pod::Weaver::Section::Collect name: ATTRIBUTES version: 4.005 - class: Pod::Weaver::Section::Collect name: METHODS version: 4.005 - class: Pod::Weaver::Section::Collect name: FUNCTIONS version: 4.005 - class: Pod::Weaver::Section::Collect name: TYPES version: 4.005 - class: Pod::Weaver::Section::Generic name: DIAGNOSTICS version: 4.005 - class: Pod::Weaver::Section::Generic name: 'EXIT STATUS' version: 4.005 - class: Pod::Weaver::Section::Generic name: CONFIGURATION version: 4.005 - class: Pod::Weaver::Section::Generic name: 'CONFIGURATION AND ENVIRONMENT' version: 4.005 - class: Pod::Weaver::Section::Generic name: DEPENDENCIES version: 4.005 - class: Pod::Weaver::Section::Generic name: INCOMPATIBILITIES version: 4.005 - class: Pod::Weaver::Section::Leftovers name: Leftovers version: 4.005 - class: Pod::Weaver::Section::Region name: postlude version: 4.005 - class: Pod::Weaver::Section::Support name: Support version: 1.005 - class: Pod::Weaver::Section::Authors name: Authors version: 4.005 - class: Pod::Weaver::Section::Legal name: Legal version: 4.005 name: PodWeaver version: 4.002 - class: Dist::Zilla::Plugin::MetaConfig name: MetaConfig version: 5.008 - class: Dist::Zilla::Plugin::CheckChangeLog name: CheckChangeLog version: 0.01 - class: Dist::Zilla::Plugin::Test::ChangesHasContent name: Test::ChangesHasContent version: 0.006 - class: Dist::Zilla::Plugin::Test::EOL name: '@TestingMania/Test::EOL' version: 0.10 - class: Dist::Zilla::Plugin::MojibakeTests name: '@TestingMania/MojibakeTests' version: 0.5 - class: Dist::Zilla::Plugin::Test::Portability name: '@TestingMania/Test::Portability' version: 2.000005 - class: Dist::Zilla::Plugin::Test::Kwalitee name: '@TestingMania/Test::Kwalitee' version: 2.07 - class: Dist::Zilla::Plugin::Test::UnusedVars name: '@TestingMania/Test::UnusedVars' version: 2.000005 - class: Dist::Zilla::Plugin::MetaTests name: '@TestingMania/MetaTests' version: 5.008 - class: Dist::Zilla::Plugin::Test::CPAN::Changes name: '@TestingMania/Test::CPAN::Changes' version: 0.008 - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@TestingMania/PodSyntaxTests' version: 5.008 - class: Dist::Zilla::Plugin::Test::DistManifest name: '@TestingMania/Test::DistManifest' version: 2.000004 - class: Dist::Zilla::Plugin::Test::MinimumVersion name: '@TestingMania/Test::MinimumVersion' version: 2.000005 - class: Dist::Zilla::Plugin::Test::Perl::Critic name: '@TestingMania/Test::Perl::Critic' version: 2.112410 - class: Dist::Zilla::Plugin::PodCoverageTests name: '@TestingMania/PodCoverageTests' version: 5.008 - class: Dist::Zilla::Plugin::NoTabsTests config: Dist::Zilla::Plugin::Test::NoTabs: module_finder: - ':InstallModules' script_finder: - ':ExecFiles' name: '@TestingMania/NoTabsTests' version: 0.06 - class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: filename: t/00-compile.t module_finder: - ':InstallModules' script_finder: - ':ExecFiles' name: '@TestingMania/Test::Compile' version: 2.039 - class: Dist::Zilla::Plugin::Test::CPAN::Meta::JSON name: '@TestingMania/Test::CPAN::Meta::JSON' version: 0.003 - class: Dist::Zilla::Plugin::Test::Version name: '@TestingMania/Test::Version' version: 0.002004 - class: Dist::Zilla::Plugin::Test::Synopsis name: '@TestingMania/Test::Synopsis' version: 2.000004 - class: Dist::Zilla::Plugin::Test::Pod::LinkCheck name: '@TestingMania/Test::Pod::LinkCheck' version: 1.001 - class: Dist::Zilla::Plugin::PerlTidy name: PerlTidy version: 0.13 - class: Dist::Zilla::Plugin::ReadmeAnyFromPod name: ReadmeAnyFromPod version: 0.133360 - class: Dist::Zilla::Plugin::ReadmeAnyFromPod name: ReadmePodInRoot version: 0.133360 - class: Dist::Zilla::Plugin::ReportVersions name: ReportVersions version: 1.110730 - class: Dist::Zilla::Plugin::Test::LocalBrew name: Test::LocalBrew version: 0.05 - class: Dist::Zilla::Plugin::InstallGuide name: InstallGuide version: 1.200002 - class: Dist::Zilla::Plugin::MetaJSON name: MetaJSON version: 5.008 - class: Dist::Zilla::Plugin::Git::Check name: '@Git/Check' version: 2.019 - class: Dist::Zilla::Plugin::Git::Commit name: '@Git/Commit' version: 2.019 - class: Dist::Zilla::Plugin::Git::Tag name: '@Git/Tag' version: 2.019 - class: Dist::Zilla::Plugin::Git::Push name: '@Git/Push' version: 2.019 - class: Dist::Zilla::Plugin::Git::CommitBuild name: Git::CommitBuild version: 2.019 - class: Dist::Zilla::Plugin::Git::NextVersion name: Git::NextVersion version: 2.019 - class: Dist::Zilla::Plugin::GitHub::Meta name: '@GitHub/GitHub::Meta' version: 0.36 - class: Dist::Zilla::Plugin::GitHub::Update name: '@GitHub/GitHub::Update' version: 0.36 - class: Dist::Zilla::Plugin::GitHub::Meta name: GitHub::Meta version: 0.36 - class: Dist::Zilla::Plugin::InstallRelease name: InstallRelease version: 0.008 - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: 5.008 - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: 5.008 - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: 5.008 - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: 5.008 - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: 5.008 - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: 5.008 - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: 5.008 - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: 5.008 zilla: class: Dist::Zilla::Dist::Builder config: is_trial: 0 version: 5.008 MANIFEST100644000764000764 247312260552042 16426 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.008. Changes INSTALL LICENSE MANIFEST MANIFEST.SKIP META.json META.yml Makefile.PL README TODO dist.ini lib/MooseX/App/Cmd.pm lib/MooseX/App/Cmd/Command.pm lib/MouseX/App/Cmd.pm lib/MouseX/App/Cmd/Command.pm perlcritic.rc t/00-compile.t t/000-report-versions.t t/author-critic.t t/author-test-eol.t t/basic.t t/build_emulates_new.t t/configfile.t t/lib/Test/ConfigFromFile.pm t/lib/Test/ConfigFromFile/Command/boo.pm t/lib/Test/ConfigFromFile/Command/moo.pm t/lib/Test/ConfigFromFile/config.yaml t/lib/Test/MyAny/Moose.pm t/lib/Test/MyAny/Moose/Command/foo.pm t/lib/Test/MyAny/Mouse.pm t/lib/Test/MyAny/Mouse/Command/foo.pm t/lib/Test/MyCmd.pm t/lib/Test/MyCmd/Command/bark.pm t/lib/Test/MyCmd/Command/frobulate.pm t/lib/Test/MyCmd/Command/justusage.pm t/lib/Test/MyCmd/Command/stock.pm t/moose.t t/mouse.t t/release-changes_has_content.t t/release-cpan-changes.t t/release-dist-manifest.t t/release-distmeta.t t/release-kwalitee.t t/release-localbrew-perl-latest-TEST.t t/release-meta-json.t t/release-minimum-version.t t/release-mojibake.t t/release-no-tabs.t t/release-pod-coverage.t t/release-pod-linkcheck.t t/release-pod-syntax.t t/release-portability.t t/release-synopsis.t t/release-test-version.t t/release-unused-vars.t weaver.ini xt/author/perltidy.rc t000755000764000764 012260552042 15372 5ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27mouse.t100644000764000764 46012260552042 17027 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t#!perl -T use strict; use warnings; use Test::More; plan skip_all => 'Mouse and MouseX::Getopt required to test Mouse usage' if not eval { require Mouse; require MouseX::Getopt; 1 } or $@; plan tests => 2; use lib 't/lib'; use_ok('Test::MyAny::Mouse'); my $cmd = new_ok('Test::MyAny::Mouse'); basic.t100644000764000764 362612260552042 17007 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t#!perl -T use strict; use warnings; use Test::More tests => 12; use lib 't/lib'; use Test::MyCmd; my $cmd = Test::MyCmd->new; isa_ok( $cmd, 'Test::MyCmd' ); is_deeply( [ sort $cmd->command_names ], [ sort qw(help --help -h --version -? commands frob frobulate justusage stock bark version) ], 'got correct list of registered command names', ); use Data::Dumper; Dumper $cmd->command_plugins; is_deeply( [ sort $cmd->command_plugins ], [ qw( App::Cmd::Command::commands App::Cmd::Command::help App::Cmd::Command::version Test::MyCmd::Command::bark Test::MyCmd::Command::frobulate Test::MyCmd::Command::justusage Test::MyCmd::Command::stock ) ], 'got correct list of registered command plugins', ); { local @ARGV = qw(frob --widget wname your fat face); eval { $cmd->run }; is( $@, "the widget name is wname - your fat face\n", 'command died with the correct string', ); } { local @ARGV = qw(justusage); eval { $cmd->run }; my $error = $@; like( $error, qr/^basic.t justusage/, 'default usage_desc is okay' ); } { local @ARGV = qw(stock); eval { $cmd->run }; like( $@, qr/mandatory method/, 'un-subclassed &run leads to death' ); } { local @ARGV = qw(bark); eval { $cmd->run }; like( $@, qr/Mandatory parameter 'wow' missing in call to \(eval\)/, 'required option field is missing', ); } SKIP: { my $have_TO = eval { require Test::Output; 1; }; print STDERR $@; skip 'these tests require Test::Output', 5 unless $have_TO; local @ARGV = qw(commands); my ($output) = Test::Output::output_from( sub { $cmd->run } ); for my $name (qw(commands frobulate justusage stock bark)) { like( $output, qr/^\s+\Q$name\E/sm, "$name plugin in listing" ); } } moose.t100644000764000764 45712260552042 17027 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t#!perl -T use strict; use warnings; use Test::More; plan skip_all => 'Moose and MooseX::Getopt required to test Moose usage' if not eval { require Moose; require MooseX::Getopt; 1 } or $@; plan tests => 2; use lib 't/lib'; use_ok('Test::MyAny::Moose'); my $cmd = new_ok('Test::MyAny::Moose'); META.json100644000764000764 6033512260552042 16737 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27{ "abstract" : "Mashes up MooseX::Getopt and App::Cmd", "author" : [ "Yuval Kogman ", "Guillermo Roditi ", "Daisuke Maki ", "Vladimir Timofeev ", "Bruno Vecchi ", "Offer Kaye ", "Mark Gardner ", "Yanick Champoux ", "Dann ", "Ken Crowell ", "Michael Joyce " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 5.008, CPAN::Meta::Converter version 2.133380", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "MooseX-App-Cmd", "optional_features" : { "ConfigFromFile" : { "description" : "Command line options can be set from a configuration file", "prereqs" : { "runtime" : { "requires" : { "MouseX::ConfigFromFile" : "0" } } } }, "Moose" : { "description" : "Support for the Moose postmodern object system", "prereqs" : { "runtime" : { "requires" : { "Moose" : "0.86", "MooseX::ConfigFromFile" : "0.08", "MooseX::Getopt" : "0.18" } } } } }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.30" } }, "develop" : { "recommends" : { "Test::CPAN::Meta::JSON" : "0", "Test::DistManifest" : "0", "Test::EOL" : "0", "Test::MinimumVersion" : "0", "Test::Mojibake" : "0", "Test::Perl::Critic" : "0", "Test::Pod::Coverage" : "1.08", "Test::Pod::LinkCheck" : "0", "Test::Portability::Files" : "0", "Test::Synopsis" : "0", "Test::Vars" : "0", "Test::Version" : "0" }, "requires" : { "App::cpanminus" : "0", "App::perlbrew" : "0", "Dist::Zilla" : "0", "Moose" : "0.86", "MooseX::ConfigFromFile" : "0.08", "MooseX::Getopt" : "0.18", "MooseX::SimpleConfig" : "0", "MouseX::ConfigFromFile" : "0", "Perl::Critic::Bangs" : "0", "Perl::Critic::Lax" : "0", "Perl::Critic::Pulp" : "0", "Perl::Critic::StricterSubs" : "0", "Pod::Coverage::TrustPod" : "0", "Pod::Weaver::Plugin::StopWords" : "0", "Pod::Weaver::Section::Support" : "0", "Test::CPAN::Changes" : "0.19", "Test::CPAN::Meta" : "0", "Test::Kwalitee" : "1.12", "Test::More" : "0", "Test::NoTabs" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08" } }, "runtime" : { "recommends" : { "Moose" : "0.86", "MooseX::ConfigFromFile" : "0.08", "MooseX::Getopt" : "0.18", "MouseX::ConfigFromFile" : "0" }, "requires" : { "Any::Moose" : "0", "App::Cmd" : "0.321", "App::Cmd::Command" : "0", "English" : "0", "File::Basename" : "0", "Getopt::Long::Descriptive" : "0.091", "MouseX::Getopt" : "0", "Test::use::ok" : "0", "namespace::clean" : "0", "perl" : "5.006" } }, "test" : { "requires" : { "Carp" : "0", "Data::Dumper" : "0", "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Scalar::Util" : "0", "Test::More" : "0.94", "Test::Output" : "0", "YAML" : "0", "base" : "0", "lib" : "0", "strict" : "0", "warnings" : "0" } } }, "provides" : { "MooseX::App::Cmd" : { "file" : "lib/MooseX/App/Cmd.pm", "version" : "0.27" }, "MooseX::App::Cmd::Command" : { "file" : "lib/MooseX/App/Cmd/Command.pm", "version" : "0.27" }, "MouseX::App::Cmd" : { "file" : "lib/MouseX/App/Cmd.pm", "version" : "0.27" }, "MouseX::App::Cmd::Command" : { "file" : "lib/MouseX/App/Cmd/Command.pm", "version" : "0.27" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/mjgardner/moosex-app-cmd/issues" }, "homepage" : "http://metacpan.org/release/MooseX-App-Cmd/", "repository" : { "type" : "git", "url" : "git://github.com/mjgardner/moosex-app-cmd.git", "web" : "https://github.com/mjgardner/moosex-app-cmd" } }, "version" : "0.27", "x_Dist_Zilla" : { "perl" : { "version" : "5.018001" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::GatherDir", "name" : "@Filter/GatherDir", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@Filter/PruneCruft", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@Filter/ManifestSkip", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Filter/MetaYAML", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@Filter/License", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::ExtraTests", "name" : "@Filter/ExtraTests", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@Filter/ExecDir", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@Filter/ShareDir", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::MakeMaker", "name" : "@Filter/MakeMaker", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Filter/Manifest", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Filter/TestRelease", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Filter/ConfirmRelease", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Filter/UploadToCPAN", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "AutoPrereqs", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "runtime", "type" : "requires" } }, "name" : "Prereqs", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::OptionalFeature", "name" : "ConfigFromFile", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::OptionalFeature", "name" : "Moose", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : {}, "Dist::Zilla::Role::MetaProvider::Provider" : { "inherit_missing" : "1", "inherit_version" : "1", "meta_noindex" : "1" } }, "name" : "MetaProvides::Package", "version" : "1.15000001" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "configure", "type" : "requires" } }, "name" : "ConfigureRequires", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "build", "type" : "requires" } }, "name" : "BuildRequires", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "DevelopRequires", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "recommends" } }, "name" : "DevelopRecommends", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "NextRelease", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::OurPkgVersion", "name" : "OurPkgVersion", "version" : "0.005001" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "finder" : [ ":InstallModules", ":ExecFiles" ], "plugins" : [ { "class" : "Pod::Weaver::Plugin::EnsurePod5", "name" : "@CorePrep/EnsurePod5", "version" : "4.005" }, { "class" : "Pod::Weaver::Plugin::H1Nester", "name" : "@CorePrep/H1Nester", "version" : "4.005" }, { "class" : "Pod::Weaver::Plugin::StopWords", "name" : "-StopWords", "version" : "1.008" }, { "class" : "Pod::Weaver::Section::Region", "name" : ":stopwords", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Name", "name" : "Name", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Version", "name" : "Version", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Region", "name" : "prelude", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "SYNOPSIS", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "USAGE", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "DESCRIPTION", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "OVERVIEW", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "REQUIRED ARGUMENTS", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "OPTIONS", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "ATTRIBUTES", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "METHODS", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "FUNCTIONS", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "TYPES", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "DIAGNOSTICS", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "EXIT STATUS", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "CONFIGURATION", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "CONFIGURATION AND ENVIRONMENT", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "DEPENDENCIES", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "INCOMPATIBILITIES", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Leftovers", "name" : "Leftovers", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Region", "name" : "postlude", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Support", "name" : "Support", "version" : "1.005" }, { "class" : "Pod::Weaver::Section::Authors", "name" : "Authors", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Legal", "name" : "Legal", "version" : "4.005" } ] } }, "name" : "PodWeaver", "version" : "4.002" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "MetaConfig", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::CheckChangeLog", "name" : "CheckChangeLog", "version" : "0.01" }, { "class" : "Dist::Zilla::Plugin::Test::ChangesHasContent", "name" : "Test::ChangesHasContent", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Test::EOL", "name" : "@TestingMania/Test::EOL", "version" : "0.10" }, { "class" : "Dist::Zilla::Plugin::MojibakeTests", "name" : "@TestingMania/MojibakeTests", "version" : "0.5" }, { "class" : "Dist::Zilla::Plugin::Test::Portability", "name" : "@TestingMania/Test::Portability", "version" : "2.000005" }, { "class" : "Dist::Zilla::Plugin::Test::Kwalitee", "name" : "@TestingMania/Test::Kwalitee", "version" : "2.07" }, { "class" : "Dist::Zilla::Plugin::Test::UnusedVars", "name" : "@TestingMania/Test::UnusedVars", "version" : "2.000005" }, { "class" : "Dist::Zilla::Plugin::MetaTests", "name" : "@TestingMania/MetaTests", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", "name" : "@TestingMania/Test::CPAN::Changes", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@TestingMania/PodSyntaxTests", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::Test::DistManifest", "name" : "@TestingMania/Test::DistManifest", "version" : "2.000004" }, { "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", "name" : "@TestingMania/Test::MinimumVersion", "version" : "2.000005" }, { "class" : "Dist::Zilla::Plugin::Test::Perl::Critic", "name" : "@TestingMania/Test::Perl::Critic", "version" : "2.112410" }, { "class" : "Dist::Zilla::Plugin::PodCoverageTests", "name" : "@TestingMania/PodCoverageTests", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::NoTabsTests", "config" : { "Dist::Zilla::Plugin::Test::NoTabs" : { "module_finder" : [ ":InstallModules" ], "script_finder" : [ ":ExecFiles" ] } }, "name" : "@TestingMania/NoTabsTests", "version" : "0.06" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "config" : { "Dist::Zilla::Plugin::Test::Compile" : { "filename" : "t/00-compile.t", "module_finder" : [ ":InstallModules" ], "script_finder" : [ ":ExecFiles" ] } }, "name" : "@TestingMania/Test::Compile", "version" : "2.039" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Meta::JSON", "name" : "@TestingMania/Test::CPAN::Meta::JSON", "version" : "0.003" }, { "class" : "Dist::Zilla::Plugin::Test::Version", "name" : "@TestingMania/Test::Version", "version" : "0.002004" }, { "class" : "Dist::Zilla::Plugin::Test::Synopsis", "name" : "@TestingMania/Test::Synopsis", "version" : "2.000004" }, { "class" : "Dist::Zilla::Plugin::Test::Pod::LinkCheck", "name" : "@TestingMania/Test::Pod::LinkCheck", "version" : "1.001" }, { "class" : "Dist::Zilla::Plugin::PerlTidy", "name" : "PerlTidy", "version" : "0.13" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "name" : "ReadmeAnyFromPod", "version" : "0.133360" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "name" : "ReadmePodInRoot", "version" : "0.133360" }, { "class" : "Dist::Zilla::Plugin::ReportVersions", "name" : "ReportVersions", "version" : "1.110730" }, { "class" : "Dist::Zilla::Plugin::Test::LocalBrew", "name" : "Test::LocalBrew", "version" : "0.05" }, { "class" : "Dist::Zilla::Plugin::InstallGuide", "name" : "InstallGuide", "version" : "1.200002" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "MetaJSON", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "name" : "@Git/Check", "version" : "2.019" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "name" : "@Git/Commit", "version" : "2.019" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "name" : "@Git/Tag", "version" : "2.019" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "name" : "@Git/Push", "version" : "2.019" }, { "class" : "Dist::Zilla::Plugin::Git::CommitBuild", "name" : "Git::CommitBuild", "version" : "2.019" }, { "class" : "Dist::Zilla::Plugin::Git::NextVersion", "name" : "Git::NextVersion", "version" : "2.019" }, { "class" : "Dist::Zilla::Plugin::GitHub::Meta", "name" : "@GitHub/GitHub::Meta", "version" : "0.36" }, { "class" : "Dist::Zilla::Plugin::GitHub::Update", "name" : "@GitHub/GitHub::Update", "version" : "0.36" }, { "class" : "Dist::Zilla::Plugin::GitHub::Meta", "name" : "GitHub::Meta", "version" : "0.36" }, { "class" : "Dist::Zilla::Plugin::InstallRelease", "name" : "InstallRelease", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "5.008" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : "0" }, "version" : "5.008" } } } weaver.ini100644000764000764 162412260552042 17264 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27[@CorePrep] [-StopWords] [Region / :stopwords] [Name] [Version] [Region / prelude] [Generic / SYNOPSIS] [Generic / USAGE] [Generic / DESCRIPTION] [Generic / OVERVIEW] [Generic / REQUIRED ARGUMENTS] [Generic / OPTIONS] [Collect / ATTRIBUTES] command = attr [Collect / METHODS] command = method [Collect / FUNCTIONS] command = func [Collect / TYPES] command = type [Generic / DIAGNOSTICS] [Generic / EXIT STATUS] [Generic / CONFIGURATION] [Generic / CONFIGURATION AND ENVIRONMENT] [Generic / DEPENDENCIES] [Generic / INCOMPATIBILITIES] [Leftovers] [Region / postlude] [Support] all_modules = 1 bugs = metadata bugs_content = Please report any bugs or feature requests through the web bugs_content = interface at {WEB}. You will be automatically notified of any bugs_content = progress on the request by the system. websites = search, anno, ratings, kwalitee, testers, testmatrix, deps [Authors] [Legal] Makefile.PL100644000764000764 460612260552042 17247 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.008. use strict; use warnings; use 5.006; use ExtUtils::MakeMaker 6.30; my %WriteMakefileArgs = ( "ABSTRACT" => "Mashes up MooseX::Getopt and App::Cmd", "AUTHOR" => "Yuval Kogman , Guillermo Roditi , Daisuke Maki , Vladimir Timofeev , Bruno Vecchi , Offer Kaye , Mark Gardner , Yanick Champoux , Dann , Ken Crowell , Michael Joyce ", "BUILD_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => "6.30" }, "DISTNAME" => "MooseX-App-Cmd", "EXE_FILES" => [], "LICENSE" => "perl", "NAME" => "MooseX::App::Cmd", "PREREQ_PM" => { "Any::Moose" => 0, "App::Cmd" => "0.321", "App::Cmd::Command" => 0, "English" => 0, "File::Basename" => 0, "Getopt::Long::Descriptive" => "0.091", "MouseX::Getopt" => 0, "Test::use::ok" => 0, "namespace::clean" => 0 }, "TEST_REQUIRES" => { "Carp" => 0, "Data::Dumper" => 0, "File::Spec" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "Scalar::Util" => 0, "Test::More" => "0.94", "Test::Output" => 0, "YAML" => 0, "base" => 0, "lib" => 0, "strict" => 0, "warnings" => 0 }, "VERSION" => "0.27", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Any::Moose" => 0, "App::Cmd" => "0.321", "App::Cmd::Command" => 0, "Carp" => 0, "Data::Dumper" => 0, "English" => 0, "ExtUtils::MakeMaker" => 0, "File::Basename" => 0, "File::Spec" => 0, "Getopt::Long::Descriptive" => "0.091", "IO::Handle" => 0, "IPC::Open3" => 0, "MouseX::Getopt" => 0, "Scalar::Util" => 0, "Test::More" => "0.94", "Test::Output" => 0, "Test::use::ok" => 0, "YAML" => 0, "base" => 0, "lib" => 0, "namespace::clean" => 0, "strict" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); perlcritic.rc100644000764000764 224512260552042 17760 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27severity = brutal verbose = 8 exclude = CodeLayout::RequireUseUTF8 Compatibility::PodMinimumVersion Documentation::RequirePODUseEncodingUTF8 Editor::RequireEmacsFileVariables Miscellanea::RequireRcsKeywords Modules::RequireExplicitPackage CodeLayout::ProhibitHashBarewords Tics::ProhibitLongLines [CodeLayout::RequireTidyCode] perltidyrc = xt/author/perltidy.rc [Lax::RequireExplicitPackage::ExceptForPragmata] allowed_pragmata = diagnostics feature perlversion strict warnings utf8 [Documentation::PodSpelling] stop_words = bugtracker Perldoc perldoc [Documentation::RequirePodSections] lib_sections = NAME | VERSION | DESCRIPTION | SYNOPSIS | COPYRIGHT AND LICENSE script_sections = NAME | USAGE | OPTIONS | EXIT STATUS | COPYRIGHT AND LICENSE [Subroutines::ProhibitCallsToUndeclaredSubs] exempt_subs = Any::Moose::any_moose Any::Moose::blessed Any::Moose::extends Any::Moose::has Any::Moose::override Any::Moose::with Mouse::extends [Subroutines::ProhibitUnusedPrivateSubroutines] private_name_regex = _(?!build_)\w+ [TestingAndDebugging::RequireUseStrict] equivalent_modules = Any::Moose Mouse [TestingAndDebugging::RequireUseWarnings] equivalent_modules = Any::Moose Mouse MANIFEST.SKIP100644000764000764 204612260552042 17167 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27#!start included /home/gardnerm/perl5/perlbrew/perls/perl-5.14.2-usethreads/lib/site_perl/5.14.2/ExtUtils/MANIFEST.SKIP # Avoid version control files. \bRCS\b \bCVS\b \bSCCS\b ,v$ \B\.svn\b \B\.git\b \B\.gitignore\b \b_darcs\b \B\.cvsignore$ # Avoid VMS specific MakeMaker generated files \bDescrip.MMS$ \bDESCRIP.MMS$ \bdescrip.mms$ # Avoid Makemaker generated and utility files. \bMANIFEST\.bak \bMakefile$ \bblib/ \bMakeMaker-\d \bpm_to_blib\.ts$ \bpm_to_blib$ \bblibdirs\.ts$ # 6.18 through 6.25 generated this # Avoid Module::Build generated and utility files. \bBuild$ \b_build/ \bBuild.bat$ \bBuild.COM$ \bBUILD.COM$ \bbuild.com$ # Avoid temp and backup files. ~$ \.old$ \#$ \b\.# \.bak$ \.tmp$ \.# \.rej$ # Avoid OS-specific files/dirs # Mac OSX metadata \B\.DS_Store # Mac OSX SMB mount metadata files \B\._ # Avoid Devel::Cover and Devel::CoverX::Covered files. \bcover_db\b \bcovered\b # Avoid MYMETA files ^MYMETA\. #!end included /home/gardnerm/perl5/perlbrew/perls/perl-5.14.2-usethreads/lib/site_perl/5.14.2/ExtUtils/MANIFEST.SKIP configfile.t100644000764000764 166312260552042 20032 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t#!perl -T use strict; use warnings; use Test::More; use Any::Moose; BEGIN { eval 'require ' . any_moose('X::ConfigFromFile') . '; require YAML;'; if ($@) { plan skip_all => 'These tests require Mo(o|u)seX::ConfigFromFile and YAML'; } else { plan tests => 3; } } use lib 't/lib'; use Test::ConfigFromFile; my $cmd = Test::ConfigFromFile->new; { local @ARGV = qw(moo); eval { $cmd->run }; like( $@, qr/Mandatory parameter 'moo' missing in call to \(eval\)/, 'command died with the correct string', ); } { local @ARGV = qw(moo --configfile=t/lib/Test/ConfigFromFile/config.yaml); eval { $cmd->run }; like( $@, qr/cows go moo1 moo2 moo3/, 'command died with the correct string', ); } { local @ARGV = qw(boo); eval { $cmd->run }; like( $@, qr/ghosts go moo1 moo2 moo3/, 'default configfile read', ); } 00-compile.t100644000764000764 205512260552042 17566 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/tuse 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.039 use Test::More tests => 4 + ( $ENV{AUTHOR_TESTING} ? 1 : 0 ); my @module_files = ( 'MooseX/App/Cmd.pm', 'MooseX/App/Cmd/Command.pm', 'MouseX/App/Cmd.pm', 'MouseX/App/Cmd/Command.pm' ); # no fake home requested my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib'; use File::Spec; use IPC::Open3; use IO::Handle; open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my @warnings; for my $lib (@module_files) { # see L my $stderr = IO::Handle->new; my $pid = open3( $stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]" ); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid( $pid, 0 ); is( $?, 0, "$lib loaded ok" ); if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } is( scalar(@warnings), 0, 'no warnings found' ) if $ENV{AUTHOR_TESTING}; author-critic.t100644000764000764 72512260552042 20460 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t#!perl BEGIN { unless ( $ENV{AUTHOR_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for testing by the author' ); } } use strict; use warnings; use Test::More; use English qw(-no_match_vars); eval "use Test::Perl::Critic"; plan skip_all => 'Test::Perl::Critic required to criticise code' if $@; Test::Perl::Critic->import( -profile => "perlcritic.rc" ) if -e "perlcritic.rc"; all_critic_ok(); Test000755000764000764 012260552042 17057 5ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t/libMyCmd.pm100644000764000764 11012260552042 20536 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t/lib/Testpackage Test::MyCmd; use Any::Moose; extends qw(MooseX::App::Cmd); 1; author-test-eol.t100644000764000764 52612260552042 20736 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t BEGIN { unless ( $ENV{AUTHOR_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for testing by the author' ); } } use strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::EOL 0.10 use Test::EOL; all_perl_files_ok( { trailing_whitespace => 1 } ); release-no-tabs.t100644000764000764 77412260552042 20670 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::NoTabsTests 0.06 use Test::More 0.88; use Test::NoTabs; my @files = ( 'lib/MooseX/App/Cmd.pm', 'lib/MooseX/App/Cmd/Command.pm', 'lib/MouseX/App/Cmd.pm', 'lib/MouseX/App/Cmd/Command.pm' ); notabs_ok($_) foreach @files; done_testing; release-mojibake.t100644000764000764 67712260552042 21110 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use strict; use warnings qw(all); use Test::More; ## no critic (ProhibitStringyEval, RequireCheckingReturnValueOfEval) eval q(use Test::Mojibake); plan skip_all => q(Test::Mojibake required for source encoding testing) if $@; all_files_encoding_ok(); release-kwalitee.t100644000764000764 46012260552042 21122 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } # this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.07 use strict; use warnings; use Test::Kwalitee; release-distmeta.t100644000764000764 62412260552042 21131 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } # This file was automatically generated by Dist::Zilla::Plugin::MetaTests. use Test::More; eval "use Test::CPAN::Meta"; plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@; meta_yaml_ok(); release-synopsis.t100644000764000764 51312260552042 21203 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use Test::More; eval "use Test::Synopsis"; plan skip_all => "Test::Synopsis required for testing synopses" if $@; all_synopsis_ok(); App000755000764000764 012260552042 17627 5ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/lib/MooseXCmd.pm100644000764000764 1333212260552042 21052 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/lib/MooseX/Appuse 5.006; package MooseX::App::Cmd; use Any::Moose; use English '-no_match_vars'; use File::Basename (); our $VERSION = '0.27'; # VERSION use namespace::clean -except => 'meta'; extends any_moose('::Object'), 'App::Cmd'; sub BUILDARGS { my ( undef, @arg ) = @_; return {} if !@arg; return { arg => $arg[0] } if 1 == @arg; return {@arg}; } sub BUILD { my $self = shift; my $class = blessed $self; $self->{arg0} = File::Basename::basename($PROGRAM_NAME); $self->{command} = $class->_command( {} ); $self->{full_arg0} = $PROGRAM_NAME; return; } ## no critic (Modules::RequireExplicitInclusion) __PACKAGE__->meta->make_immutable(); no Any::Moose; 1; # ABSTRACT: Mashes up MooseX::Getopt and App::Cmd __END__ =pod =for :stopwords Yuval Kogman Guillermo Roditi Daisuke Maki Vladimir Timofeev Bruno Vecchi Offer Kaye Mark Gardner Yanick Champoux Dann Ken Crowell Michael Joyce Infinity Interactive, cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 NAME MooseX::App::Cmd - Mashes up MooseX::Getopt and App::Cmd =head1 VERSION version 0.27 =head1 SYNOPSIS package YourApp::Cmd; use Moose; extends qw(MooseX::App::Cmd); package YourApp::Cmd::Command::blort; use Moose; extends qw(MooseX::App::Cmd::Command); has blortex => ( traits => [qw(Getopt)], isa => 'Bool', is => 'rw', cmd_aliases => 'X', documentation => 'use the blortext algorithm', ); has recheck => ( traits => [qw(Getopt)], isa => 'Bool', is => 'rw', cmd_aliases => 'r', documentation => 'recheck all results', ); sub execute { my ( $self, $opt, $args ) = @_; # you may ignore $opt, it's in the attributes anyway my $result = $self->blortex ? blortex() : blort(); recheck($result) if $self->recheck; print $result; } =head1 DESCRIPTION This module marries L with L. Use it like L advises (especially see L), swapping L for L. Then you can write your moose commands as Moose classes, with L defining the options for you instead of C returning a L spec. =head1 METHODS =head2 BUILD After calling C this method is automatically run, setting underlying L attributes as per its documentation. =head1 SEE ALSO =over =item L =item L =item L =item L =back =head1 SUPPORT =head2 Perldoc You can find documentation for this module with the perldoc command. perldoc MooseX::App::Cmd =head2 Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. =over 4 =item * Search CPAN The default CPAN search engine, useful to view POD in HTML format. L =item * AnnoCPAN The AnnoCPAN is a website that allows community annotations of Perl module documentation. L =item * CPAN Ratings The CPAN Ratings is a website that allows community ratings and reviews of Perl modules. L =item * CPANTS The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. L =item * CPAN Testers The CPAN Testers is a network of smokers who run automated tests on uploaded CPAN distributions. L =item * CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. L =item * CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. L =back =head2 Bugs / Feature Requests Please report any bugs or feature requests through the web interface at L. You will be automatically notified of any progress on the request by the system. =head2 Source Code The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) L git clone git://github.com/mjgardner/moosex-app-cmd.git =head1 AUTHORS =over 4 =item * Yuval Kogman =item * Guillermo Roditi =item * Daisuke Maki =item * Vladimir Timofeev =item * Bruno Vecchi =item * Offer Kaye =item * Mark Gardner =item * Yanick Champoux =item * Dann =item * Ken Crowell =item * Michael Joyce =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2013 by Infinity Interactive, Yuval Kogman. 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 App000755000764000764 012260552042 17635 5ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/lib/MouseXCmd.pm100644000764000764 1167112260552042 21064 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/lib/MouseX/Appuse 5.006; package MouseX::App::Cmd; use Mouse; our $VERSION = '0.27'; # VERSION use namespace::clean -except => 'meta'; extends 'MooseX::App::Cmd'; __PACKAGE__->meta->make_immutable(); ## no critic (RequireExplicitInclusion) no Mouse; 1; # ABSTRACT: Mashes up MouseX::Getopt and App::Cmd __END__ =pod =for :stopwords Yuval Kogman Guillermo Roditi Daisuke Maki Vladimir Timofeev Bruno Vecchi Offer Kaye Mark Gardner Yanick Champoux Dann Ken Crowell Michael Joyce Infinity Interactive, cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 NAME MouseX::App::Cmd - Mashes up MouseX::Getopt and App::Cmd =head1 VERSION version 0.27 =head1 SYNOPSIS package YourApp::Cmd; use Mouse; extends qw(MouseX::App::Cmd); package YourApp::Cmd::Command::blort; use Mouse; extends qw(MouseX::App::Cmd::Command); has blortex => ( traits => [qw(Getopt)], isa => 'Bool', is => 'rw', cmd_aliases => 'X', documentation => 'use the blortext algorithm', ); has recheck => ( traits => [qw(Getopt)], isa => 'Bool', is => 'rw', cmd_aliases => 'r', documentation => 'recheck all results', ); sub execute { my ( $self, $opt, $args ) = @_; # you may ignore $opt, it's in the attributes anyway my $result = $self->blortex ? blortex() : blort(); recheck($result) if $self->recheck; print $result; } =head1 DESCRIPTION This module marries L with L. It extends L which uses L to work with either L or L. Consult those modules' documentation for full usage information. =head1 SEE ALSO =over =item L =item L =item L =item L =item L =back =head1 SUPPORT =head2 Perldoc You can find documentation for this module with the perldoc command. perldoc MooseX::App::Cmd =head2 Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. =over 4 =item * Search CPAN The default CPAN search engine, useful to view POD in HTML format. L =item * AnnoCPAN The AnnoCPAN is a website that allows community annotations of Perl module documentation. L =item * CPAN Ratings The CPAN Ratings is a website that allows community ratings and reviews of Perl modules. L =item * CPANTS The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. L =item * CPAN Testers The CPAN Testers is a network of smokers who run automated tests on uploaded CPAN distributions. L =item * CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. L =item * CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. L =back =head2 Bugs / Feature Requests Please report any bugs or feature requests through the web interface at L. You will be automatically notified of any progress on the request by the system. =head2 Source Code The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) L git clone git://github.com/mjgardner/moosex-app-cmd.git =head1 AUTHORS =over 4 =item * Yuval Kogman =item * Guillermo Roditi =item * Daisuke Maki =item * Vladimir Timofeev =item * Bruno Vecchi =item * Offer Kaye =item * Mark Gardner =item * Yanick Champoux =item * Dann =item * Ken Crowell =item * Michael Joyce =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2013 by Infinity Interactive, Yuval Kogman. 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 author000755000764000764 012260552042 17064 5ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/xtperltidy.rc100644000764000764 106412260552042 21407 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/xt/author-l=78 # Max line width is 78 cols -i=4 # Indent level is 4 cols -ci=4 # Continuation indent is 4 cols -vt=2 # Maximal vertical tightness -cti=0 # No extra indentation for closing brackets -pt=1 # Medium parenthesis tightness -bt=1 # Medium brace tightness -sbt=1 # Medium square bracket tightness -bbt=1 # Medium block brace tightness -nsfs # No space before semicolons -nolq # Don't outdent long quoted strings -wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x=" # Break before all operators release-meta-json.t100644000764000764 53012260552042 21210 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use Test::More; eval 'use Test::CPAN::Meta::JSON'; plan skip_all => 'Test::CPAN::Meta::JSON required for testing META.json' if $@; meta_json_ok(); build_emulates_new.t100644000764000764 37612260552042 21554 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t#!perl -T use strict; use warnings; use Test::More tests => 1; { package Foo; use base 'App::Cmd'; package Bar; use Any::Moose; extends 'MooseX::App::Cmd'; } is_deeply( \%{ Bar->new }, \%{ Foo->new }, 'Internal hashes match' ); release-pod-syntax.t100644000764000764 62412260552042 21425 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use Test::More; eval "use Test::Pod 1.41"; plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; all_pod_files_ok(); release-portability.t100644000764000764 56712260552042 21667 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use strict; use warnings; use Test::More; eval 'use Test::Portability::Files'; plan skip_all => 'Test::Portability::Files required for testing portability' if $@; run_tests(); release-unused-vars.t100644000764000764 50212260552042 21566 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use Test::More; eval "use Test::Vars"; plan skip_all => "Test::Vars required for testing unused vars" if $@; all_vars_ok(); 000-report-versions.t100644000764000764 3206712260552042 21425 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t#!perl use warnings; use strict; use Test::More 0.94; # Include a cut-down version of YAML::Tiny so we don't introduce unnecessary # dependencies ourselves. package Local::YAML::Tiny; use strict; use Carp 'croak'; # UTF Support? sub HAVE_UTF8 () { $] >= 5.007003 } BEGIN { if (HAVE_UTF8) { # The string eval helps hide this from Test::MinimumVersion eval "require utf8;"; die "Failed to load UTF-8 support" if $@; } # Class structure require 5.004; $YAML::Tiny::VERSION = '1.40'; # Error storage $YAML::Tiny::errstr = ''; } # Printable characters for escapes my %UNESCAPES = ( z => "\x00", a => "\x07", t => "\x09", n => "\x0a", v => "\x0b", f => "\x0c", r => "\x0d", e => "\x1b", '\\' => '\\', ); ##################################################################### # Implementation # Create an empty YAML::Tiny object sub new { my $class = shift; bless [@_], $class; } # Create an object from a file sub read { my $class = ref $_[0] ? ref shift : shift; # Check the file my $file = shift or return $class->_error('You did not specify a file name'); return $class->_error("File '$file' does not exist") unless -e $file; return $class->_error("'$file' is a directory, not a file") unless -f _; return $class->_error("Insufficient permissions to read '$file'") unless -r _; # Slurp in the file local $/ = undef; local *CFG; unless ( open( CFG, $file ) ) { return $class->_error("Failed to open file '$file': $!"); } my $contents = ; unless ( close(CFG) ) { return $class->_error("Failed to close file '$file': $!"); } $class->read_string($contents); } # Create an object from a string sub read_string { my $class = ref $_[0] ? ref shift : shift; my $self = bless [], $class; my $string = $_[0]; unless ( defined $string ) { return $self->_error("Did not provide a string to load"); } # Byte order marks # NOTE: Keeping this here to educate maintainers # my %BOM = ( # "\357\273\277" => 'UTF-8', # "\376\377" => 'UTF-16BE', # "\377\376" => 'UTF-16LE', # "\377\376\0\0" => 'UTF-32LE' # "\0\0\376\377" => 'UTF-32BE', # ); if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) { return $self->_error("Stream has a non UTF-8 BOM"); } else { # Strip UTF-8 bom if found, we'll just ignore it $string =~ s/^\357\273\277//; } # Try to decode as utf8 utf8::decode($string) if HAVE_UTF8; # Check for some special cases return $self unless length $string; unless ( $string =~ /[\012\015]+\z/ ) { return $self->_error("Stream does not end with newline character"); } # Split the file into lines my @lines = grep { !/^\s*(?:\#.*)?\z/ } split /(?:\015{1,2}\012|\015|\012)/, $string; # Strip the initial YAML header @lines and $lines[0] =~ /^\%YAML[: ][\d\.]+.*\z/ and shift @lines; # A nibbling parser while (@lines) { # Do we have a document header? if ( $lines[0] =~ /^---\s*(?:(.+)\s*)?\z/ ) { # Handle scalar documents shift @lines; if ( defined $1 and $1 !~ /^(?:\#.+|\%YAML[: ][\d\.]+)\z/ ) { push @$self, $self->_read_scalar( "$1", [undef], \@lines ); next; } } if ( !@lines or $lines[0] =~ /^(?:---|\.\.\.)/ ) { # A naked document push @$self, undef; while ( @lines and $lines[0] !~ /^---/ ) { shift @lines; } } elsif ( $lines[0] =~ /^\s*\-/ ) { # An array at the root my $document = []; push @$self, $document; $self->_read_array( $document, [0], \@lines ); } elsif ( $lines[0] =~ /^(\s*)\S/ ) { # A hash at the root my $document = {}; push @$self, $document; $self->_read_hash( $document, [ length($1) ], \@lines ); } else { croak("YAML::Tiny failed to classify the line '$lines[0]'"); } } $self; } # Deparse a scalar string to the actual scalar sub _read_scalar { my ( $self, $string, $indent, $lines ) = @_; # Trim trailing whitespace $string =~ s/\s*\z//; # Explitic null/undef return undef if $string eq '~'; # Quotes if ( $string =~ /^\'(.*?)\'\z/ ) { return '' unless defined $1; $string = $1; $string =~ s/\'\'/\'/g; return $string; } if ( $string =~ /^\"((?:\\.|[^\"])*)\"\z/ ) { # Reusing the variable is a little ugly, # but avoids a new variable and a string copy. $string = $1; $string =~ s/\\"/"/g; $string =~ s/\\([never\\fartz]|x([0-9a-fA-F]{2}))/(length($1)>1)?pack("H2",$2):$UNESCAPES{$1}/gex; return $string; } # Special cases if ( $string =~ /^[\'\"!&]/ ) { croak("YAML::Tiny does not support a feature in line '$lines->[0]'"); } return {} if $string eq '{}'; return [] if $string eq '[]'; # Regular unquoted string return $string unless $string =~ /^[>|]/; # Error croak("YAML::Tiny failed to find multi-line scalar content") unless @$lines; # Check the indent depth $lines->[0] =~ /^(\s*)/; $indent->[-1] = length("$1"); if ( defined $indent->[-2] and $indent->[-1] <= $indent->[-2] ) { croak("YAML::Tiny found bad indenting in line '$lines->[0]'"); } # Pull the lines my @multiline = (); while (@$lines) { $lines->[0] =~ /^(\s*)/; last unless length($1) >= $indent->[-1]; push @multiline, substr( shift(@$lines), length($1) ); } my $j = ( substr( $string, 0, 1 ) eq '>' ) ? ' ' : "\n"; my $t = ( substr( $string, 1, 1 ) eq '-' ) ? '' : "\n"; return join( $j, @multiline ) . $t; } # Parse an array sub _read_array { my ( $self, $array, $indent, $lines ) = @_; while (@$lines) { # Check for a new document if ( $lines->[0] =~ /^(?:---|\.\.\.)/ ) { while ( @$lines and $lines->[0] !~ /^---/ ) { shift @$lines; } return 1; } # Check the indent level $lines->[0] =~ /^(\s*)/; if ( length($1) < $indent->[-1] ) { return 1; } elsif ( length($1) > $indent->[-1] ) { croak("YAML::Tiny found bad indenting in line '$lines->[0]'"); } if ( $lines->[0] =~ /^(\s*\-\s+)[^\'\"]\S*\s*:(?:\s+|$)/ ) { # Inline nested hash my $indent2 = length("$1"); $lines->[0] =~ s/-/ /; push @$array, {}; $self->_read_hash( $array->[-1], [ @$indent, $indent2 ], $lines ); } elsif ( $lines->[0] =~ /^\s*\-(\s*)(.+?)\s*\z/ ) { # Array entry with a value shift @$lines; push @$array, $self->_read_scalar( "$2", [ @$indent, undef ], $lines ); } elsif ( $lines->[0] =~ /^\s*\-\s*\z/ ) { shift @$lines; unless (@$lines) { push @$array, undef; return 1; } if ( $lines->[0] =~ /^(\s*)\-/ ) { my $indent2 = length("$1"); if ( $indent->[-1] == $indent2 ) { # Null array entry push @$array, undef; } else { # Naked indenter push @$array, []; $self->_read_array( $array->[-1], [ @$indent, $indent2 ], $lines ); } } elsif ( $lines->[0] =~ /^(\s*)\S/ ) { push @$array, {}; $self->_read_hash( $array->[-1], [ @$indent, length("$1") ], $lines ); } else { croak("YAML::Tiny failed to classify line '$lines->[0]'"); } } elsif ( defined $indent->[-2] and $indent->[-1] == $indent->[-2] ) { # This is probably a structure like the following... # --- # foo: # - list # bar: value # # ... so lets return and let the hash parser handle it return 1; } else { croak("YAML::Tiny failed to classify line '$lines->[0]'"); } } return 1; } # Parse an array sub _read_hash { my ( $self, $hash, $indent, $lines ) = @_; while (@$lines) { # Check for a new document if ( $lines->[0] =~ /^(?:---|\.\.\.)/ ) { while ( @$lines and $lines->[0] !~ /^---/ ) { shift @$lines; } return 1; } # Check the indent level $lines->[0] =~ /^(\s*)/; if ( length($1) < $indent->[-1] ) { return 1; } elsif ( length($1) > $indent->[-1] ) { croak("YAML::Tiny found bad indenting in line '$lines->[0]'"); } # Get the key unless ( $lines->[0] =~ s/^\s*([^\'\" ][^\n]*?)\s*:(\s+|$)// ) { if ( $lines->[0] =~ /^\s*[?\'\"]/ ) { croak( "YAML::Tiny does not support a feature in line '$lines->[0]'" ); } croak("YAML::Tiny failed to classify line '$lines->[0]'"); } my $key = $1; # Do we have a value? if ( length $lines->[0] ) { # Yes $hash->{$key} = $self->_read_scalar( shift(@$lines), [ @$indent, undef ], $lines ); } else { # An indent shift @$lines; unless (@$lines) { $hash->{$key} = undef; return 1; } if ( $lines->[0] =~ /^(\s*)-/ ) { $hash->{$key} = []; $self->_read_array( $hash->{$key}, [ @$indent, length($1) ], $lines ); } elsif ( $lines->[0] =~ /^(\s*)./ ) { my $indent2 = length("$1"); if ( $indent->[-1] >= $indent2 ) { # Null hash entry $hash->{$key} = undef; } else { $hash->{$key} = {}; $self->_read_hash( $hash->{$key}, [ @$indent, length($1) ], $lines ); } } } } return 1; } # Set error sub _error { $YAML::Tiny::errstr = $_[1]; undef; } # Retrieve error sub errstr { $YAML::Tiny::errstr; } ##################################################################### # Use Scalar::Util if possible, otherwise emulate it BEGIN { eval { require Scalar::Util; }; if ($@) { # Failed to load Scalar::Util eval <<'END_PERL'; sub refaddr { my $pkg = ref($_[0]) or return undef; if (!!UNIVERSAL::can($_[0], 'can')) { bless $_[0], 'Scalar::Util::Fake'; } else { $pkg = undef; } "$_[0]" =~ /0x(\w+)/; my $i = do { local $^W; hex $1 }; bless $_[0], $pkg if defined $pkg; $i; } END_PERL } else { Scalar::Util->import('refaddr'); } } ##################################################################### # main test ##################################################################### package main; BEGIN { # Skip modules that either don't want to be loaded directly, such as # Module::Install, or that mess with the test count, such as the Test::* # modules listed here. # # Moose::Role conflicts if Moose is loaded as well, but Moose::Role is in # the Moose distribution and it's certain that someone who uses # Moose::Role also uses Moose somewhere, so if we disallow Moose::Role, # we'll still get the relevant version number. my %skip = map { $_ => 1 } qw( App::FatPacker Class::Accessor::Classy Devel::Cover Module::Install Moose::Role POE::Loop::Tk Template::Test Test::Kwalitee Test::Pod::Coverage Test::Portability::Files Test::YAML::Meta open ); my $Test = Test::Builder->new; $Test->plan( skip_all => "META.yml could not be found" ) unless -f 'META.yml' and -r _; my $meta = ( Local::YAML::Tiny->read('META.yml') )->[0]; my %requires; for my $require_key ( grep {/requires/} keys %$meta ) { my %h = %{ $meta->{$require_key} }; $requires{$_}++ for keys %h; } delete $requires{perl}; diag("Testing with Perl $], $^X"); for my $module ( sort keys %requires ) { if ( $skip{$module} ) { note "$module doesn't want to be loaded directly, skipping"; next; } local $SIG{__WARN__} = sub { note "$module: $_[0]" }; require_ok $module or BAIL_OUT("can't load $module"); my $version = $module->VERSION; $version = 'undefined' unless defined $version; diag(" $module version is $version"); } done_testing; } release-cpan-changes.t100644000764000764 55412260552042 21650 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use strict; use warnings; use Test::More 0.96 tests => 2; use_ok('Test::CPAN::Changes'); subtest 'changes_ok' => sub { changes_file_ok('Changes'); }; done_testing(); release-pod-coverage.t100644000764000764 115112260552042 21706 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } # This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests. use Test::More; eval "use Test::Pod::Coverage 1.08"; plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage" if $@; eval "use Pod::Coverage::TrustPod"; plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage" if $@; all_pod_coverage_ok( { coverage_class => 'Pod::Coverage::TrustPod' } ); release-test-version.t100644000764000764 113012260552042 21772 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::Version 0.002004 BEGIN { eval "use Test::Version; 1;" or die $@; } my @imports = ('version_all_ok'); my $params = { is_strict => 0, has_version => 1, }; push @imports, $params if version->parse($Test::Version::VERSION) >= version->parse('1.002'); Test::Version->import(@imports); version_all_ok; done_testing; MyAny000755000764000764 012260552042 20114 5ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t/lib/TestMouse.pm100644000764000764 11212260552042 21654 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t/lib/Test/MyAnypackage Test::MyAny::Mouse; use Mouse; extends qw(MouseX::App::Cmd); 1; Moose.pm100644000764000764 11212260552042 21646 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t/lib/Test/MyAnypackage Test::MyAny::Moose; use Moose; extends qw(MooseX::App::Cmd); 1; release-dist-manifest.t100644000764000764 52312260552042 22064 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use Test::More; eval "use Test::DistManifest"; plan skip_all => "Test::DistManifest required for testing the manifest" if $@; manifest_ok(); release-pod-linkcheck.t100644000764000764 105712260552042 22053 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use strict; use warnings; use Test::More; foreach my $env_skip ( qw( SKIP_POD_LINKCHECK ) ) { plan skip_all => "\$ENV{$env_skip} is set, skipping" if $ENV{$env_skip}; } eval "use Test::Pod::LinkCheck"; if ($@) { plan skip_all => 'Test::Pod::LinkCheck required for testing POD'; } else { Test::Pod::LinkCheck->new->all_pod_ok; } release-minimum-version.t100644000764000764 56312260552042 22457 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use Test::More; eval "use Test::MinimumVersion"; plan skip_all => "Test::MinimumVersion required for testing minimum versions" if $@; all_minimum_version_from_metayml_ok(); ConfigFromFile.pm100644000764000764 12112260552042 22360 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t/lib/Testpackage Test::ConfigFromFile; use Any::Moose; extends qw(MooseX::App::Cmd); 1; Cmd000755000764000764 012260552042 20332 5ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/lib/MooseX/AppCommand.pm100644000764000764 1453712260552042 22440 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/lib/MooseX/App/Cmduse 5.006; package MooseX::App::Cmd::Command; use Any::Moose; our $VERSION = '0.27'; # VERSION use Getopt::Long::Descriptive (); use namespace::clean -except => 'meta'; extends any_moose('::Object'), 'App::Cmd::Command'; with any_moose('X::Getopt'); has usage => ( is => 'ro', required => 1, metaclass => 'NoGetopt', isa => 'Object', ); has app => ( is => 'ro', required => 1, metaclass => 'NoGetopt', isa => 'MooseX::App::Cmd', ); override _process_args => sub { my ( $class, $args ) = @_; local @ARGV = @{$args}; my $config_from_file; if ( $class->meta->does_role( any_moose('X::ConfigFromFile') ) ) { local @ARGV = @ARGV; my $configfile; my $opt_parser; { ## no critic (Modules::RequireExplicitInclusion) $opt_parser = Getopt::Long::Parser->new( config => ['pass_through'] ); } $opt_parser->getoptions( 'configfile=s' => \$configfile ); if ( not defined $configfile and $class->can('_get_default_configfile') ) { $configfile = $class->_get_default_configfile(); } if ( defined $configfile ) { $config_from_file = $class->get_config_from_file($configfile); } } my %processed = $class->_parse_argv( params => { argv => \@ARGV }, options => [ $class->_attrs_to_options($config_from_file) ], ); return ( $processed{params}, $processed{argv}, usage => $processed{usage}, # params from CLI are also fields in MooseX::Getopt $config_from_file ? ( %{$config_from_file}, %{ $processed{params} } ) : %{ $processed{params} }, ); }; sub _usage_format { ## no critic (ProhibitUnusedPrivateSubroutines) return shift->usage_desc; } ## no critic (Modules::RequireExplicitInclusion) __PACKAGE__->meta->make_immutable(); no Any::Moose; 1; # ABSTRACT: Base class for MooseX::Getopt based App::Cmd::Commands __END__ =pod =for :stopwords Yuval Kogman Guillermo Roditi Daisuke Maki Vladimir Timofeev Bruno Vecchi Offer Kaye Mark Gardner Yanick Champoux Dann Ken Crowell Michael Joyce Infinity Interactive, cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 NAME MooseX::App::Cmd::Command - Base class for MooseX::Getopt based App::Cmd::Commands =head1 VERSION version 0.27 =head1 SYNOPSIS use Moose; extends qw(MooseX::App::Cmd::Command); # no need to set opt_spec # see MooseX::Getopt for documentation on how to specify options has option_field => ( isa => 'Str', is => 'rw', required => 1, ); sub execute { my ( $self, $opts, $args ) = @_; print $self->option_field; # also available in $opts->{option_field} } =head1 DESCRIPTION This is a replacement base class for L classes that includes L and the glue to combine the two. =head1 METHODS =head2 _process_args Replaces L's argument processing in favor of L based processing. If your class does the L role (or any of its consuming roles like L), this will provide an additional B<--configfile> command line option for loading options from a configuration file. =head1 SUPPORT =head2 Perldoc You can find documentation for this module with the perldoc command. perldoc MooseX::App::Cmd =head2 Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. =over 4 =item * Search CPAN The default CPAN search engine, useful to view POD in HTML format. L =item * AnnoCPAN The AnnoCPAN is a website that allows community annotations of Perl module documentation. L =item * CPAN Ratings The CPAN Ratings is a website that allows community ratings and reviews of Perl modules. L =item * CPANTS The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. L =item * CPAN Testers The CPAN Testers is a network of smokers who run automated tests on uploaded CPAN distributions. L =item * CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. L =item * CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. L =back =head2 Bugs / Feature Requests Please report any bugs or feature requests through the web interface at L. You will be automatically notified of any progress on the request by the system. =head2 Source Code The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) L git clone git://github.com/mjgardner/moosex-app-cmd.git =head1 AUTHORS =over 4 =item * Yuval Kogman =item * Guillermo Roditi =item * Daisuke Maki =item * Vladimir Timofeev =item * Bruno Vecchi =item * Offer Kaye =item * Mark Gardner =item * Yanick Champoux =item * Dann =item * Ken Crowell =item * Michael Joyce =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2013 by Infinity Interactive, Yuval Kogman. 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 Cmd000755000764000764 012260552042 20340 5ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/lib/MouseX/AppCommand.pm100644000764000764 1101612260552042 22433 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/lib/MouseX/App/Cmduse 5.006; package MouseX::App::Cmd::Command; use Mouse; our $VERSION = '0.27'; # VERSION use namespace::clean -except => 'meta'; extends 'MooseX::App::Cmd::Command'; __PACKAGE__->meta->make_immutable(); ## no critic (RequireExplicitInclusion) no Mouse; 1; # ABSTRACT: Base class for MouseX::Getopt based App::Cmd::Commands __END__ =pod =for :stopwords Yuval Kogman Guillermo Roditi Daisuke Maki Vladimir Timofeev Bruno Vecchi Offer Kaye Mark Gardner Yanick Champoux Dann Ken Crowell Michael Joyce Infinity Interactive, cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 NAME MouseX::App::Cmd::Command - Base class for MouseX::Getopt based App::Cmd::Commands =head1 VERSION version 0.27 =head1 SYNOPSIS use Mouse; extends qw(MouseX::App::Cmd::Command); # no need to set opt_spec # see MouseX::Getopt for documentation on how to specify options has option_field => ( isa => 'Str', is => 'rw', required => 1, ); sub execute { my ( $self, $opts, $args ) = @_; print $self->option_field; # also available in $opts->{option_field} } =head1 DESCRIPTION This is a replacement base class for L classes that includes L and the glue to combine the two. It extends C which uses L to work with either L or L. Consult those modules' documentation for full usage information. =head1 SEE ALSO =over =item L =back =head1 SUPPORT =head2 Perldoc You can find documentation for this module with the perldoc command. perldoc MooseX::App::Cmd =head2 Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. =over 4 =item * Search CPAN The default CPAN search engine, useful to view POD in HTML format. L =item * AnnoCPAN The AnnoCPAN is a website that allows community annotations of Perl module documentation. L =item * CPAN Ratings The CPAN Ratings is a website that allows community ratings and reviews of Perl modules. L =item * CPANTS The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. L =item * CPAN Testers The CPAN Testers is a network of smokers who run automated tests on uploaded CPAN distributions. L =item * CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. L =item * CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. L =back =head2 Bugs / Feature Requests Please report any bugs or feature requests through the web interface at L. You will be automatically notified of any progress on the request by the system. =head2 Source Code The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) L git clone git://github.com/mjgardner/moosex-app-cmd.git =head1 AUTHORS =over 4 =item * Yuval Kogman =item * Guillermo Roditi =item * Daisuke Maki =item * Vladimir Timofeev =item * Bruno Vecchi =item * Offer Kaye =item * Mark Gardner =item * Yanick Champoux =item * Dann =item * Ken Crowell =item * Michael Joyce =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2013 by Infinity Interactive, Yuval Kogman. 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 release-changes_has_content.t100644000764000764 232212260552042 23331 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use Test::More tests => 2; note 'Checking Changes'; my $changes_file = 'Changes'; my $newver = '0.27'; my $trial_token = '-TRIAL'; SKIP: { ok( -e $changes_file, "$changes_file file exists" ) or skip 'Changes is missing', 1; ok( _get_changes($newver), "$changes_file has content for $newver" ); } done_testing; # _get_changes copied and adapted from Dist::Zilla::Plugin::Git::Commit # by Jerome Quelin sub _get_changes { my $newver = shift; # parse changelog to find commit message open( my $fh, '<', $changes_file ) or die "cannot open $changes_file: $!"; my $changelog = join( '', <$fh> ); close $fh; my @content = grep { /^$newver(?:$trial_token)?(?:\s+|$)/ ... /^\S/ } # from newver to un-indented split /\n/, $changelog; shift @content; # drop the version line # drop unindented last line and trailing blank lines pop @content while ( @content && $content[-1] =~ /^(?:\S|\s*$)/ ); # return number of non-blank lines return scalar @content; } Command000755000764000764 012260552042 21446 5ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t/lib/Test/MyCmdbark.pm100644000764000764 63512260552042 23047 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t/lib/Test/MyCmd/Commandpackage Test::MyCmd::Command::bark; use Any::Moose; extends qw(MooseX::App::Cmd::Command); =head1 NAME Test::MyCmd::Command::bark - required field is used =cut has wow => ( isa => "Str", is => "ro", required => 1, documentation => "required option field", ); sub execute { my ( $self, $opt, $arg ) = @_; die "my dog name barks " . $self->wow . "\n"; } 1; stock.pm100644000764000764 36712260552042 23255 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t/lib/Test/MyCmd/Commandpackage Test::MyCmd::Command::stock; use Any::Moose; extends qw(MooseX::App::Cmd::Command); =head1 NAME Test::MyCmd::Command::stock - nothing here is overridden =cut # This package exists to test all the default command plugin behaviors. 1; Command000755000764000764 012260552042 22554 5ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t/lib/Test/MyAny/Moosefoo.pm100644000764000764 52112260552042 24013 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t/lib/Test/MyAny/Moose/Commandpackage Test::MyAny::Moose::Command::foo; use Moose; extends 'MooseX::App::Cmd::Command'; has bar => ( isa => 'Str', is => 'ro', required => 1, documentation => 'required option field', ); sub execute { my ( $self, $opt, $arg ) = @_; die 'my Moose bar is ', $self->bar . "\n"; } 1; Command000755000764000764 012260552042 22562 5ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t/lib/Test/MyAny/Mousefoo.pm100644000764000764 52112260552042 24021 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t/lib/Test/MyAny/Mouse/Commandpackage Test::MyAny::Mouse::Command::foo; use Mouse; extends 'MouseX::App::Cmd::Command'; has bar => ( isa => 'Str', is => 'ro', required => 1, documentation => 'required option field', ); sub execute { my ( $self, $opt, $arg ) = @_; die 'my Mouse bar is ', $self->bar . "\n"; } 1; ConfigFromFile000755000764000764 012260552042 21710 5ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t/lib/Testconfig.yaml100644000764000764 4612260552042 24141 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t/lib/Test/ConfigFromFilemoo: - moo1 - moo2 - moo3 justusage.pm100644000764000764 42712260552042 24141 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t/lib/Test/MyCmd/Commandpackage Test::MyCmd::Command::justusage; use Any::Moose; extends qw(MooseX::App::Cmd::Command); =head1 NAME Test::MyCmd::Command::justusage - it just dies its own usage, no matter what =cut sub execute { my ( $self, $opt, $arg ) = @_; die $self->usage->text; } 1; frobulate.pm100644000764000764 113712260552042 24131 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t/lib/Test/MyCmd/Commandpackage Test::MyCmd::Command::frobulate; use Any::Moose; extends qw(MooseX::App::Cmd::Command); sub command_names { return qw(frobulate frob); } has foo_bar => ( traits => [qw(Getopt)], isa => "Bool", is => "ro", cmd_aliases => "F", documentation => "enable foo-bar subsystem", ); has widget => ( traits => [qw(Getopt)], isa => "Str", is => "ro", documentation => "set widget name", ); sub execute { my ( $self, $opt, $arg ) = @_; die "the widget name is " . $self->widget . " - @$arg\n"; } 1; release-localbrew-perl-latest-TEST.t100644000764000764 537112260552042 24324 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use strict; use warnings; use FindBin; use File::Copy qw(copy); use File::Spec; use File::Temp; use Test::More; sub copy_log_file { my ($home) = @_; my $log_file = File::Spec->catfile( $home, '.cpanm', 'build.log' ); my $tempfile = File::Temp->new( SUFFIX => '.log', UNLINK => 0, ); copy( $log_file, $tempfile->filename ); diag("For details, please consult $tempfile"); } sub is_dist_root { my (@path) = @_; return -e File::Spec->catfile( @path, 'Makefile.PL' ) || -e File::Spec->catfile( @path, 'Build.PL' ); } delete @ENV{qw/AUTHOR_TESTING RELEASE_TESTING/}; unless ( $ENV{'PERLBREW_ROOT'} ) { plan skip_all => "Environment variable 'PERLBREW_ROOT' not found"; exit; } my $brew = q[perl-latest-TEST]; my $cpanm_path = qx(which cpanm 2>/dev/null); unless ($cpanm_path) { plan skip_all => "The 'cpanm' program is required to run this test"; exit; } chomp $cpanm_path; my $perlbrew_bin = File::Spec->catdir( $ENV{'PERLBREW_ROOT'}, 'perls', $brew, 'bin' ); my ( $env, $status ) = do { local $ENV{'SHELL'} = '/bin/bash'; # fool perlbrew ( scalar(qx(perlbrew env $brew)), $? ); }; unless ( $status == 0 ) { plan skip_all => "No such perlbrew environment '$brew'"; exit; } my @lines = split /\n/, $env; foreach my $line (@lines) { if ( $line =~ /^\s*export\s+([0-9a-zA-Z_]+)=(.*)$/ ) { my ( $k, $v ) = ( $1, $2 ); if ( $v =~ /^("|')(.*)\1$/ ) { $v = $2; $v =~ s!\\(.)!$1!ge; } $ENV{$k} = $v; } elsif ( $line =~ /^unset\s+([0-9a-zA-Z_]+)/ ) { delete $ENV{$1}; } } my $pristine_path = qx(perlbrew display-pristine-path); chomp $pristine_path; $ENV{'PATH'} = join( ':', $ENV{'PERLBREW_PATH'}, $pristine_path ); plan tests => 1; my $tmpdir = File::Temp->newdir; my $tmphome = File::Temp->newdir; my $pid = fork; if ( !defined $pid ) { fail "Forking failed!"; exit 1; } elsif ($pid) { waitpid $pid, 0; ok !$?, "cpanm should successfully install your dist with no issues" or copy_log_file( $tmphome->dirname ); } else { close STDOUT; close STDERR; my @path = File::Spec->splitdir($FindBin::Bin); while ( @path && !is_dist_root(@path) ) { pop @path; } unless (@path) { die "Unable to find dist root\n"; } chdir File::Spec->catdir(@path); # exit test directory # override where cpanm puts its log file $ENV{'HOME'} = $tmphome->dirname; delete $ENV{'PERL5LIB'}; system 'perl', $cpanm_path, '-L', $tmpdir->dirname, '.'; exit( $? >> 8 ); } Command000755000764000764 012260552042 23266 5ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t/lib/Test/ConfigFromFilemoo.pm100644000764000764 112012260552042 24550 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t/lib/Test/ConfigFromFile/Commandpackage Test::ConfigFromFile::Command::moo; use Any::Moose; use YAML(); extends 'MooseX::App::Cmd::Command'; with any_moose('X::ConfigFromFile'); =head1 NAME Test::MyCmd::Command::moo - reads from config file =cut has 'moo' => ( isa => "ArrayRef", is => "ro", required => 1, auto_deref => 1, documentation => "required option field", ); sub execute { my ( $self, $opt, $arg ) = @_; die( "cows go " . join( ' ', $self->moo ) ); } sub get_config_from_file { my ( $self, $file ) = @_; return YAML::LoadFile($file); } 1; boo.pm100644000764000764 123312260552042 24542 0ustar00mjgardnermjgardner000000000000MooseX-App-Cmd-0.27/t/lib/Test/ConfigFromFile/Commandpackage Test::ConfigFromFile::Command::boo; use Any::Moose; use YAML(); extends qw(MooseX::App::Cmd::Command); with any_moose('X::ConfigFromFile'); =head1 NAME Test::MyCmd::Command::boo - reads from config file =cut has 'moo' => ( isa => "ArrayRef", is => "ro", required => 1, auto_deref => 1, documentation => "required option field", ); sub _get_default_configfile {'t/lib/Test/ConfigFromFile/config.yaml'} sub execute { my ( $self, $opt, $arg ) = @_; die( "ghosts go " . join( ' ', $self->moo ) ); } sub get_config_from_file { my ( $self, $file ) = @_; return YAML::LoadFile($file); } 1;