Getopt-Long-Descriptive-0.096000755000766000766 012223527203 15243 5ustar00rjbsrjbs000000000000README100644000766000766 50712223527203 16166 0ustar00rjbsrjbs000000000000Getopt-Long-Descriptive-0.096 This archive contains the distribution Getopt-Long-Descriptive, version 0.096: Getopt::Long, but simpler and more powerful This software is copyright (c) 2005 by Hans Dieter Pearcey. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Changes100644000766000766 740412223527203 16624 0ustar00rjbsrjbs000000000000Getopt-Long-Descriptive-0.096Revision history for Getopt-Long-Descriptive 0.096 2013-10-04 08:03:12 America/New_York - update version of Test::Warnings required (thanks, Alexandr Ciornii!) 0.095 2013-09-26 20:32:55 America/New_York - add the "shortcircuit" option option (thanks, Diab Jerius!) 0.094 2013-09-05 09:35:26 America/New_York - update documentation to note that failed validation is fatal (thanks, SMYLERS) - show off "required" in the SYNOPSIS (thanks, OALDERS) 0.093 2012-11-01 15:55:35 America/New_York - bogus %-codes in usage description are now noticed and fatal 0.092 2012-07-31 22:51:09 America/New_York - make "hidden" options usable on their own (thanks, Roman Hubacek!) 0.091 2012-02-22 18:15:08 America/New_York - don't die quite so violently when a Params::Validate constraint fails (initial patch by harleypig@github; final blame to RJBS) 0.090 2011-04-21 20:43:07 America/New_York - bump prereq on Params::Validate to deal with recent buggy versions 0.089 2011-01-13 - bump version to deal with busted PAUSE indexing 0.088 2011-01-12 - fix infinite loop when long option documentation strings couldn't wrap (HDP) 0.087 2010-11-30 - long option documentation strings are now line-wrapped and aligned correctly (Dave Rolsky) 0.086 2010-09-19 - fix minimum required version of Sub::Exporter - minor tweak to avoid warnings when run with -w 0.085 2010-03-13 - rewrite much of the documentation 0.084 2010-02-14 - prevent auto-enabling of auto_help (Thanks, DOUGDUDE) 0.083 2009-12-12 - create an Opts module to store the opts object code - add _specified_opts method and _specified method for Opts 0.082 2009-12-03 - require Getopt::Long 2.33 for proper --no-foo handling 0.081 2009-11-27 - \%opt will not contain entries for opts that were not given (this reverts 0.079 and 0.080's new behavior of undef entries) 0.080 2009-11-27 - fix option naming to ignore "+" used to mark cumulative options - fix direct calls to Getopt::Long::Descriptive::describe_options 0.079 2009-11-26 Happy Thanksgiving! - improve the "opt as object" facility to have all opts as methods 0.078 2009-08-21 - refactoring to allow subclassing of Getopt::Long::Descriptive 0.077 2009-08-21 - allow 'f' as an option name; had mistakenly required 2 characters 0.076 2009-08-20 - bundle the accidentally omitted Usage.pm file - the $opt returned by described_options is now an object with accessors 0.075 2009-08-19 - significant refactoring, especially to GLD::Usage, which is now a more traditional (non-hash-based) object (RJBS) 0.074 2008-05-11 - fix RT#35678 (thanks RJBS) 0.073 2008-04-04 - packaging fix 0.072 2008-04-03 - remove duplicate option name in test 0.071 2008-04-03 - fix RT#34153 (bcbailey++) 0.070 2008-01-29 - fix RT#32481 (nothingmuch++) 0.06 2006-08-20 - Required options should not give an unhelpful Params::Validate error message when they're missing. - Add %c to 'format' for command name. - Use [] for spacers in option list. 0.05 2006-01-25 - Support negatable ('foo!') options from Getopt::Long. 0.04 2005-11-28 - Include IO::Scalar prereq in Makefile.PL 0.03 2005-11-15 - Add 'one_of' and 'hidden'. 0.02 2005-11-10 - Bugfix: Getopt::Long type specifiers were sneaking into option names 0.01 2005-11-10 - First version, released on an unsuspecting world. LICENSE100644000766000766 4370012223527203 16355 0ustar00rjbsrjbs000000000000Getopt-Long-Descriptive-0.096This software is copyright (c) 2005 by Hans Dieter Pearcey. 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) 2005 by Hans Dieter Pearcey. 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) 2005 by Hans Dieter Pearcey. 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 dist.ini100644000766000766 32112223527203 16744 0ustar00rjbsrjbs000000000000Getopt-Long-Descriptive-0.096name = Getopt-Long-Descriptive author = Hans Dieter Pearcey author = Ricardo Signes license = Perl_5 copyright_holder = Hans Dieter Pearcey copyright_year = 2005 [@RJBS] META.yml100644000766000766 1346012223527203 16621 0ustar00rjbsrjbs000000000000Getopt-Long-Descriptive-0.096--- abstract: 'Getopt::Long, but simpler and more powerful' author: - 'Hans Dieter Pearcey ' - 'Ricardo Signes ' build_requires: File::Spec: 0 IO::Handle: 0 IPC::Open3: 0 Test::Fatal: 0 Test::More: 0.96 Test::Warnings: 0.005 configure_requires: ExtUtils::MakeMaker: 6.30 dynamic_config: 0 generated_by: 'Dist::Zilla version 4.300039, CPAN::Meta::Converter version 2.132661' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: Getopt-Long-Descriptive requires: Carp: 0 File::Basename: 0 Getopt::Long: 2.33 List::Util: 0 Params::Validate: 0.97 Scalar::Util: 0 Sub::Exporter: 0.972 Sub::Exporter::Util: 0 overload: 0 strict: 0 warnings: 0 resources: bugtracker: https://github.com/rjbs/Getopt-Long-Descriptive/issues homepage: https://github.com/rjbs/Getopt-Long-Descriptive repository: https://github.com/rjbs/Getopt-Long-Descriptive.git version: 0.096 x_Dist_Zilla: perl: version: 5.019004 plugins: - class: Dist::Zilla::Plugin::Git::GatherDir name: '@RJBS/Git::GatherDir' version: 2.014 - class: Dist::Zilla::Plugin::CheckPrereqsIndexed name: '@RJBS/CheckPrereqsIndexed' version: 0.009 - class: Dist::Zilla::Plugin::CheckExtraTests name: '@RJBS/CheckExtraTests' version: 0.011 - class: Dist::Zilla::Plugin::PromptIfStale name: '@RJBS/RJBS-Outdated' version: 0.007 - class: Dist::Zilla::Plugin::PromptIfStale name: '@RJBS/CPAN-Outdated' version: 0.007 - class: Dist::Zilla::Plugin::PruneCruft name: '@RJBS/@Filter/PruneCruft' version: 4.300039 - class: Dist::Zilla::Plugin::ManifestSkip name: '@RJBS/@Filter/ManifestSkip' version: 4.300039 - class: Dist::Zilla::Plugin::MetaYAML name: '@RJBS/@Filter/MetaYAML' version: 4.300039 - class: Dist::Zilla::Plugin::License name: '@RJBS/@Filter/License' version: 4.300039 - class: Dist::Zilla::Plugin::Readme name: '@RJBS/@Filter/Readme' version: 4.300039 - class: Dist::Zilla::Plugin::ExecDir name: '@RJBS/@Filter/ExecDir' version: 4.300039 - class: Dist::Zilla::Plugin::ShareDir name: '@RJBS/@Filter/ShareDir' version: 4.300039 - class: Dist::Zilla::Plugin::MakeMaker name: '@RJBS/@Filter/MakeMaker' version: 4.300039 - class: Dist::Zilla::Plugin::Manifest name: '@RJBS/@Filter/Manifest' version: 4.300039 - class: Dist::Zilla::Plugin::TestRelease name: '@RJBS/@Filter/TestRelease' version: 4.300039 - class: Dist::Zilla::Plugin::ConfirmRelease name: '@RJBS/@Filter/ConfirmRelease' version: 4.300039 - class: Dist::Zilla::Plugin::UploadToCPAN name: '@RJBS/@Filter/UploadToCPAN' version: 4.300039 - class: Dist::Zilla::Plugin::AutoPrereqs name: '@RJBS/AutoPrereqs' version: 4.300039 - class: Dist::Zilla::Plugin::Git::NextVersion name: '@RJBS/Git::NextVersion' version: 2.014 - class: Dist::Zilla::Plugin::PkgVersion name: '@RJBS/PkgVersion' version: 4.300039 - class: Dist::Zilla::Plugin::MetaConfig name: '@RJBS/MetaConfig' version: 4.300039 - class: Dist::Zilla::Plugin::MetaJSON name: '@RJBS/MetaJSON' version: 4.300039 - class: Dist::Zilla::Plugin::NextRelease name: '@RJBS/NextRelease' version: 4.300039 - class: Dist::Zilla::Plugin::Test::ChangesHasContent name: '@RJBS/Test::ChangesHasContent' version: 0.006 - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@RJBS/PodSyntaxTests' version: 4.300039 - class: Dist::Zilla::Plugin::ReportVersions::Tiny name: '@RJBS/ReportVersions::Tiny' version: 1.10 - class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: module_finder: - ':InstallModules' script_finder: - ':ExecFiles' name: '@RJBS/Test::Compile' version: 2.033 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: test type: requires name: '@RJBS/TestMoreWithSubtests' version: 4.300039 - class: Dist::Zilla::Plugin::PodWeaver config: Dist::Zilla::Plugin::PodWeaver: config_plugin: '@RJBS' finder: - ':InstallModules' - ':ExecFiles' name: '@RJBS/PodWeaver' version: 3.102000 - class: Dist::Zilla::Plugin::GithubMeta name: '@RJBS/GithubMeta' version: 0.42 - class: Dist::Zilla::Plugin::Git::Check name: '@RJBS/@Git/Check' version: 2.014 - class: Dist::Zilla::Plugin::Git::Commit name: '@RJBS/@Git/Commit' version: 2.014 - class: Dist::Zilla::Plugin::Git::Tag name: '@RJBS/@Git/Tag' version: 2.014 - class: Dist::Zilla::Plugin::Git::Push name: '@RJBS/@Git/Push' version: 2.014 - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: 4.300039 - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: 4.300039 - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: 4.300039 - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: 4.300039 - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: 4.300039 - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: 4.300039 zilla: class: Dist::Zilla::Dist::Builder config: is_trial: 0 version: 4.300039 MANIFEST100644000766000766 46612223527203 16443 0ustar00rjbsrjbs000000000000Getopt-Long-Descriptive-0.096Changes LICENSE MANIFEST META.json META.yml Makefile.PL README dist.ini lib/Getopt/Long/Descriptive.pm lib/Getopt/Long/Descriptive/Opts.pm lib/Getopt/Long/Descriptive/Usage.pm t/00-compile.t t/000-report-versions-tiny.t t/descriptive.t t/shortcircuit.t xt/release/changes_has_content.t xt/release/pod-syntax.t META.json100644000766000766 2213512223527203 16770 0ustar00rjbsrjbs000000000000Getopt-Long-Descriptive-0.096{ "abstract" : "Getopt::Long, but simpler and more powerful", "author" : [ "Hans Dieter Pearcey ", "Ricardo Signes " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 4.300039, CPAN::Meta::Converter version 2.132661", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Getopt-Long-Descriptive", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.30" } }, "develop" : { "requires" : { "Test::Pod" : "1.41", "version" : "0.9901" } }, "runtime" : { "requires" : { "Carp" : "0", "File::Basename" : "0", "Getopt::Long" : "2.33", "List::Util" : "0", "Params::Validate" : "0.97", "Scalar::Util" : "0", "Sub::Exporter" : "0.972", "Sub::Exporter::Util" : "0", "overload" : "0", "strict" : "0", "warnings" : "0" } }, "test" : { "requires" : { "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Test::Fatal" : "0", "Test::More" : "0.96", "Test::Warnings" : "0.005" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/rjbs/Getopt-Long-Descriptive/issues" }, "homepage" : "https://github.com/rjbs/Getopt-Long-Descriptive", "repository" : { "type" : "git", "url" : "https://github.com/rjbs/Getopt-Long-Descriptive.git", "web" : "https://github.com/rjbs/Getopt-Long-Descriptive" } }, "version" : "0.096", "x_Dist_Zilla" : { "perl" : { "version" : "5.019004" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "name" : "@RJBS/Git::GatherDir", "version" : "2.014" }, { "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", "name" : "@RJBS/CheckPrereqsIndexed", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::CheckExtraTests", "name" : "@RJBS/CheckExtraTests", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "name" : "@RJBS/RJBS-Outdated", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "name" : "@RJBS/CPAN-Outdated", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@RJBS/@Filter/PruneCruft", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@RJBS/@Filter/ManifestSkip", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@RJBS/@Filter/MetaYAML", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@RJBS/@Filter/License", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Readme", "name" : "@RJBS/@Filter/Readme", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@RJBS/@Filter/ExecDir", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@RJBS/@Filter/ShareDir", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::MakeMaker", "name" : "@RJBS/@Filter/MakeMaker", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@RJBS/@Filter/Manifest", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@RJBS/@Filter/TestRelease", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@RJBS/@Filter/ConfirmRelease", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@RJBS/@Filter/UploadToCPAN", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@RJBS/AutoPrereqs", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Git::NextVersion", "name" : "@RJBS/Git::NextVersion", "version" : "2.014" }, { "class" : "Dist::Zilla::Plugin::PkgVersion", "name" : "@RJBS/PkgVersion", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@RJBS/MetaConfig", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@RJBS/MetaJSON", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@RJBS/NextRelease", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::Test::ChangesHasContent", "name" : "@RJBS/Test::ChangesHasContent", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@RJBS/PodSyntaxTests", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::ReportVersions::Tiny", "name" : "@RJBS/ReportVersions::Tiny", "version" : "1.10" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "config" : { "Dist::Zilla::Plugin::Test::Compile" : { "module_finder" : [ ":InstallModules" ], "script_finder" : [ ":ExecFiles" ] } }, "name" : "@RJBS/Test::Compile", "version" : "2.033" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "test", "type" : "requires" } }, "name" : "@RJBS/TestMoreWithSubtests", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "config_plugin" : "@RJBS", "finder" : [ ":InstallModules", ":ExecFiles" ] } }, "name" : "@RJBS/PodWeaver", "version" : "3.102000" }, { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "@RJBS/GithubMeta", "version" : "0.42" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "name" : "@RJBS/@Git/Check", "version" : "2.014" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "name" : "@RJBS/@Git/Commit", "version" : "2.014" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "name" : "@RJBS/@Git/Tag", "version" : "2.014" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "name" : "@RJBS/@Git/Push", "version" : "2.014" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "4.300039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "4.300039" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : "0" }, "version" : "4.300039" } } } Makefile.PL100644000766000766 346212223527203 17303 0ustar00rjbsrjbs000000000000Getopt-Long-Descriptive-0.096 use strict; use warnings; use ExtUtils::MakeMaker 6.30; my %WriteMakefileArgs = ( "ABSTRACT" => "Getopt::Long, but simpler and more powerful", "AUTHOR" => "Hans Dieter Pearcey , Ricardo Signes ", "BUILD_REQUIRES" => {}, "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => "6.30" }, "DISTNAME" => "Getopt-Long-Descriptive", "EXE_FILES" => [], "LICENSE" => "perl", "NAME" => "Getopt::Long::Descriptive", "PREREQ_PM" => { "Carp" => 0, "File::Basename" => 0, "Getopt::Long" => "2.33", "List::Util" => 0, "Params::Validate" => "0.97", "Scalar::Util" => 0, "Sub::Exporter" => "0.972", "Sub::Exporter::Util" => 0, "overload" => 0, "strict" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "File::Spec" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "Test::Fatal" => 0, "Test::More" => "0.96", "Test::Warnings" => "0.005" }, "VERSION" => "0.096", "test" => { "TESTS" => "t/*.t" } ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { my $tr = delete $WriteMakefileArgs{TEST_REQUIRES}; my $br = $WriteMakefileArgs{BUILD_REQUIRES}; for my $mod ( keys %$tr ) { if ( exists $br->{$mod} ) { $br->{$mod} = $tr->{$mod} if $tr->{$mod} > $br->{$mod}; } else { $br->{$mod} = $tr->{$mod}; } } } unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) { my $br = delete $WriteMakefileArgs{BUILD_REQUIRES}; my $pp = $WriteMakefileArgs{PREREQ_PM}; for my $mod ( keys %$br ) { if ( exists $pp->{$mod} ) { $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod}; } else { $pp->{$mod} = $br->{$mod}; } } } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); t000755000766000766 012223527203 15427 5ustar00rjbsrjbs000000000000Getopt-Long-Descriptive-0.09600-compile.t100644000766000766 207412223527203 17624 0ustar00rjbsrjbs000000000000Getopt-Long-Descriptive-0.096/tuse strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.033 use Test::More 0.94 tests => 3 + ($ENV{AUTHOR_TESTING} ? 1 : 0); my @module_files = ( 'Getopt/Long/Descriptive.pm', 'Getopt/Long/Descriptive/Opts.pm', 'Getopt/Long/Descriptive/Usage.pm' ); # no fake home requested use File::Spec; use IPC::Open3; use IO::Handle; my @warnings; for my $lib (@module_files) { # see L open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my $stderr = IO::Handle->new; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, '-Mblib', '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($? >> 8, 0, "$lib loaded ok"); if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING}; BAIL_OUT("Compilation problems") if !Test::More->builder->is_passing; descriptive.t100644000766000766 1403112223527203 20314 0ustar00rjbsrjbs000000000000Getopt-Long-Descriptive-0.096/t#!perl use strict; use warnings; use Test::More tests => 42; use_ok("Getopt::Long::Descriptive"); # test constraints: # (look at P::V for names, too) # required => 1 # depends => [...] # precludes => [...] # sugar for only_one_of and all_or_none sub is_opt { my ($argv, $specs, $expect, $desc) = @_; local @ARGV = @$argv; eval { my ($opt, $usage) = describe_options( "test %o", @$specs, ); is_deeply( $opt, $expect, $desc, ); for my $key (keys %$expect) { is($opt->$key, $expect->{$key}, "...->$key"); } }; if ($@) { chomp($@); if (ref($expect) eq 'Regexp') { like($@, $expect, $desc); } else { # auto-fail is($@, "", "$desc: $@"); } } } sub is_hidden { my ($specs, $cmd, $text) = @_; eval { local @ARGV; my ($opt, $usage) = describe_options( "test %o", @$specs, ); like( $usage->text, $cmd, "hidden option in usage command", ); unlike( $usage->text, $text, "hidden option description", ); }; if ($@) { chomp($@); is($@, "", "hidden: $@"); ok(0); } } is_opt( [ ], [ [ "foo-bar=i", "foo integer", { default => 17 } ] ], { foo_bar => 17 }, "default foo_bar with no short option name", ); # test hidden is_hidden( [ [ "foo|f", "a foo option" ], [ "bar|b", "a bar option", { hidden => 1 } ], ], qr/test \[-f\] \[long options\.\.\.\]/i, qr/a bar option/, ); is_opt( [ '--nora' ], [ [ "nora", "Invisible Nora", { hidden => 1 } ] ], { nora => 1 }, "", ); ### tests for one_of my $foobar = [ [ 'foo' => 'a foo option' ], [ 'bar' => 'a bar option' ], ]; is_opt( [ ], [ [ mode => $foobar, { default => 'foo' }, ], ], { mode => 'foo' }, "basic usage, with default", ); is_opt( [ '--bar' ], [ [ mode => $foobar, ], ], { bar => 1, mode => 'bar' }, "basic usage, passed-in", ); # implicit hidden syntax is_hidden( [ [ mode => [] ] ], qr/test\s*\n/i, qr/mode/, ); is_opt( [ '--foo', '--bar' ], [ [ mode => $foobar ] ], #qr/\Qonly one 'mode' option (foo, bar)\E/, qr/it is 'foo' already/, "only one 'mode' option", ); is_opt( [ '--no-bar', '--baz' ], [ [ mode => [ [ foo => 'a foo option' ], [ 'bar!' => 'a negatable bar option' ], ], ], [ 'baz!' => 'a negatable baz option' ], ], { bar => 0, mode => 'bar', baz => 1 }, "negatable usage", ); is_opt( [ ], [ [ req => 'a required option' => { required => 1 } ], ], qr/mandatory parameter/i, "required option -- help text" ); { local @ARGV; my ($opt, $usage) = describe_options( "%c %o", [ foo => "a foo option" ], [], ['bar options:'], [ bar => "a bar option" ], ); like( $usage->text, qr/foo option\n\s+\n\tbar options:\n\s+--bar/, "spacer and non-option description found", ); local $SIG{__WARN__} = sub {}; # we know that this will warn; don't care like( $usage->(1), qr/foo option\n\s+\n\tbar options:\n\s+--bar/, "CODEISH: spacer and non-option description found", ); } { local @ARGV; my ($opt, $usage) = describe_options( "%c %o", [ 'foo' => "foo option" ], [ 'bar|b' => "bar option" ], [ 'string|s=s' => "string value" ], [ 'ostring|S:s' => "optional string value" ], [ 'list|l=s@' => "list of strings" ], [ 'hash|h=s%' => "hash values" ], [ 'optional|o!' => "optional" ], [ 'increment|i+' => "incremental option" ], ); like( $usage->text, qr/\[-bhiloSs\]/, "short options", ); } { local @ARGV = qw(--foo FOO --baz BAZ); my ($c_opt, $usage) = describe_options( "%c %o", [ "foo=s", '' ], [ "bar=s", '', { default => 'BAR' } ], [ "baz=s", '', { default => 'BAZ' } ], ); my $s_opt = $c_opt->_specified_opts; my $C_opt = $s_opt->_complete_opts; is($c_opt->foo, 'FOO', 'c_opt->foo is FOO'); is($C_opt->foo, 'FOO', 'C_opt->foo is FOO'); is($s_opt->foo, 'FOO', 's_opt->foo is FOO'); is($c_opt->bar, 'BAR', 'c_opt->foo is BAR'); is($C_opt->bar, 'BAR', 'C_opt->foo is BAR'); is($s_opt->bar, undef, 's_opt->foo is undef'); is($c_opt->baz, 'BAZ', 'c_opt->foo is BAZ'); is($C_opt->baz, 'BAZ', 'C_opt->foo is BAZ'); is($s_opt->baz, 'BAZ', 's_opt->foo is BAZ'); } { local @ARGV = qw(--foo); my ($opt, $usage) = describe_options( "%c %o", [ "foo", '' ], [ "bar", '' ], ); is( $opt->{foo}, 1, "empty-but-present description is ok" ); is( $opt->foo, 1, "empty-but-present description is ok" ); is( $opt->{bar}, undef, "entry not given is undef (exists? no guarantee)" ); is( $opt->bar, undef, "entry not given is undef (as method)"); } { local @ARGV = qw(--foo-bar); my ($opt) = describe_options( "%c %o", [ "foo:s", "foo option" ], [ "foo-bar", "foo-bar option", { implies => 'foo' } ], ); is_deeply($opt, { foo => 1, foo_bar => 1 }, "ok to imply option with optional argument"); is($opt->foo_bar, 1, 'given value (checked with method)'); is($opt->foo, 1, 'implied value (checked with method)'); } { local @ARGV; my ($opt, $usage) = describe_options( "%c %o", [ foo => "a foo option" ], [ bar => "a bar option" ], [ baz => "a baz option with a very long description." . " It just goes on for a really long time." . " This allows us to test line wrapping and" . " make sure the output always looks spiffy" ], ); my $expect = qr/ --baz a baz option with a very long description. It just goes on for a really long time. This allows us to test line wrapping and make sure the output always looks spiffy/; like($usage->text, $expect, 'long option description is wrapped cleanly'); } { local @ARGV; my ($opt, $usage) = describe_options( "%c %o", [ foo => "x" x 80 ], ); local $@; local $SIG{ALRM} = sub { die "ALRM\n" }; eval { alarm(2); like($usage->text, qr/@{["x" x 80]}/, "handled unwrappable description"); alarm(0); }; is($@, '', "no error in eval"); } shortcircuit.t100644000766000766 315312223527203 20500 0ustar00rjbsrjbs000000000000Getopt-Long-Descriptive-0.096/t#!perl use strict; use warnings; use Test::More; use Test::Warnings 0.005 qw[ warning ]; use Test::Fatal; use Getopt::Long::Descriptive; my $nreq = 6; my @reqs = map { "--req$_" } 1 .. $nreq; sub _args { "test %o", # load with extra required to make sure # sorting on shortcircuit attribute works; (map { [ "req$_", 'required', { required => 1 } ] } 1 .. $nreq), [ 'help', 'help', { shortcircuit => 1, @_ } ], } like( exception { describe_options( _args() ) }, qr/required/, 'no req: error', ); like( warning { local @ARGV = @reqs; describe_options( _args( default => 1 ) ); }, qr/'default' does not make sense for shortcircuit/, 'shortcircuit + default' ); SKIP: { my $opt; is( exception { local @ARGV = @reqs; ( $opt ) = describe_options( _args() ); }, undef, 'req: no error' ) or skip( 'no object due to failure', 1 ); ok( defined $opt->req1 && $opt->req1 == 1, 'req: req1 specified' ); } SKIP: { my $opt; is( exception { local @ARGV = qw[ --help ]; ( $opt ) = describe_options( _args() ); }, undef, 'help: no error' ) or skip( 'no object due to failure', 2 ); is( $opt->help, 1, 'help: help flag' ); is( scalar keys %{$opt}, 1, 'help: only help' ); } SKIP: { my ( $w, $opt ); is( exception { local @ARGV = qw[ --help ]; ( $opt ) = describe_options( _args( @reqs ) ); }, undef, 'help + req: no error' ) or skip( 'no object due to failure', 2 ); is( $opt->help, 1, 'help + req: help flag' ); is( scalar keys %{$opt}, 1, 'help + req: only help' ); } done_testing; release000755000766000766 012223527203 17237 5ustar00rjbsrjbs000000000000Getopt-Long-Descriptive-0.096/xtpod-syntax.t100644000766000766 21212223527203 21645 0ustar00rjbsrjbs000000000000Getopt-Long-Descriptive-0.096/xt/release#!perl 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(); 000-report-versions-tiny.t100644000766000766 531512223527203 22417 0ustar00rjbsrjbs000000000000Getopt-Long-Descriptive-0.096/tuse strict; use warnings; use Test::More 0.88; # This is a relatively nice way to avoid Test::NoWarnings breaking our # expectations by adding extra tests, without using no_plan. It also helps # avoid any other test module that feels introducing random tests, or even # test plans, is a nice idea. our $success = 0; END { $success && done_testing; } # List our own version used to generate this my $v = "\nGenerated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.10\n"; eval { # no excuses! # report our Perl details my $want = "any version"; $v .= "perl: $] (wanted $want) on $^O from $^X\n\n"; }; defined($@) and diag("$@"); # Now, our module version dependencies: sub pmver { my ($module, $wanted) = @_; $wanted = " (want $wanted)"; my $pmver; eval "require $module;"; if ($@) { if ($@ =~ m/Can't locate .* in \@INC/) { $pmver = 'module not found.'; } else { diag("${module}: $@"); $pmver = 'died during require.'; } } else { my $version; eval { $version = $module->VERSION; }; if ($@) { diag("${module}: $@"); $pmver = 'died during VERSION check.'; } elsif (defined $version) { $pmver = "$version"; } else { $pmver = ''; } } # So, we should be good, right? return sprintf('%-45s => %-10s%-15s%s', $module, $pmver, $wanted, "\n"); } eval { $v .= pmver('Carp','any version') }; eval { $v .= pmver('ExtUtils::MakeMaker','6.30') }; eval { $v .= pmver('File::Basename','any version') }; eval { $v .= pmver('File::Spec','any version') }; eval { $v .= pmver('Getopt::Long','2.33') }; eval { $v .= pmver('IO::Handle','any version') }; eval { $v .= pmver('IPC::Open3','any version') }; eval { $v .= pmver('List::Util','any version') }; eval { $v .= pmver('Params::Validate','0.97') }; eval { $v .= pmver('Scalar::Util','any version') }; eval { $v .= pmver('Sub::Exporter','0.972') }; eval { $v .= pmver('Sub::Exporter::Util','any version') }; eval { $v .= pmver('Test::Fatal','any version') }; eval { $v .= pmver('Test::More','0.96') }; eval { $v .= pmver('Test::Warnings','0.005') }; eval { $v .= pmver('overload','any version') }; eval { $v .= pmver('strict','any version') }; eval { $v .= pmver('warnings','any version') }; # All done. $v .= <<'EOT'; Thanks for using my code. I hope it works for you. If not, please try and include this output in the bug report. That will help me reproduce the issue and solve your problem. EOT diag($v); ok(1, "we really didn't test anything, just reporting data"); $success = 1; # Work around another nasty module on CPAN. :/ no warnings 'once'; $Template::Test::NO_FLUSH = 1; exit 0; Long000755000766000766 012223527203 20073 5ustar00rjbsrjbs000000000000Getopt-Long-Descriptive-0.096/lib/GetoptDescriptive.pm100644000766000766 4335112223527203 23100 0ustar00rjbsrjbs000000000000Getopt-Long-Descriptive-0.096/lib/Getopt/Longuse strict; use warnings; package Getopt::Long::Descriptive; { $Getopt::Long::Descriptive::VERSION = '0.096'; } # ABSTRACT: Getopt::Long, but simpler and more powerful use Carp qw(carp croak); use File::Basename (); use Getopt::Long 2.33; use List::Util qw(first); use Params::Validate 0.97 qw(:all); use Scalar::Util (); use Getopt::Long::Descriptive::Opts; use Getopt::Long::Descriptive::Usage; my $prog_name; sub prog_name { @_ ? ($prog_name = shift) : $prog_name } BEGIN { # grab this before someone decides to change it prog_name(File::Basename::basename($0)); } use Sub::Exporter::Util (); use Sub::Exporter 0.972 -setup => { exports => [ describe_options => \'_build_describe_options', q(prog_name), @{ $Params::Validate::EXPORT_TAGS{types} } ], groups => [ default => [ qw(describe_options) ], types => $Params::Validate::EXPORT_TAGS{types}, ], }; my %CONSTRAINT = ( implies => \&_mk_implies, required => { optional => 0 }, only_one => \&_mk_only_one, ); our $MungeOptions = 1; sub _nohidden { return grep { ! $_->{constraint}->{hidden} } @_; } sub _expand { return map { {( spec => $_->[0] || '', desc => @$_ > 1 ? $_->[1] : 'spacer', constraint => $_->[2] || {}, # if @$_ is 0 then we got [], a spacer name => @$_ ? _munge((split /[:=|!+]/, $_->[0] || '')[0]) : '', )} } @_; } my %HIDDEN = ( hidden => 1, ); my $SPEC_RE = qr{(?:[:=][\d\w\+]+[%@]?({\d*,\d*})?|[!+])$}; sub _strip_assignment { my ($self, $str) = @_; (my $copy = $str) =~ s{$SPEC_RE}{}; return $copy; } # This is here only to deal with people who were calling this fully-qualified # without importing. Sucks to them! -- rjbs, 2009-08-21 sub describe_options { my $sub = __PACKAGE__->_build_describe_options(describe_options => {} => {}); $sub->(@_); } sub usage_class { 'Getopt::Long::Descriptive::Usage' } sub _build_describe_options { my ($class) = @_; sub { my $format = shift; my $arg = (ref $_[-1] and ref $_[-1] eq 'HASH') ? pop @_ : {}; my @opts; # special casing # wish we had real loop objects my %method_map; for my $opt (_expand(@_)) { $method_map{ $opt->{name} } = undef unless $opt->{desc} eq 'spacer'; if (ref($opt->{desc}) eq 'ARRAY') { $opt->{constraint}->{one_of} = delete $opt->{desc}; $opt->{desc} = 'hidden'; } if ($HIDDEN{$opt->{desc}}) { $opt->{constraint}->{hidden}++; } if ($opt->{constraint}->{one_of}) { for my $one_opt (_expand( @{delete $opt->{constraint}->{one_of}} )) { $one_opt->{constraint}->{implies} ->{$opt->{name}} = $one_opt->{name}; for my $wipe (qw(required default)) { if ($one_opt->{constraint}->{$wipe}) { carp "'$wipe' constraint does not make sense in sub-option"; delete $one_opt->{constraint}->{$wipe}; } } $one_opt->{constraint}->{one_of} = $opt->{name}; push @opts, $one_opt; } } if ($opt->{constraint}{shortcircuit} && exists $opt->{constraint}{default} ) { carp('option "' . $opt->{name} . q[": 'default' does not make sense for shortcircuit options]); } push @opts, $opt; } my @go_conf = @{ $arg->{getopt_conf} || $arg->{getopt} || [] }; if ($arg->{getopt}) { warn "describe_options: 'getopt' is deprecated, please use 'getopt_conf' instead\n"; } push @go_conf, "bundling" unless grep { /bundling/i } @go_conf; push @go_conf, "no_auto_help" unless grep { /no_auto_help/i } @go_conf; # not entirely sure that all of this (until the Usage->new) shouldn't be # moved into Usage -- rjbs, 2009-08-19 # all specs including hidden my @getopt_specs = map { $_->{spec} } grep { $_->{desc} ne 'spacer' } @opts; my @specs = map { $_->{spec} } grep { $_->{desc} ne 'spacer' } _nohidden(@opts); my $short = join q{}, sort { lc $a cmp lc $b or $a cmp $b } grep { /^.$/ } map { split /\|/ } map { __PACKAGE__->_strip_assignment($_) } @specs; my $long = grep /\b[^|]{2,}/, @specs; my %replace = ( "%" => "%", "c" => prog_name, "o" => join(q{ }, ($short ? "[-$short]" : ()), ($long ? "[long options...]" : ()) ), ); (my $str = $format) =~ s<%(.)>< defined $replace{$1} ? $replace{$1} : Carp::croak("unknown sequence %$1 in first argument to describe_options") >ge; $str =~ s/\s{2,}/ /g; my $usage = $class->usage_class->new({ options => [ _nohidden(@opts) ], leader_text => $str, }); Getopt::Long::Configure(@go_conf); my %return; $usage->die unless GetOptions(\%return, grep { length } @getopt_specs); my @given_keys = keys %return; for my $opt (keys %return) { my $newopt = _munge($opt); next if $newopt eq $opt; $return{$newopt} = delete $return{$opt}; } # ensure that shortcircuit options are handled first for my $copt ( sort { ($b->{constraint}{shortcircuit} || 0) <=> ($a->{constraint}{shortcircuit} || 0) } grep { $_->{constraint} } @opts ) { delete $copt->{constraint}->{hidden}; my $is_shortcircuit = delete $copt->{constraint}{shortcircuit}; my $name = $copt->{name}; my $new = _validate_with( name => $name, params => \%return, spec => $copt->{constraint}, opts => \@opts, usage => $usage, ); next unless (defined($new) || exists($return{$name})); $return{$name} = $new; if ($is_shortcircuit) { %return = ($name => $return{$name}); last; } } my $opt_obj = Getopt::Long::Descriptive::Opts->___new_opt_obj({ values => { %method_map, %return }, given => { map {; $_ => 1 } @given_keys }, }); return($opt_obj, $usage); } } sub _munge { my ($opt) = @_; return $opt unless $MungeOptions; $opt = lc($opt); $opt =~ tr/-/_/; return $opt; } sub _validate_with { my (%arg) = validate(@_, { name => 1, params => 1, spec => 1, opts => 1, usage => 1, }); my $spec = $arg{spec}; my %pvspec; for my $ct (keys %{$spec}) { if ($CONSTRAINT{$ct} and ref $CONSTRAINT{$ct} eq 'CODE') { $pvspec{callbacks} ||= {}; $pvspec{callbacks} = { %{$pvspec{callbacks}}, $CONSTRAINT{$ct}->( $arg{name}, $spec->{$ct}, $arg{params}, $arg{opts}, ), }; } else { %pvspec = ( %pvspec, $CONSTRAINT{$ct} ? %{$CONSTRAINT{$ct}} : ($ct => $spec->{$ct}), ); } } $pvspec{optional} = 1 unless exists $pvspec{optional}; # we need to implement 'default' by ourselves sometimes # because otherwise the implies won't be checked/executed # XXX this should be more generic -- we'll probably want # other callbacks to always run, too if (!defined($arg{params}{$arg{name}}) && $pvspec{default} && $spec->{implies}) { $arg{params}{$arg{name}} = delete $pvspec{default}; } my %p; my $ok = eval { %p = validate_with( params => [ %{$arg{params}} ], spec => { $arg{name} => \%pvspec }, allow_extra => 1, on_fail => sub { my $fail_msg = shift; Getopt::Long::Descriptive::_PV_Error->throw($fail_msg); }, ); 1; }; if (! $ok) { my $error = $@; if ( Scalar::Util::blessed($error) && $error->isa('Getopt::Long::Descriptive::_PV_Error') ) { $arg{usage}->die({ pre_text => $error->error . "\n" }); } die $@; } return $p{$arg{name}}; } # scalar: single option = true # arrayref: multiple options = true # hashref: single/multiple options = given values sub _norm_imply { my ($what) = @_; return { $what => 1 } unless my $ref = ref $what; return $what if $ref eq 'HASH'; return { map { $_ => 1 } @$what } if $ref eq 'ARRAY'; die "can't imply: $what"; } sub _mk_implies { my $name = shift; my $what = _norm_imply(shift); my $param = shift; my $opts = shift; for my $implied (keys %$what) { die("option specification for $name implies nonexistent option $implied\n") unless first { $_->{name} eq $implied } @$opts } my $whatstr = join(q{, }, map { "$_=$what->{$_}" } keys %$what); return "$name implies $whatstr" => sub { my ($pv_val) = shift; # negatable options will be 0 here, which is ok. return 1 unless defined $pv_val; while (my ($key, $val) = each %$what) { if (exists $param->{$key} and $param->{$key} ne $val) { die( "option specification for $name implies that $key should be " . "set to '$val', but it is '$param->{$key}' already\n" ); } $param->{$key} = $val; } return 1; }; } sub _mk_only_one { die "unimplemented"; } { package Getopt::Long::Descriptive::_PV_Error; sub error { $_[0]->{error} } sub throw { my ($class, $error_msg) = @_; my $self = { error => $error_msg }; bless $self, $class; die $self; } } 1; # End of Getopt::Long::Descriptive __END__ =pod =head1 NAME Getopt::Long::Descriptive - Getopt::Long, but simpler and more powerful =head1 VERSION version 0.096 =head1 SYNOPSIS use Getopt::Long::Descriptive; my ($opt, $usage) = describe_options( 'my-program %o ', [ 'server|s=s', "the server to connect to", { required => 1 } ], [ 'port|p=i', "the port to connect to", { default => 79 } ], [], [ 'verbose|v', "print extra stuff" ], [ 'help', "print usage message and exit" ], ); print($usage->text), exit if $opt->help; Client->connect( $opt->server, $opt->port ); print "Connected!\n" if $opt->verbose; ...and running C will produce: my-program [-psv] [long options...] -s --server the server to connect to -p --port the port to connect to -v --verbose print extra stuff --help print usage message and exit =head1 DESCRIPTION Getopt::Long::Descriptive is yet another Getopt library. It's built atop Getopt::Long, and gets a lot of its features, but tries to avoid making you think about its huge array of options. It also provides usage (help) messages, data validation, and a few other useful features. =head1 FUNCTIONS Getopt::Long::Descriptive only exports one routine by default: C. All GLD's exports are exported by L. =head2 describe_options my ($opt, $usage) = describe_options($usage_desc, @opt_spec, \%arg); This routine inspects C<@ARGV> for options that match the supplied spec. If all the options are valid then it returns the options given and an object for generating usage messages; if not then it dies with an explanation of what was wrong and a usage message. The C<$opt> object will be a dynamically-generated subclass of L. In brief, each of the options in C<@opt_spec> becomes an accessor method on the object, using the first-given name, with dashes converted to underscores. For more information, see the documentation for the Opts class. The C<$usage> object will be a L object, which provides a C method to get the text of the usage message and C to die with it. For more methods and options, consults the documentation for the Usage class. =head3 $usage_desc The C<$usage_desc> parameter to C is a C-like string that is used in generating the first line of the usage message. It's a one-line summary of how the command is to be invoked. A typical usage description might be: $usage_desc = "%c %o "; C<%c> will be replaced with what Getopt::Long::Descriptive thinks is the program name (it's computed from C<$0>, see L). C<%o> will be replaced with a list of the short options, as well as the text "[long options...]" if any have been defined. The rest of the usage description can be used to summarize what arguments are expected to follow the program's options, and is entirely free-form. Literal C<%> characters will need to be written as C<%%>, just like with C. =head3 @opt_spec The C<@opt_spec> part of the args to C is used to configure option parsing and to produce the usage message. Each entry in the list is an arrayref describing one option, like this: @opt_spec = ( [ "verbose|V" => "be noisy" ], [ "logfile=s" => "file to log to" ], ); The first value in the arrayref is a Getopt::Long-style option specification. In brief, they work like this: each one is a pipe-delimited list of names, optionally followed by a type declaration. Type declarations are '=x' or ':x', where C<=> means a value is required and C<:> means it is optional. I may be 's' to indicate a string is required, 'i' for an integer, or 'f' for a number with a fractional part. The type spec may end in C<@> to indicate that the option may appear multiple times. For more information on how these work, see the L documentation. The first name given should be the canonical name, as it will be used as the accessor method on the C<$opt> object. Dashes in the name will be converted to underscores, and all letters will be lowercased. For this reason, all options should generally have a long-form name. The second value in the arrayref is a description of the option, for use in the usage message. =head4 Special Option Specifications If the option specification (arrayref) is empty, it will have no effect other than causing a blank line to appear in the usage message. If the option specification contains only one element, it will be printed in the usage message with no other effect. If the option specification contains a third element, it adds extra constraints or modifiers to the interpretation and validation of the value. These are the keys that may be present in that hashref, and how they behave: =over 4 =item implies implies => 'bar' implies => [qw(foo bar)] implies => { foo => 1, bar => 2 } If option I has an "implies" entry, then if I is given, other options will be enabled. The value may be a single option to set, an arrayref of options to set, or a hashref of options to set to specific values. =item required required => 1 If an option is required, failure to provide the option will result in C printing the usage message and exiting. =item hidden hidden => 1 This option will not show up in the usage text. You can achieve the same behavior by using the string "hidden" for the option's description. =item one_of one_of => \@subopt_specs This is useful for a group of options that are related. Each option spec is added to the list for normal parsing and validation. Your option name will end up with a value of the name of the option that was chosen. For example, given the following spec: [ "mode" => hidden => { one_of => [ [ "get|g" => "get the value" ], [ "set|s" => "set the value" ], [ "delete" => "delete it" ], ] } ], No usage text for 'mode' will be displayed, but text for get, set, and delete will be displayed. If more than one of get, set, or delete is given, an error will be thrown. So, given the C<@opt_spec> above, and an C<@ARGV> of C<('--get')>, the following would be true: $opt->get == 1; $opt->mode eq 'get'; B: C would not be set if C defaulted to 'get' and no arguments were passed in. Even though the option sub-specs for C are meant to be 'first class' specs, some options don't make sense with them, e.g. C. As a further shorthand, you may specify C options using this form: [ mode => \@option_specs, \%constraints ] =item shortcircuit shortcircuit => 1 If this option is present no other options will be returned. Other options present will be checked for proper types, but I for constraints. This provides a way of specifying C<--help> style options. =item Params::Validate In addition, any constraint understood by Params::Validate may be used. (Internally, all constraints are translated into Params::Validate options or callbacks.) =back =head3 %arg The C<%arg> to C is optional. If the last parameter is a hashref, it contains extra arguments to modify the way C works. Valid arguments are: getopt_conf - an arrayref of strings, passed to Getopt::Long::Configure =head2 prog_name This routine, exported on demand, returns the basename of C<$0>, grabbed at compile-time. You can override this guess by calling C yourself. =head1 OTHER EXPORTS =head2 C<-types> Any of the Params::Validate type constants (C, etc.) can be imported as well. You can get all of them at once by importing C<-types>. =head2 C<-all> This import group will import C<-type>, C, and C. =head1 CUSTOMIZING Getopt::Long::Descriptive uses L to build and export the C routine. By writing a new class that extends Getopt::Long::Descriptive, the behavior of the constructed C routine can be changed. The following methods can be overridden: =head2 usage_class my $class = Getopt::Long::Descriptive->usage_class; This returns the class to be used for constructing a Usage object, and defaults to Getopt::Long::Descriptive::Usage. =head1 SEE ALSO =over 4 =item * L =item * L =back =head1 AUTHORS =over 4 =item * Hans Dieter Pearcey =item * Ricardo Signes =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2005 by Hans Dieter Pearcey. 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 changes_has_content.t100644000766000766 201112223527203 23553 0ustar00rjbsrjbs000000000000Getopt-Long-Descriptive-0.096/xt/release#!perl use Test::More tests => 2; note 'Checking Changes'; my $changes_file = 'Changes'; my $newver = '0.096'; 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; } Descriptive000755000766000766 012223527203 22354 5ustar00rjbsrjbs000000000000Getopt-Long-Descriptive-0.096/lib/Getopt/LongOpts.pm100644000766000766 1033412223527203 24020 0ustar00rjbsrjbs000000000000Getopt-Long-Descriptive-0.096/lib/Getopt/Long/Descriptiveuse strict; use warnings; package Getopt::Long::Descriptive::Opts; { $Getopt::Long::Descriptive::Opts::VERSION = '0.096'; } # ABSTRACT: object representing command line switches use Scalar::Util qw(blessed weaken); my %_CREATED_OPTS; my $SERIAL_NUMBER = 1; sub _specified { my ($self, $name) = @_; my $meta = $_CREATED_OPTS{ blessed $self }{meta}; return $meta->{given}{ $name }; } sub _specified_opts { my ($self) = @_; my $class = blessed $self; my $meta = $_CREATED_OPTS{ $class }{meta}; return $meta->{specified_opts} if $meta->{specified_opts}; my @keys = grep { $meta->{given}{ $_ } } (keys %{ $meta->{given} }); my %opts; @opts{ @keys } = @$self{ @keys }; $meta->{specified_opts} = \%opts; bless $meta->{specified_opts} => $class; weaken $meta->{specified_opts}; $meta->{specified_opts}; } sub _complete_opts { my ($self) = @_; my $class = blessed $self; my $meta = $_CREATED_OPTS{ $class }{meta}; return $meta->{complete_opts}; } sub ___class_for_opt { my ($class, $arg) = @_; my $values = $arg->{values}; my @bad = grep { $_ !~ /^[a-z_]\w*$/ } keys %$values; Carp::confess("perverse option names given: @bad") if @bad; my $new_class = "$class\::__OPT__::" . $SERIAL_NUMBER++; $_CREATED_OPTS{ $new_class } = { meta => $arg }; { no strict 'refs'; ${"$new_class\::VERSION"} = $class->VERSION; *{"$new_class\::ISA"} = [ 'Getopt::Long::Descriptive::Opts' ]; for my $opt (keys %$values) { *{"$new_class\::$opt"} = sub { $_[0]->{ $opt } }; } } return $new_class; } sub ___new_opt_obj { my ($class, $arg) = @_; my $copy = { %{ $arg->{values} } }; my $new_class = $class->___class_for_opt($arg); # This is stupid, but the traditional behavior was that if --foo was not # given, there is no $opt->{foo}; it started to show up when we "needed" all # the keys to generate a class, but was undef; this wasn't a problem, but # broke tests of things that were relying on not-exists like tests of %$opt # contents or MooseX::Getopt which wanted to use things as args for new -- # undef would not pass an Int TC. Easier to just do this. -- rjbs, # 2009-11-27 delete $copy->{$_} for grep { ! defined $copy->{$_} } keys %$copy; my $self = bless $copy => $new_class; $_CREATED_OPTS{ $new_class }{meta}{complete_opts} = $self; # weaken $_CREATED_OPTS{ $new_class }{meta}{complete_opts}; return $self; } 1; __END__ =pod =head1 NAME Getopt::Long::Descriptive::Opts - object representing command line switches =head1 VERSION version 0.096 =head1 DESCRIPTION This class is the base class of all C<$opt> objects returned by L. In general, you do not want to think about this class, look at it, or alter it. Seriously, it's pretty dumb. Every call to C will return a object of a new subclass of this class. It will have a method for the canonical name of each option possible given the option specifications. Method names beginning with an single underscore are public, and are named that way to avoid conflict with automatically generated methods. Methods with multiple underscores (in case you're reading the source) are private. =head1 METHODS B All methods beginning with an underscore are experimental as of today, 2009-12-12. They are likely to be formally made permanent soon. =head2 _specified This method returns true if the given name was specified on the command line. For example, if C<@ARGS> was "C<< --foo --bar 10 >>" and C is defined by a default, C<_specified> will return true for foo and bar, and false for baz. =head2 _specified_opts This method returns an opt object in which only explicitly specified values are defined. Values which were set by defaults will appear undef. =head2 _complete_opts This method returns the opts object with all values, including those set by defaults. It is probably not going to be very often-used. =head1 AUTHORS =over 4 =item * Hans Dieter Pearcey =item * Ricardo Signes =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2005 by Hans Dieter Pearcey. 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 Usage.pm100644000766000766 1041712223527203 24141 0ustar00rjbsrjbs000000000000Getopt-Long-Descriptive-0.096/lib/Getopt/Long/Descriptiveuse strict; use warnings; package Getopt::Long::Descriptive::Usage; { $Getopt::Long::Descriptive::Usage::VERSION = '0.096'; } # ABSTRACT: the usage description for GLD use List::Util qw(max); sub new { my ($class, $arg) = @_; my @to_copy = qw(options leader_text); my %copy; @copy{ @to_copy } = @$arg{ @to_copy }; bless \%copy => $class; } sub text { my ($self) = @_; return join qq{\n}, $self->leader_text, $self->option_text; } sub leader_text { $_[0]->{leader_text} } sub option_text { my ($self) = @_; my @options = @{ $self->{options} || [] }; my $string = q{}; # a spec can grow up to 4 characters in usage output: # '-' on short option, ' ' between short and long, '--' on long my @specs = map { $_->{spec} } grep { $_->{desc} ne 'spacer' } @options; my $length = (max(map { length } @specs) || 0) + 4; my $spec_fmt = "\t%-${length}s"; while (@options) { my $opt = shift @options; my $spec = $opt->{spec}; my $desc = $opt->{desc}; if ($desc eq 'spacer') { $string .= sprintf "$spec_fmt\n", $opt->{spec}; next; } $spec = Getopt::Long::Descriptive->_strip_assignment($spec); $spec = join " ", reverse map { length > 1 ? "--$_" : "-$_" } split /\|/, $spec; my @desc = $self->_split_description($length, $desc); $string .= sprintf "$spec_fmt %s\n", $spec, shift @desc; for my $line (@desc) { $string .= "\t"; $string .= q{ } x ( $length + 2 ); $string .= "$line\n"; } } return $string; } sub _split_description { my ($self, $length, $desc) = @_; # 8 for a tab, 2 for the space between option & desc; my $max_length = 78 - ( $length + 8 + 2 ); return $desc if length $desc <= $max_length; my @lines; while (length $desc > $max_length) { my $idx = rindex( substr( $desc, 0, $max_length ), q{ }, ); last unless $idx >= 0; push @lines, substr($desc, 0, $idx); substr($desc, 0, $idx + 1) = q{}; } push @lines, $desc; return @lines; } sub warn { warn shift->text } sub die { my $self = shift; my $arg = shift || {}; die( join q{}, grep { defined } $arg->{pre_text}, $self->text, $arg->{post_text} ); } use overload ( q{""} => "text", # This is only needed because Usage used to be a blessed coderef that worked # this way. Later we can toss a warning in here. -- rjbs, 2009-08-19 '&{}' => sub { my ($self) = @_; Carp::cluck("use of __PACKAGE__ objects as a code ref is deprecated"); return sub { return $_[0] ? $self->text : $self->warn; }; } ); 1; __END__ =pod =head1 NAME Getopt::Long::Descriptive::Usage - the usage description for GLD =head1 VERSION version 0.096 =head1 SYNOPSIS use Getopt::Long::Descriptive; my ($opt, $usage) = describe_options( ... ); $usage->text; # complete usage message $usage->die; # die with usage message =head1 DESCRIPTION This document only describes the methods of the Usage object. For information on how to use L, consult its documentation. =head1 METHODS =head2 new my $usage = Getopt::Long::Descriptive::Usage->new(\%arg); You B don't need to call this. GLD will do it for you. Valid arguments are: options - an arrayref of options leader_text - the text that leads the usage; this may go away! =head2 text This returns the full text of the usage message. =head2 leader_text This returns the text that comes at the beginning of the usage message. =head2 option_text This returns the text describing the available options. =head2 warn This warns with the usage message. =head2 die This throws the usage message as an exception. $usage_obj->die(\%arg); Some arguments can be provided pre_text - text to be prepended to the usage message post_text - text to be appended to the usage message The C and C arguments are concatenated with the usage message with no line breaks, so supply this if you need them. =head1 AUTHORS =over 4 =item * Hans Dieter Pearcey =item * Ricardo Signes =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2005 by Hans Dieter Pearcey. 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