Getopt-Yath-2.000011000755001750001750 015165554207 14435 5ustar00exodistexodist000000000000deps100644001750001750 20015165554207 15344 0ustar00exodistexodist000000000000Getopt-Yath-2.000011Carp Importer Term::Table::Util Test2::Harness::Util Test2::Harness::Util::HashBase Test2::Harness::Util::JSON Test2::V0 parent README100644001750001750 5502315165554207 15423 0ustar00exodistexodist000000000000Getopt-Yath-2.000011NAME Getopt::Yath - Option processing yath style. DESCRIPTION This is the getopt processor yath uses. It should work perfectly fine outside of yath as well. SYNOPSIS DEFINING OPTIONS package My::Package; use Getopt::Yath; # Include options from other modules that use Getopt::Yath include_options( 'Some::Options::Package', ..., ); # an option group is basically a way to specify common parameters for all # options defined in the codeblock. option_group {category => 'Human readable category', group => 'settings_group'} => sub { # In addition to the fields specified here, all the fields from the # 'option_group' above are included: option verbose => ( type => 'Bool', # This is a boolean type, it does not take an argument # Optional fields short => 'v', # Allow -v in addition to --verbose default => 0, # What value to use if none is specified (booleans default to 0 anyway) from_env_vars => ['VERBOSE'], # If the $VERBOSE environment variable is set, this will be set to true. set_env_vars => ['VERBOSE'], # If this is set to true it will also set the $VERBOSE environment variable description => "This turns on verbose output", ); option username => ( type => 'Scalar', # Scalar type, requires an argument # Optional short => 'U', # Allow: -U Bob alt => ['user', 'uname'], # Allow: --user Bob, --uname Bob from_env_vars => ['USER'], # Get the value from the $USER env var if it is not provided. default => sub { "bob" . rand(100) }, # If none is specified, and the env var is empty, generate a default. description => "This sets your username", ); # Other options ... }; PARSING OPTIONS my $parsed = parse_options( ['-v', '--user', 'fred', 'not_an_opt', '--', '--will-not-process'], # Normally you might pass in \@ARGV skip_non_opts => 1, # Skip non-opts, that is any argument that does not start with a '-' it will just skip. stops => ['--'], # Stop processing no_set_env => 1, # Do not actually change %ENV groups => { ':{' => '}:' }, # Arguments between the :{ and }: will be captured into an arrayref, they can be used as option values, or stand-alone ); $parsed is a Getopt::Yath::State object: $parsed->cleared; # {} - Options that were cleared with --no-opt $parsed->skipped; # ['not_an_opt'] - Skipped non options $parsed->settings; # Blessed as Getopt::Yath::Settings # ->settings_group (Blessed as Getopt::Yath::Settings::Group) # ->verbose == 1 # ->username == 'fred' $parsed->stop; # '--' - We stopped at '--', if there was no '--' this would be undef $parsed->remains; # ['--will-not-process'] - Stuff after the '--' that we did not process $parsed->modules; # {'My::Package' => 2} - Any module that provided options that were seen $parsed->env; # {'VERBOSE' => 1} - Environment variables that would have been set GENERATING COMMAND LINE HELP OUTPUT: sub help { print options()->docs('cli'); } help(); Produces: Human readable category --username ARG, --username=ARG, --user ARG, --user=ARG, --uname ARG --uname=ARG, -U ARG, -U=ARG, --no-username This sets your username Can also be set with the following environment variables: USER --verbose, -v, --no-verbose This turns on verbose output Can also be set with the following environment variables: VERBOSE The following environment variables will be set after arguments are processed: VERBOSE GENERATING POD: sub pod { print options()->docs('pod', head => 2); # The '2' specifies what heading level to use } pod(); Produces: =head2 Human readable category =over 4 =item --username ARG =item --username=ARG =item --user ARG =item --user=ARG =item --uname ARG =item --uname=ARG =item -U ARG =item -U=ARG =item --no-username This sets your username Can also be set with the following environment variables: C =item --verbose =item -v =item --no-verbose This turns on verbose output Can also be set with the following environment variables: C The following environment variables will be set after arguments are processed: C =back EXPORTS $opts = options() This will return an Getopt::Yath::Instance object. This object holds all the defined options, and does all the real work under the hood. $parsed = parse_options(\@ARGV) $parsed = parse_options(\@ARGV, %PARAMS) This processes an arrayref of command line arguments and returns a Getopt::Yath::State object. If there is a problem parsing, such as invalid options in the array, exceptions will be thrown. See Getopt::Yath::State for the full list of accessors on the returned object. Available parameters that affect parsing are: stops => \@STOP_LIST stops => ['--'] This is a list of string that if encountered should stop the parsing process. The string encountered will be available via $parsed->stop. Any unparsed arguments after the stop will be available via $parsed->remains. This is mostly useful for supporting the -- option. groups => \%GROUP_BORDERS groups => { ':{' => '}:' } Arguments between the specified start and end tokens will be grouped together into an arrayref. stop_at_non_opts => BOOL This will cause parsing to stop at any non-option. A non-option in this case is any argument that does not start with a -. The item stopped at will be available via $parsed->stop with the remaining arguments available via $parsed->remains. skip_non_opts => BOOL This will skip any non-option encountered. A non-option is any argument that does not start with -. All skipped items will be available via $parsed->skipped. skip_invalid_opts => BOOL This will skip any invalid option encountered. This includes any argument that starts with - but is not a valid option. All skipped items will be available via $parsed->skipped. stop_at_invalid_opts => BOOL This will cause parsing to stop at any invalid option. This includes any argument that starts with - but is not a valid option. The item stopped at will be available via $parsed->stop with the remaining arguments available via $parsed->remains. no_set_env => BOOL Set this to true to prevent any modifications to %ENV. $parsed->env will contain the environment variable changes that would have been made. Note: The env accessor is always populated even if %ENV is modified directly. include_options('Options::Module::A', 'Options::Module::B', ...) This allows you to build libraries of Getopt::Yath options and include them as needed. Options from the specified libraries will be merged into the current packages options. option_group \%fields => sub { ... } option_group {group => 'my_group'} => sub { option ...; ... } Create a group of options with common parameters. option TITLE => \%SPECIFICATION option TITLE => (type => '+My::Type', ...) option TITLE => (type => 'Getopt::Yath::Option::Type', ...) option TITLE => (type => 'Type', ...) This is used to define a single option. You must specify an option NAME and 'type', which must be a valid Getopt::Yath::Option subclass. The TITLE is used to produce default values for the 'field' and 'name' fields, both of which can be specified directly if the automatic values are not sufficient. 'field' gets the value of title with dashes replaced by underscores. 'name' gets the value of title with underscores replaced with dashes. Most of the time you can just list the type as the part after the last :: in Getopt::Yath::Option::TYPE. You can also specify Getopt::Yath::Option::TYPE or Getopt::Yath::Option::TYPE::SubType directly. However if you need to use a module that is not in the Getopt::Yath::Option:: namespace you will need to prefix the module with a + to indicate that. option_post_process sub { ... } option_post_process $weight, sub { ... } option_post_process $weight, $applicable, sub { ... } Register a callback to run after all options have been parsed. The callback receives the Getopt::Yath::Instance object and the parse state hashref as arguments. $weight controls execution order (lower weights run first, default is 0). $applicable is an optional coderef that determines whether this post-processor should run; if provided it receives the post-process entry, the instance, and the settings object. If used inside an option_group block, the group's applicable is inherited when none is specified. option_post_process 100 => sub { my ($instance, $state) = @_; # Do something after all options are parsed }; category_sort_map(%map) Set the sort order for option categories in documentation output. Categories with lower values are listed first. By default, "NO CATEGORY - FIX ME" is sorted to 99999 (last). category_sort_map( 'Display Options' => 1, 'Runner Options' => 2, 'Logging Options' => 3, ); OPTION TYPES AND SPECIFICATIONS REQUIRED WITH NO DEFAULTS title This is the first argument to option(). It is used to build the default values for both field and name. group => "group_name" Name of the field to use in the options hash under which the option will be listed: $parsed->{options}->{$group}->{$field_name} = $val type => 'TypeName' type => 'Getopt::Yath::Option::TypeName' type => '+My::Custom::Type' This must be a valid Getopt::Yath::Option subclass: Scalar Takes a scalar value. A value is required. Can be used as --opt VAL or --opt=val. --no-opt can be used to clear the value. Bool Is either on or off. --opt will turn it on. --no-opt will turn it off. Default is off unless the default is parameter is provided. Count Is an integer value, default is to start at 0. --opt increments the counter. --no-opt resets the counter. --opt=VAL can be used to specify a desired count. List Can take multiple values. --opt VAL appends a value to the list. --no-opt will empty the list. If a split_on parameter is provided then a single use can set multiple values. For example if split_on is set to , then --opt foo,bar is provided, then foo and bar will both be added to the list. Map Expects all values to be key=value pairs and produces a hashref. --opt foo=bar will set $h{foo} = 'bar'. If a split_on parameter is provided then a single use can set multiple values. For example if split_on is set to , then --opt foo=bar,baz=bat is provided, then the result will have $h{foo} = 'bar'; $h{baz} = 'bat'. Auto This type has an 'autofill' value that is used if no argument is provided to the parameter, IE --opt. But can also be given a specific value using --opt=val. It DOES NOT support --opt VAL which will most likely result in an exception. AutoList This is a combination of 'Auto' and 'List' types. The no-arg form --opt will add the default values(s) to the list. The --opt=VAL form will add additional values. AutoMap This is a combination of 'Auto' and 'Map' types. The no-arg form --opt will add the default key+value pairs to the hash. The --opt=KEY=VAL form will add additional values. PathList Like List, but values are treated as file paths and may contain shell-style wildcards (globs) which are expanded. For example, --opt 'lib/*.pm' will expand to all matching files. AutoPathList Like PathList with autofill support. The no-arg form --opt adds the autofill paths, while --opt=path adds a specific path. BoolMap Match several --OPTION-XXX and --no-OPTION-XXX options based on a regex pattern, populating a hashref where each matched key is given a true or false value depending on the --no- prefix. Requires a pattern attribute. REQUIRED WITH SANE DEFAULTS field => "field_name" Name of the field to use in the group hash for the result of parsing arguments. $parsed->{options}->{$group}->{$field_name} = $val Default is to take the title value and replace any dashes with underscores. name => "option-name" Primary name for the option --option-name. Default is to take the title value and replace any underscores with dashes. trace => [$caller, $file, $line] This normally resolves to the place option() was called. You can manually override it with a custom value, but you should rarely ever need to. category => "Human Readable documentation category" When producing POD or command line documentation, options are put into "categories" which should be the human readable version of the group field. Default is "NO CATEGORY - FIX ME". description => "Explanation of what the option controls" Document what the option controls or does. Default is 'NO DESCRIPTION - FIX ME'. OPTIONAL short => 's' Specify a short flag to use. This is how you provide single-dash single-letter options. -s If no argument is required this form is available. -s=VAL If an argument is allowed this form is available -sVAL If an argument is allowed, and this form is not directly disabled by the type (Types can override allows_shortval() to return false to forbid this form. Currently Getopt::Yath::Option::Bool and Getopt::Yath::Option::Count disable this form. -sss So far only the Getopt::Yath::Option::Count type makes use of this. It allows you to add the flag multiple times after a single dash to increment the count. alt => \@LIST alt => ['alt1', 'alt2'] Specify alternate or alias names that can be used to set or toggle a field. --alt1 --alt2 foo prefix => "a-prefix" Specify a prefix to attach to the name, and to any alternate names. This is mainly useful when specifying an option group: option_group {prefix => 'foo'} => sub { option bar => ( type => "Bool", ); }; This would then be used as --foo-bar module => 'My::Module' Specify the module the argument should be associated with. This defaults to the caller, so usually you do not need to specify it. This is mainly used in the case of plugins we only want to load if the option is used. no_module => BOOL Default is 0. When this is set to true the module name is not used. applicable => sub { my $options = shift; ... ? 1 : 0 } This can be used to dynamically show/hide options. When this returns false the option will not be available. initialize => $scalar initialize => sub { ... } Initialize the value to this before any arguments are parsed. This is mainly used so that Getopt::Yath::Option::Map can start with an empty hash, and Getopt::Yath::Option::List can be initialized to an empty arrayref. This can be a simple scalar (string or number, not a reference), or it may be a codeblock that returns anything you want. Only 1 item should be returned, extra values will result in undefined behavior. For a map this should return an empty hashref, for a list it should return an empty arrayref. clear => $scalar clear => sub { ... } Similar to initialize, but this is used when clearing the value. For things like 'Map' this should return a hashref, etc. default => $scalar default => sub { ... } Set a default to use if no value is provided at the command line. This can be a simple scalar (string or number, not a reference), or it may be a codeblock that returns anything you want. Most options will only accept a single default value. Getopt::Yath::Option::Map and Getopt::Yath::Option::List support a list of defaults for setting key/value pairs, or adding items to an array. These are valid for anything: default => 'foo', default => 123, default => sub { "hi" } This is valid for an Getopt::Yath::Option::Map: default => sub { return ('foo' => 'bar') } This is valid for a Getopt::Yath::Option::List: default => sub { return (1, 2, 3, 4) } autofill => $scalar autofill => sub { ... } This is used for Getopt::Yath::Option::Auto and similar. This is the value used if the command line option is provided, but no value is provided with it. This can be a simple scalar (string or number, not a reference), or it may be a codeblock that returns anything you want. Most options will only accept a single autofill value. Getopt::Yath::Option::Map and Getopt::Yath::Option::List support a list of autofill data for setting key/value pairs, or adding items to an array. These are valid for anything: autofill => 'foo', autofill => 123, autofill => sub { "hi" } This is valid for an Getopt::Yath::Option::Map: autofill => sub { return ('foo' => 'bar') } This is valid for a Getopt::Yath::Option::List: autofill => sub { return (1, 2, 3, 4) } normalize => sub { my ($input) = @_; ...; return $output } If you wish to normalize or transform a value then you use this hook. The sub will get the option and the input value as its arguments. You should return the new value to set, or the input value if it does not need to change. trigger => sub { my ($opt, %params) = @_; ... } This will be called any time the option is parsed from the command line, or whenever the command line clears the option. NOTE: It will not run when initial, autofill, or default values are set. The %params passed into the sub look like this: ( # If this trigger is called because the value is cleared via --no-OPT: action => 'clear', val => undef, # If a value is set because of --opt being parsed: action => 'set', val => [...], ref => $ref, state => $state, options => $self, settings => $settings, group => $group, ); Note that val is always passed in as an arrayref. For simple scalar type options this will only ever have 1 value. For list or map types it may have multiple values, also note that for such types the trigger will only see the newly added values in the 'val' arrayref, not the values already included, which is important as list and map types can be built over several assignments. from_env_vars => \@LIST A list of environment variables that will be used to populate the option's initial value. These will be checked in order, the first one that is set is the one that will be used, others will not be checked once a value is found. This will prevent the default value from being used, but using the option on the command line will override it. Note: that an environment variable can be prefixed with a ! to indicate the value should be boolean-inverted. This means that an option like quiet can have from_env_vars => ['!VERBOSE'] to be set to true when the VERBOSE env var is false. This also works when setting a variable, so you could have set_env_vars => ['!VERBOSE']. clear_env_vars => \@LIST A list of environment variables to clear after the options are all populated. This is useful if you want to use an env var to set an option, but want to make sure no child processes see the environment variable. set_env_vars => \@LIST A list of environment variables that will be set to the value of this option (if it is set) when argument processing is complete. Note: This is only supported in types that have a single value, maps and lists are not supported. Note: that an environment variable can be prefixed with a ! to indicate the value should be boolean-inverted. This means that an option like quiet can have from_env_vars => ['!VERBOSE'] to be set to true when the VERBOSE env var is false. This also works when setting a variable, so you could have set_env_vars => ['!VERBOSE']. short_examples => \@LIST short_examples => ['', 'ARG', '=ARG'] short_examples => [' ARG', '=ARG'] Override the default list of arguments when generating docs. This is used for the short form (single dash followed by a single letter and then a value -Ilib, -I lib, -I=lib, -v, -vv, -vvv...) documentation. long_examples => \@LIST long_examples => ['', '=ARG'] long_examples => [' ARG', '=ARG'] Override the default list of arguments when generating docs. This is used for the long form (double-dash and option name and then a value --include, --include=lib, --include lib) documentation. SOURCE The source code repository for Getopt-Yath can be found at http://github.com/Test-More/Getopt-Yath/. MAINTAINERS Chad Granum AUTHORS Chad Granum COPYRIGHT Copyright Chad Granum . This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/ LICENSE100644001750001750 4627615165554207 15562 0ustar00exodistexodist000000000000Getopt-Yath-2.000011This software is copyright (c) 2026 by Chad Granum. 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) 2026 by Chad Granum. 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. 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, see . 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 Moe Ghoul, President of Vice That's all there is to it! --- The Perl Artistic License 1.0 --- This software is Copyright (c) 2026 by Chad Granum. This is free software, licensed under: The Perl Artistic License 1.0 The "Artistic License" Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder as specified below. "Copyright Holder" is whoever is named in the copyright or copyrights for the package. "You" is you, if you're thinking about copying or distributing this Package. "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as uunet.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) give non-standard executables non-standard names, and clearly document the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. You may embed this Package's interpreter within an executable of yours (by linking); this shall be construed as a mere form of aggregation, provided that the complete Standard Version of the interpreter is so embedded. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whoever generated them, and may be sold commercially, and may be aggregated with this Package. If such scripts or library files are aggregated with this Package via the so-called "undump" or "unexec" methods of producing a binary executable image, then distribution of such an image shall neither be construed as a distribution of this Package nor shall it fall under the restrictions of Paragraphs 3 and 4, provided that you do not represent such an executable image as a Standard Version of this Package. 7. C subroutines (or comparably compiled subroutines in other languages) supplied by you and linked into this Package in order to emulate subroutines and variables of the language defined by this Package shall not be considered part of this Package, but are the equivalent of input as in Paragraph 6, provided these subroutines do not change the language in any way that would cause it to fail the regression tests for the language. 8. Aggregation of this Package with a commercial distribution is always permitted provided that the use of this Package is embedded; that is, when no overt attempt is made to make this Package's interfaces visible to the end user of the commercial distribution. Such use shall not be construed as a distribution of this Package. 9. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End Changes100644001750001750 267015165554207 16016 0ustar00exodistexodist000000000000Getopt-Yath-2.0000112.000011 2026-04-08 15:36:55-07:00 America/Los_Angeles - Skip JSON decode error tests on Perl < 5.014 (unreliable $@ handling) 2.000010 2026-04-08 08:16:27-07:00 America/Los_Angeles - Fix lvalue sub tests failing on Perl < 5.026 (skip or use setter form) - Remove encode_json bad-input test that depends on Cpanel::JSON::XS version - Fix decode_json_file failing to unlink on Windows (close fh before unlink) 2.000009 2026-04-07 20:17:28-07:00 America/Los_Angeles - Add Getopt::Yath::State object returned by parse_options/process_args - Add multi-stage subcommand parsing example to Tutorial - Add Getopt::Yath::Tutorial with step-by-step usage guide - Add missing Cpanel::JSON::XS dependency to dist.ini - Move Test2::V0 from runtime to test prerequisites - Fix wrong %INC key in JSON error message cleanup - Fix negated set_env_vars writing the un-negated value - Fix fit_to_width ignoring the prefix parameter - Fix default_short_examples calling SUPER::default_long_examples - Fix get_env_value using $ref instead of $$ref for negated env vars - Fix runtime crash in Settings::Group::remove_option - Fix numerous POD typos and add METHODS sections to POD - Expand test coverage 2.000008 2026-03-29 10:33:03-07:00 America/Los_Angeles - Fix missing package declaration in BoolMap 2.000007 2026-01-15 15:14:23-08:00 America/Los_Angeles - Broke out from Test2-Harness dist MANIFEST100644001750001750 614315165554207 15653 0ustar00exodistexodist000000000000Getopt-Yath-2.000011# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.037 Changes LICENSE MANIFEST META.json META.yml Makefile.PL README README.md cover_db/cover.14 cover_db/digests cover_db/structure/074198fa9d9f930e73513c89f513402e cover_db/structure/074198fa9d9f930e73513c89f513402e.lock cover_db/structure/123a2812c394bf08bb84455b37b6292d cover_db/structure/123a2812c394bf08bb84455b37b6292d.lock cover_db/structure/3502465c9985752ba64a6402725cd6e0 cover_db/structure/3502465c9985752ba64a6402725cd6e0.lock cover_db/structure/416b69c8408206cdd3a54ba7fb914057 cover_db/structure/416b69c8408206cdd3a54ba7fb914057.lock cover_db/structure/5935a1c1dc8a7b5d8a398c10d88be35b cover_db/structure/5935a1c1dc8a7b5d8a398c10d88be35b.lock cover_db/structure/6a827e48e74afc25312686ca19d59be8 cover_db/structure/6a827e48e74afc25312686ca19d59be8.lock cover_db/structure/77cca76ea82c90e86e9c2d1d1fe60337 cover_db/structure/77cca76ea82c90e86e9c2d1d1fe60337.lock cover_db/structure/7d23b0bf85ec79b212a8f76564523107 cover_db/structure/7d23b0bf85ec79b212a8f76564523107.lock cover_db/structure/97ba764446ce74b6c33a1ab4b586dfaf cover_db/structure/97ba764446ce74b6c33a1ab4b586dfaf.lock cover_db/structure/9b30e2fc1222fa186afd5bf5a7376d18 cover_db/structure/9b30e2fc1222fa186afd5bf5a7376d18.lock cover_db/structure/a20e1ed3446db7439850620b7acfc96c cover_db/structure/a20e1ed3446db7439850620b7acfc96c.lock cover_db/structure/a6b7b00c9e2237d585b5223604d20bb3 cover_db/structure/a6b7b00c9e2237d585b5223604d20bb3.lock cover_db/structure/becf4247919f617ab51cb6d1ac26c424 cover_db/structure/becf4247919f617ab51cb6d1ac26c424.lock cover_db/structure/c966eed5df47d66977103c0068d2ccc5 cover_db/structure/c966eed5df47d66977103c0068d2ccc5.lock cover_db/structure/d3e7a78339f259ed5077b808dc815c12 cover_db/structure/d3e7a78339f259ed5077b808dc815c12.lock cover_db/structure/e169eb9cf9ee8f25fe6c90a46c963bb0 cover_db/structure/e169eb9cf9ee8f25fe6c90a46c963bb0.lock cover_db/structure/eb8bc1a2c2dfe8bb39eb83c8ede73cba cover_db/structure/eb8bc1a2c2dfe8bb39eb83c8ede73cba.lock cover_db/structure/f32ba23251c7beef0a4fe0eaa54fe555 cover_db/structure/f32ba23251c7beef0a4fe0eaa54fe555.lock cover_db/structure/f3a721bedf2a61b478c4702a40da962c cover_db/structure/f3a721bedf2a61b478c4702a40da962c.lock cover_db/structure/fa9c9542d07de5fed488a0ccd13644ce cover_db/structure/fa9c9542d07de5fed488a0ccd13644ce.lock cpanfile deps dist.ini lib/Getopt/Yath.pm lib/Getopt/Yath/HashBase.pm lib/Getopt/Yath/Instance.pm lib/Getopt/Yath/Option.pm lib/Getopt/Yath/Option/Auto.pm lib/Getopt/Yath/Option/AutoList.pm lib/Getopt/Yath/Option/AutoMap.pm lib/Getopt/Yath/Option/AutoPathList.pm lib/Getopt/Yath/Option/Bool.pm lib/Getopt/Yath/Option/BoolMap.pm lib/Getopt/Yath/Option/Count.pm lib/Getopt/Yath/Option/List.pm lib/Getopt/Yath/Option/Map.pm lib/Getopt/Yath/Option/PathList.pm lib/Getopt/Yath/Option/Scalar.pm lib/Getopt/Yath/Settings.pm lib/Getopt/Yath/Settings/Group.pm lib/Getopt/Yath/State.pm lib/Getopt/Yath/Term.pm lib/Getopt/Yath/Tutorial.pm lib/Getopt/Yath/Util.pm t/HashBase.t t/acceptance.t t/coverage.t t/getopt_yath.t t/option.t t/option_types.t t/parsing.t t/settings.t t/term.t t/util.t xt/author/pod-syntax.t dist.ini100644001750001750 335515165554207 16170 0ustar00exodistexodist000000000000Getopt-Yath-2.000011name = Getopt-Yath author = Chad Granum license = Perl_5 copyright_holder = Chad Granum [RewriteVersion] ; sets dist version from main module's $VERSION [License] [ManifestSkip] [Manifest] [NextRelease] [GatherDir] exclude_match = ^xt/downstream ; only run these tests locally exclude_filename = LICENSE exclude_filename = Makefile.PL exclude_filename = cpanfile exclude_filename = README exclude_filename = README.md [PodSyntaxTests] [TestRelease] [MetaResources] bugtracker.web = https://github.com/Test-More/Getopt-Yath/issues repository.url = https://github.com/Test-More/Getopt-Yath/ repository.type = git [Prereqs] perl = 5.012000 parent = 0 Carp = 0 Cpanel::JSON::XS = 0 Importer = 0.024 Term::Table = 0.028 [Prereqs / TestRequires] Test2::V0 = 0.000097 [MakeMaker] [CPANFile] [MetaYAML] [MetaJSON] ; authordep Pod::Markdown [ReadmeFromPod / Markdown] filename = lib/Getopt/Yath.pm type = markdown readme = README.md [ReadmeFromPod / Text] filename = lib/Getopt/Yath.pm type = text readme = README [CopyFilesFromBuild] copy = LICENSE copy = cpanfile copy = README copy = README.md copy = Makefile.PL [Git::Check] allow_dirty = Makefile.PL allow_dirty = README allow_dirty = README.md allow_dirty = cpanfile allow_dirty = LICENSE allow_dirty = Changes [Git::Commit] allow_dirty = Makefile.PL allow_dirty = README allow_dirty = README.md allow_dirty = cpanfile allow_dirty = LICENSE allow_dirty = Changes [Git::Tag] [FakeRelease] [BumpVersionAfterRelease] [Git::Commit / Commit_Changes] munge_makefile_pl = true allow_dirty_match = ^lib allow_dirty = Makefile.PL allow_dirty = README allow_dirty = README.md allow_dirty = cpanfile allow_dirty = LICENSE commit_msg = Automated Version Bump t000755001750001750 015165554207 14621 5ustar00exodistexodist000000000000Getopt-Yath-2.000011util.t100644001750001750 1040715165554207 16145 0ustar00exodistexodist000000000000Getopt-Yath-2.000011/tuse Test2::V0; use Getopt::Yath::Util qw/mod2file fqmod encode_json decode_json encode_json_file decode_json_file/; subtest mod2file => sub { is(mod2file('Foo::Bar::Baz'), 'Foo/Bar/Baz.pm', 'converts :: to /'); is(mod2file('Simple'), 'Simple.pm', 'single-segment module'); like( dies { mod2file(undef) }, qr/No module name provided/, 'dies with no argument', ); }; subtest fqmod_with_prefix => sub { # Getopt::Yath::Option::Bool is a known module my $mod = fqmod('Bool', 'Getopt::Yath::Option'); is($mod, 'Getopt::Yath::Option::Bool', 'resolves short name with prefix'); }; subtest fqmod_already_prefixed => sub { my $mod = fqmod('Getopt::Yath::Option::Bool', 'Getopt::Yath::Option'); is($mod, 'Getopt::Yath::Option::Bool', 'does not double-prefix'); }; subtest fqmod_plus_prefix => sub { my $mod = fqmod('+Getopt::Yath::Option::Scalar', 'SomePrefix'); is($mod, 'Getopt::Yath::Option::Scalar', 'strips + and uses fully qualified name'); }; subtest fqmod_no_require => sub { my $mod = fqmod('Nonexistent', 'Fake::Prefix', no_require => 1); is($mod, 'Fake::Prefix::Nonexistent', 'no_require skips loading'); }; subtest fqmod_not_found => sub { like( dies { fqmod('ZzzNotReal', 'Zzz::Prefix') }, qr/Could not locate a module matching 'ZzzNotReal'/, 'dies when module cannot be found', ); }; subtest fqmod_multiple_prefixes => sub { my $mod = fqmod('Bool', ['NoSuch::Prefix', 'Getopt::Yath::Option']); is($mod, 'Getopt::Yath::Option::Bool', 'tries multiple prefixes, finds the second'); }; subtest json_roundtrip => sub { my $data = {foo => [1, 2, 3], bar => 'hello'}; my $json = encode_json($data); ok(defined $json, 'encode_json produces output'); like($json, qr/"foo"/, 'JSON contains key'); my $decoded = decode_json($json); is($decoded, $data, 'decode_json round-trips'); }; subtest json_file_roundtrip => sub { my $data = {test => 'value', nums => [10, 20]}; my $file = encode_json_file($data); ok(-f $file, 'encode_json_file creates a file'); my $decoded = decode_json_file($file, unlink => 1); is($decoded, $data, 'decode_json_file round-trips'); ok(!-f $file, 'file was unlinked'); }; subtest decode_json_invalid => sub { like( dies { decode_json('not json at all') }, qr/./, # Just confirm it dies 'decode_json dies on invalid input', ); }; subtest fqmod_no_prefix => sub { like( dies { fqmod('Foo', undef) }, qr/At least 1 prefix is required/, 'fqmod dies without prefix', ); }; subtest fqmod_empty_prefix_list => sub { like( dies { fqmod('Foo', []) }, qr/At least 1 prefix is required/, 'fqmod dies with empty prefix list', ); }; subtest fqmod_no_require_with_multiple_prefixes => sub { like( dies { fqmod('Foo', ['A', 'B'], no_require => 1) }, qr/Cannot use no_require when providing multiple prefixes/, 'fqmod dies with no_require and multiple prefixes', ); }; subtest fqmod_plus_prefix_no_require => sub { my $mod = fqmod('+Some::Fake::Module', 'Prefix', no_require => 1); is($mod, 'Some::Fake::Module', '+ prefix with no_require strips + without loading'); }; subtest fqmod_plus_prefix_load_failure => sub { like( dies { fqmod('+Zzz::Nonexistent::Module999', 'SomePrefix') }, qr/Can't locate/, '+ prefix with nonexistent module dies on require', ); }; subtest encode_json_scalars => sub { is(decode_json(encode_json(42)), 42, 'round-trip a number'); is(decode_json(encode_json("hello")), "hello", 'round-trip a string'); is(decode_json(encode_json(undef)), undef, 'round-trip undef/null'); }; subtest encode_json_ascii => sub { my $json = encode_json({key => "\x{263A}"}); unlike($json, qr/[^\x00-\x7f]/, 'encode_json produces ASCII-only output'); }; subtest decode_json_file_without_unlink => sub { my $file = encode_json_file({keep => 1}); my $data = decode_json_file($file); is($data, {keep => 1}, 'decode_json_file works without unlink'); ok(-f $file, 'file still exists without unlink flag'); unlink $file; }; subtest mod2file_deep_nesting => sub { is(mod2file('A::B::C::D::E'), 'A/B/C/D/E.pm', 'deeply nested module name'); }; done_testing; term.t100644001750001750 675715165554207 16134 0ustar00exodistexodist000000000000Getopt-Yath-2.000011/tuse Test2::V0; use Getopt::Yath::Term qw/USE_COLOR color fit_to_width/; subtest USE_COLOR => sub { my $val = USE_COLOR(); ok(defined $val, 'USE_COLOR returns a defined value'); ok($val == 0 || $val == 1, 'USE_COLOR returns 0 or 1'); }; subtest color => sub { my $result = color('red'); ok(defined $result, 'color returns a defined value'); # If Term::ANSIColor is available, it returns an escape sequence; otherwise '' if (USE_COLOR()) { like($result, qr/\e\[/, 'color returns ANSI escape when color is available'); } else { is($result, '', 'color returns empty string when color is unavailable'); } }; subtest 'fit_to_width basic' => sub { my $text = "short text"; my $out = fit_to_width(" ", $text, width => 80); is($out, "short text", 'short text passes through unchanged'); }; subtest 'fit_to_width wrapping' => sub { my $text = "word " x 30; # ~150 chars my $out = fit_to_width(" ", $text, width => 40); my @lines = split /\n/, $out; ok(@lines > 1, 'long text is wrapped into multiple lines'); for my $line (@lines) { ok(length($line) <= 44, "line does not grossly exceed width: '$line'"); } }; subtest 'fit_to_width with prefix' => sub { my $text = "hello world this is a test"; my $out = fit_to_width(" ", $text, width => 80, prefix => ">> "); my @lines = split /\n/, $out; for my $line (@lines) { like($line, qr/^>> /, "line starts with prefix: '$line'"); } }; subtest 'fit_to_width with arrayref' => sub { my $parts = [qw/alpha beta gamma/]; my $out = fit_to_width(", ", $parts, width => 80); is($out, "alpha, beta, gamma", 'arrayref input joined correctly'); }; subtest 'fit_to_width narrow width forces wrapping' => sub { my $text = "one two three four five"; my $out = fit_to_width(" ", $text, width => 10); my @lines = split /\n/, $out; ok(@lines >= 2, 'narrow width causes wrapping'); }; subtest 'fit_to_width no prefix' => sub { my $out = fit_to_width(" ", "hello world", width => 80); unlike($out, qr/^ /, 'no prefix means no indentation'); }; subtest 'fit_to_width empty prefix string' => sub { my $out = fit_to_width(" ", "hello world", width => 80, prefix => ""); is($out, "hello world", 'empty prefix adds empty string (no visible change)'); }; subtest 'fit_to_width custom prefix' => sub { my $out = fit_to_width(" ", "hello world", width => 80, prefix => "--- "); like($out, qr/^--- /, 'custom prefix applied'); }; subtest 'fit_to_width single word' => sub { my $out = fit_to_width(" ", "superlongword", width => 5); is($out, "superlongword", 'single word longer than width is not broken'); }; subtest 'fit_to_width empty text' => sub { my $out = fit_to_width(" ", "", width => 80); is($out, "", 'empty text returns empty string'); }; subtest 'fit_to_width multiline prefix' => sub { my $out = fit_to_width(" ", "aaa bbb ccc ddd", width => 8, prefix => "> "); my @lines = split /\n/, $out; for my $line (@lines) { like($line, qr/^> /, "each wrapped line has prefix: '$line'"); } }; subtest 'fit_to_width custom join' => sub { my $out = fit_to_width(", ", [qw/a b c/], width => 80); is($out, "a, b, c", 'custom join string used'); }; subtest 'fit_to_width default width' => sub { # Just verify it doesn't die when no width is given my $out = fit_to_width(" ", "some text here for testing default width calculation"); ok(defined $out, 'default width produces output'); }; done_testing; cpanfile100644001750001750 100715165554207 16220 0ustar00exodistexodist000000000000Getopt-Yath-2.000011# This file is generated by Dist::Zilla::Plugin::CPANFile v6.037 # Do not edit this file directly. To change prereqs, edit the `dist.ini` file. requires "Carp" => "0"; requires "Cpanel::JSON::XS" => "0"; requires "Importer" => "0.024"; requires "Term::Table" => "0.028"; requires "parent" => "0"; requires "perl" => "5.012000"; on 'test' => sub { requires "Test2::V0" => "0.000097"; }; on 'configure' => sub { requires "ExtUtils::MakeMaker" => "0"; }; on 'develop' => sub { requires "Test::Pod" => "1.41"; }; META.yml100644001750001750 145315165554207 15772 0ustar00exodistexodist000000000000Getopt-Yath-2.000011--- abstract: 'Option processing yath style.' author: - 'Chad Granum ' build_requires: Test2::V0: '0.000097' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.037, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Getopt-Yath requires: Carp: '0' Cpanel::JSON::XS: '0' Importer: '0.024' Term::Table: '0.028' parent: '0' perl: '5.012000' resources: bugtracker: https://github.com/Test-More/Getopt-Yath/issues repository: https://github.com/Test-More/Getopt-Yath/ version: '2.000011' x_generated_by_perl: v5.42.2 x_serialization_backend: 'YAML::Tiny version 1.76' x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later' META.json100644001750001750 265515165554207 16147 0ustar00exodistexodist000000000000Getopt-Yath-2.000011{ "abstract" : "Option processing yath style.", "author" : [ "Chad Granum " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.037, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Getopt-Yath", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "develop" : { "requires" : { "Test::Pod" : "1.41" } }, "runtime" : { "requires" : { "Carp" : "0", "Cpanel::JSON::XS" : "0", "Importer" : "0.024", "Term::Table" : "0.028", "parent" : "0", "perl" : "5.012000" } }, "test" : { "requires" : { "Test2::V0" : "0.000097" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/Test-More/Getopt-Yath/issues" }, "repository" : { "type" : "git", "url" : "https://github.com/Test-More/Getopt-Yath/" } }, "version" : "2.000011", "x_generated_by_perl" : "v5.42.2", "x_serialization_backend" : "Cpanel::JSON::XS version 4.40", "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later" } README.md100644001750001750 5741615165554207 16032 0ustar00exodistexodist000000000000Getopt-Yath-2.000011# NAME Getopt::Yath - Option processing yath style. # DESCRIPTION This is the getopt processor yath uses. It should work perfectly fine outside of yath as well. # SYNOPSIS ## DEFINING OPTIONS package My::Package; use Getopt::Yath; # Include options from other modules that use Getopt::Yath include_options( 'Some::Options::Package', ..., ); # an option group is basically a way to specify common parameters for all # options defined in the codeblock. option_group {category => 'Human readable category', group => 'settings_group'} => sub { # In addition to the fields specified here, all the fields from the # 'option_group' above are included: option verbose => ( type => 'Bool', # This is a boolean type, it does not take an argument # Optional fields short => 'v', # Allow -v in addition to --verbose default => 0, # What value to use if none is specified (booleans default to 0 anyway) from_env_vars => ['VERBOSE'], # If the $VERBOSE environment variable is set, this will be set to true. set_env_vars => ['VERBOSE'], # If this is set to true it will also set the $VERBOSE environment variable description => "This turns on verbose output", ); option username => ( type => 'Scalar', # Scalar type, requires an argument # Optional short => 'U', # Allow: -U Bob alt => ['user', 'uname'], # Allow: --user Bob, --uname Bob from_env_vars => ['USER'], # Get the value from the $USER env var if it is not provided. default => sub { "bob" . rand(100) }, # If none is specified, and the env var is empty, generate a default. description => "This sets your username", ); # Other options ... }; ## PARSING OPTIONS my $parsed = parse_options( ['-v', '--user', 'fred', 'not_an_opt', '--', '--will-not-process'], # Normally you might pass in \@ARGV skip_non_opts => 1, # Skip non-opts, that is any argument that does not start with a '-' it will just skip. stops => ['--'], # Stop processing no_set_env => 1, # Do not actually change %ENV groups => { ':{' => '}:' }, # Arguments between the :{ and }: will be captured into an arrayref, they can be used as option values, or stand-alone ); `$parsed` is a [Getopt::Yath::State](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AState) object: $parsed->cleared; # {} - Options that were cleared with --no-opt $parsed->skipped; # ['not_an_opt'] - Skipped non options $parsed->settings; # Blessed as Getopt::Yath::Settings # ->settings_group (Blessed as Getopt::Yath::Settings::Group) # ->verbose == 1 # ->username == 'fred' $parsed->stop; # '--' - We stopped at '--', if there was no '--' this would be undef $parsed->remains; # ['--will-not-process'] - Stuff after the '--' that we did not process $parsed->modules; # {'My::Package' => 2} - Any module that provided options that were seen $parsed->env; # {'VERBOSE' => 1} - Environment variables that would have been set ## GENERATING COMMAND LINE HELP OUTPUT: sub help { print options()->docs('cli'); } help(); Produces: Human readable category --username ARG, --username=ARG, --user ARG, --user=ARG, --uname ARG --uname=ARG, -U ARG, -U=ARG, --no-username This sets your username Can also be set with the following environment variables: USER --verbose, -v, --no-verbose This turns on verbose output Can also be set with the following environment variables: VERBOSE The following environment variables will be set after arguments are processed: VERBOSE ## GENERATING POD: sub pod { print options()->docs('pod', head => 2); # The '2' specifies what heading level to use } pod(); Produces: =head2 Human readable category =over 4 =item --username ARG =item --username=ARG =item --user ARG =item --user=ARG =item --uname ARG =item --uname=ARG =item -U ARG =item -U=ARG =item --no-username This sets your username Can also be set with the following environment variables: C =item --verbose =item -v =item --no-verbose This turns on verbose output Can also be set with the following environment variables: C The following environment variables will be set after arguments are processed: C =back # EXPORTS - $opts = options() This will return an [Getopt::Yath::Instance](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AInstance) object. This object holds all the defined options, and does all the real work under the hood. - $parsed = parse\_options(\\@ARGV) - $parsed = parse\_options(\\@ARGV, %PARAMS) This processes an arrayref of command line arguments and returns a [Getopt::Yath::State](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AState) object. If there is a problem parsing, such as invalid options in the array, exceptions will be thrown. See [Getopt::Yath::State](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AState) for the full list of accessors on the returned object. Available parameters that affect parsing are: - stops => \\@STOP\_LIST - stops => \['--'\] This is a list of string that if encountered should stop the parsing process. The string encountered will be available via `$parsed->stop`. Any unparsed arguments after the stop will be available via `$parsed->remains`. This is mostly useful for supporting the `--` option. - groups => \\%GROUP\_BORDERS - groups => { ':{' => '}:' } Arguments between the specified start and end tokens will be grouped together into an arrayref. - stop\_at\_non\_opts => BOOL This will cause parsing to stop at any non-option. A non-option in this case is any argument that does not start with a `-`. The item stopped at will be available via `$parsed->stop` with the remaining arguments available via `$parsed->remains`. - skip\_non\_opts => BOOL This will skip any non-option encountered. A non-option is any argument that does not start with `-`. All skipped items will be available via `$parsed->skipped`. - skip\_invalid\_opts => BOOL This will skip any invalid option encountered. This includes any argument that starts with `-` but is not a valid option. All skipped items will be available via `$parsed->skipped`. - stop\_at\_invalid\_opts => BOOL This will cause parsing to stop at any invalid option. This includes any argument that starts with `-` but is not a valid option. The item stopped at will be available via `$parsed->stop` with the remaining arguments available via `$parsed->remains`. - no\_set\_env => BOOL Set this to true to prevent any modifications to `%ENV`. `$parsed->env` will contain the environment variable changes that would have been made. **Note:** The env accessor is always populated even if `%ENV` is modified directly. - include\_options('Options::Module::A', 'Options::Module::B', ...) This allows you to build libraries of `Getopt::Yath` options and include them as needed. Options from the specified libraries will be merged into the current packages options. - option\_group \\%fields => sub { ... } - option\_group {group => 'my\_group'} => sub { option ...; ... } Create a group of options with common parameters. - option TITLE => \\%SPECIFICATION - option TITLE => (type => '+My::Type', ...) - option TITLE => (type => 'Getopt::Yath::Option::Type', ...) - option TITLE => (type => 'Type', ...) This is used to define a single option. You must specify an option NAME and 'type', which must be a valid [Getopt::Yath::Option](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AOption) subclass. The TITLE is used to produce default values for the 'field' and 'name' fields, both of which can be specified directly if the automatic values are not sufficient. 'field' gets the value of title with dashes replaced by underscores. 'name' gets the value of title with underscores replaced with dashes. Most of the time you can just list the type as the part after the last `::` in `Getopt::Yath::Option::TYPE`. You can also specify `Getopt::Yath::Option::TYPE` or `Getopt::Yath::Option::TYPE::SubType` directly. However if you need to use a module that is not in the `Getopt::Yath::Option::` namespace you will need to prefix the module with a `+` to indicate that. - option\_post\_process sub { ... } - option\_post\_process $weight, sub { ... } - option\_post\_process $weight, $applicable, sub { ... } Register a callback to run after all options have been parsed. The callback receives the [Getopt::Yath::Instance](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AInstance) object and the parse state hashref as arguments. `$weight` controls execution order (lower weights run first, default is 0). `$applicable` is an optional coderef that determines whether this post-processor should run; if provided it receives the post-process entry, the instance, and the settings object. If used inside an `option_group` block, the group's `applicable` is inherited when none is specified. option_post_process 100 => sub { my ($instance, $state) = @_; # Do something after all options are parsed }; - category\_sort\_map(%map) Set the sort order for option categories in documentation output. Categories with lower values are listed first. By default, "NO CATEGORY - FIX ME" is sorted to 99999 (last). category_sort_map( 'Display Options' => 1, 'Runner Options' => 2, 'Logging Options' => 3, ); # OPTION TYPES AND SPECIFICATIONS ## REQUIRED WITH NO DEFAULTS - title This is the first argument to `option()`. It is used to build the default values for both `field` and `name`. - group => "group\_name" Name of the field to use in the options hash under which the option will be listed: `$parsed->{options}->{$group}->{$field_name} = $val` - type => 'TypeName' - type => 'Getopt::Yath::Option::TypeName' - type => '+My::Custom::Type' This must be a valid [Getopt::Yath::Option](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AOption) subclass: - Scalar Takes a scalar value. A value is required. Can be used as `--opt VAL` or `--opt=val`. `--no-opt` can be used to clear the value. - Bool Is either on or off. `--opt` will turn it on. `--no-opt` will turn it off. Default is off unless the `default` is parameter is provided. - Count Is an integer value, default is to start at `0`. `--opt` increments the counter. `--no-opt` resets the counter. `--opt=VAL` can be used to specify a desired count. - List Can take multiple values. `--opt VAL` appends a value to the list. `--no-opt` will empty the list. If a `split_on` parameter is provided then a single use can set multiple values. For example if `split_on` is set to `,` then `--opt foo,bar` is provided, then `foo` and `bar` will both be added to the list. - Map Expects all values to be `key=value` pairs and produces a hashref. `--opt foo=bar` will set `$h{foo} = 'bar'`. If a `split_on` parameter is provided then a single use can set multiple values. For example if `split_on` is set to `,` then `--opt foo=bar,baz=bat` is provided, then the result will have `$h{foo} = 'bar'; $h{baz} = 'bat'`. - Auto This type has an 'autofill' value that is used if no argument is provided to the parameter, IE `--opt`. But can also be given a specific value using `--opt=val`. It **DOES NOT** support `--opt VAL` which will most likely result in an exception. - AutoList This is a combination of 'Auto' and 'List' types. The no-arg form `--opt` will add the default values(s) to the list. The `--opt=VAL` form will add additional values. - AutoMap This is a combination of 'Auto' and 'Map' types. The no-arg form `--opt` will add the default key+value pairs to the hash. The `--opt=KEY=VAL` form will add additional values. - PathList Like [List](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AOption%3A%3AList), but values are treated as file paths and may contain shell-style wildcards (globs) which are expanded. For example, `--opt 'lib/*.pm'` will expand to all matching files. - AutoPathList Like [PathList](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AOption%3A%3APathList) with autofill support. The no-arg form `--opt` adds the autofill paths, while `--opt=path` adds a specific path. - BoolMap Match several `--OPTION-XXX` and `--no-OPTION-XXX` options based on a regex pattern, populating a hashref where each matched key is given a true or false value depending on the `--no-` prefix. Requires a `pattern` attribute. ## REQUIRED WITH SANE DEFAULTS - field => "field\_name" Name of the field to use in the group hash for the result of parsing arguments. `$parsed->{options}->{$group}->{$field_name} = $val` Default is to take the `title` value and replace any dashes with underscores. - name => "option-name" Primary name for the option `--option-name`. Default is to take the `title` value and replace any underscores with dashes. - trace => \[$caller, $file, $line\] This normally resolves to the place `option()` was called. You can manually override it with a custom value, but you should rarely ever need to. - category => "Human Readable documentation category" When producing POD or command line documentation, options are put into "categories" which should be the human readable version of the `group` field. Default is "NO CATEGORY - FIX ME". - description => "Explanation of what the option controls" Document what the option controls or does. Default is 'NO DESCRIPTION - FIX ME'. ## OPTIONAL - short => 's' Specify a short flag to use. This is how you provide single-dash single-letter options. - `-s` If no argument is required this form is available. - `-s=VAL` If an argument is allowed this form is available - `-sVAL` If an argument is allowed, and this form is not directly disabled by the type (Types can override `allows_shortval()` to return false to forbid this form. Currently [Getopt::Yath::Option::Bool](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AOption%3A%3ABool) and [Getopt::Yath::Option::Count](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AOption%3A%3ACount) disable this form. - `-sss` So far only the [Getopt::Yath::Option::Count](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AOption%3A%3ACount) type makes use of this. It allows you to add the flag multiple times after a single dash to increment the count. - alt => \\@LIST - alt => \['alt1', 'alt2'\] Specify alternate or alias names that can be used to set or toggle a field. `--alt1` `--alt2 foo` - prefix => "a-prefix" Specify a prefix to attach to the name, and to any alternate names. This is mainly useful when specifying an option group: option_group {prefix => 'foo'} => sub { option bar => ( type => "Bool", ); }; This would then be used as `--foo-bar` - module => 'My::Module' Specify the module the argument should be associated with. This defaults to the caller, so usually you do not need to specify it. This is mainly used in the case of plugins we only want to load if the option is used. - no\_module => BOOL Default is 0. When this is set to true the module name is not used. - applicable => sub { my $options = shift; ... ? 1 : 0 } This can be used to dynamically show/hide options. When this returns false the option will not be available. - initialize => $scalar - initialize => sub { ... } Initialize the value to this before any arguments are parsed. This is mainly used so that [Getopt::Yath::Option::Map](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AOption%3A%3AMap) can start with an empty hash, and [Getopt::Yath::Option::List](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AOption%3A%3AList) can be initialized to an empty arrayref. This can be a simple scalar (string or number, not a reference), or it may be a codeblock that returns anything you want. Only 1 item should be returned, extra values will result in undefined behavior. For a map this should return an empty hashref, for a list it should return an empty arrayref. - clear => $scalar - clear => sub { ... } Similar to `initialize`, but this is used when clearing the value. For things like 'Map' this should return a hashref, etc. - default => $scalar - default => sub { ... } Set a default to use if no value is provided at the command line. This can be a simple scalar (string or number, not a reference), or it may be a codeblock that returns anything you want. Most options will only accept a single default value. [Getopt::Yath::Option::Map](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AOption%3A%3AMap) and [Getopt::Yath::Option::List](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AOption%3A%3AList) support a list of defaults for setting key/value pairs, or adding items to an array. These are valid for anything: default => 'foo', default => 123, default => sub { "hi" } This is valid for an [Getopt::Yath::Option::Map](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AOption%3A%3AMap): default => sub { return ('foo' => 'bar') } This is valid for a [Getopt::Yath::Option::List](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AOption%3A%3AList): default => sub { return (1, 2, 3, 4) } - autofill => $scalar - autofill => sub { ... } This is used for [Getopt::Yath::Option::Auto](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AOption%3A%3AAuto) and similar. This is the value used if the command line option is provided, but no value is provided with it. This can be a simple scalar (string or number, not a reference), or it may be a codeblock that returns anything you want. Most options will only accept a single autofill value. [Getopt::Yath::Option::Map](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AOption%3A%3AMap) and [Getopt::Yath::Option::List](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AOption%3A%3AList) support a list of autofill data for setting key/value pairs, or adding items to an array. These are valid for anything: autofill => 'foo', autofill => 123, autofill => sub { "hi" } This is valid for an [Getopt::Yath::Option::Map](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AOption%3A%3AMap): autofill => sub { return ('foo' => 'bar') } This is valid for a [Getopt::Yath::Option::List](https://metacpan.org/pod/Getopt%3A%3AYath%3A%3AOption%3A%3AList): autofill => sub { return (1, 2, 3, 4) } - normalize => sub { my ($input) = @\_; ...; return $output } If you wish to normalize or transform a value then you use this hook. The sub will get the option and the input value as its arguments. You should return the new value to set, or the input value if it does not need to change. - trigger => sub { my ($opt, %params) = @\_; ... } This will be called any time the option is parsed from the command line, or whenever the command line clears the option. **NOTE:** It will not run when initial, autofill, or default values are set. The `%params` passed into the sub look like this: ( # If this trigger is called because the value is cleared via --no-OPT: action => 'clear', val => undef, # If a value is set because of --opt being parsed: action => 'set', val => [...], ref => $ref, state => $state, options => $self, settings => $settings, group => $group, ); Note that val is always passed in as an arrayref. For simple scalar type options this will only ever have 1 value. For list or map types it may have multiple values, also note that for such types the trigger will only see the newly added values in the 'val' arrayref, not the values already included, which is important as list and map types can be built over several assignments. - from\_env\_vars => \\@LIST A list of environment variables that will be used to populate the option's initial value. These will be checked in order, the first one that is set is the one that will be used, others will not be checked once a value is found. This will prevent the default value from being used, but using the option on the command line will override it. **Note:** that an environment variable can be prefixed with a `!` to indicate the value should be boolean-inverted. This means that an option like `quiet` can have `from_env_vars => ['!VERBOSE']` to be set to true when the VERBOSE env var is false. This also works when setting a variable, so you could have `set_env_vars => ['!VERBOSE']`. - clear\_env\_vars => \\@LIST A list of environment variables to clear after the options are all populated. This is useful if you want to use an env var to set an option, but want to make sure no child processes see the environment variable. - set\_env\_vars => \\@LIST A list of environment variables that will be set to the value of this option (if it is set) when argument processing is complete. **Note:** This is only supported in types that have a single value, maps and lists are not supported. **Note:** that an environment variable can be prefixed with a `!` to indicate the value should be boolean-inverted. This means that an option like `quiet` can have `from_env_vars => ['!VERBOSE']` to be set to true when the VERBOSE env var is false. This also works when setting a variable, so you could have `set_env_vars => ['!VERBOSE']`. - short\_examples => \\@LIST - short\_examples => \['', 'ARG', '=ARG'\] - short\_examples => \[' ARG', '=ARG'\] Override the default list of arguments when generating docs. This is used for the short form (single dash followed by a single letter and then a value `-Ilib`, `-I lib`, `-I=lib`, `-v`, `-vv`, `-vvv...`) documentation. - long\_examples => \\@LIST - long\_examples => \['', '=ARG'\] - long\_examples => \[' ARG', '=ARG'\] Override the default list of arguments when generating docs. This is used for the long form (double-dash and option name and then a value `--include`, `--include=lib`, `--include lib`) documentation. # SOURCE The source code repository for Getopt-Yath can be found at [http://github.com/Test-More/Getopt-Yath/](http://github.com/Test-More/Getopt-Yath/). # MAINTAINERS - Chad Granum # AUTHORS - Chad Granum # COPYRIGHT Copyright Chad Granum . This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See [http://dev.perl.org/licenses/](http://dev.perl.org/licenses/) option.t100644001750001750 4623315165554207 16506 0ustar00exodistexodist000000000000Getopt-Yath-2.000011/tuse Test2::V0; use Getopt::Yath::Option; subtest 'create factory' => sub { my $opt = Getopt::Yath::Option->create( type => 'Bool', title => 'test-opt', group => 'testing', no_module => 1, trace => [__PACKAGE__, __FILE__, __LINE__], description => 'a test option', ); isa_ok($opt, 'Getopt::Yath::Option::Bool'); is($opt->title, 'test-opt', 'title set'); is($opt->field, 'test_opt', 'field derived from title (dashes to underscores)'); is($opt->name, 'test-opt', 'name derived from title (underscores to dashes)'); is($opt->group, 'testing', 'group set'); }; subtest 'create requires type' => sub { like( dies { Getopt::Yath::Option->create(title => 'x', group => 'g', no_module => 1, trace => [caller]) }, qr/No 'type' specified/, 'create dies without type', ); }; subtest 'create cannot be called on subclass' => sub { like( dies { Getopt::Yath::Option::Bool->create(type => 'Bool', title => 'x', group => 'g', no_module => 1, trace => [caller]) }, qr/create\(\) cannot be called on an option subclass/, 'create dies on subclass', ); }; subtest 'trace_string' => sub { my $opt = Getopt::Yath::Option->create( type => 'Scalar', title => 'ts', group => 'g', no_module => 1, trace => ['main', 'myfile.pl', 42], ); is($opt->trace_string, 'myfile.pl line 42', 'trace_string formatted correctly'); my $opt2 = Getopt::Yath::Option->create( type => 'Scalar', title => 'ts2', group => 'g', no_module => 1, trace => ['main', 'other.pl', 99], ); $opt2->{trace} = undef; is($opt2->trace_string, '[UNKNOWN]', 'trace_string with no trace'); }; subtest 'forms' => sub { my $opt = Getopt::Yath::Option->create( type => 'Scalar', title => 'my-val', group => 'g', no_module => 1, trace => [caller], short => 'V', alt => ['val'], ); my $forms = $opt->forms; is($forms->{'--my-val'}, 1, '--name is positive'); is($forms->{'--no-my-val'}, -1, '--no-name is negative'); is($forms->{'--val'}, 1, '--alt is positive'); is($forms->{'--no-val'}, -1, '--no-alt is negative'); is($forms->{'-V'}, 1, '-short is positive'); }; subtest 'forms with prefix' => sub { my $opt = Getopt::Yath::Option->create( type => 'Bool', title => 'verbose', group => 'g', no_module => 1, trace => [caller], prefix => 'runner', ); my $forms = $opt->forms; ok($forms->{'--runner-verbose'}, 'prefixed positive form'); ok($forms->{'--no-runner-verbose'}, 'prefixed negative form'); ok(!$forms->{'--verbose'}, 'unprefixed form not present'); }; subtest 'forms with alt_no' => sub { my $opt = Getopt::Yath::Option->create( type => 'Bool', title => 'color', group => 'g', no_module => 1, trace => [caller], alt_no => ['no-colour'], ); my $forms = $opt->forms; is($forms->{'--no-colour'}, -1, 'alt_no form is negative'); is($forms->{'--color'}, 1, 'primary form is positive'); }; subtest 'is_applicable' => sub { my $opt = Getopt::Yath::Option->create( type => 'Bool', title => 'cond', group => 'g', no_module => 1, trace => [caller], applicable => sub { 0 }, ); ok(!$opt->is_applicable(undef, undef), 'applicable returns false'); my $opt2 = Getopt::Yath::Option->create( type => 'Bool', title => 'always', group => 'g', no_module => 1, trace => [caller], ); ok($opt2->is_applicable(undef, undef), 'no applicable callback means always applicable'); }; subtest 'normalize_value' => sub { my $opt = Getopt::Yath::Option->create( type => 'Scalar', title => 'norm', group => 'g', no_module => 1, trace => [caller], normalize => sub { uc $_[0] }, ); is(($opt->normalize_value('hello'))[0], 'HELLO', 'normalize callback applied'); my $opt2 = Getopt::Yath::Option->create( type => 'Scalar', title => 'no-norm', group => 'g', no_module => 1, trace => [caller], ); is(($opt2->normalize_value('hello'))[0], 'hello', 'no normalize is passthrough'); }; subtest 'check_value with arrayref allowed_values' => sub { my $opt = Getopt::Yath::Option->create( type => 'Scalar', title => 'av', group => 'g', no_module => 1, trace => [caller], allowed_values => ['red', 'green', 'blue'], ); my @bad = $opt->check_value(['red']); is(\@bad, [], 'valid value passes'); @bad = $opt->check_value(['purple']); is(\@bad, ['purple'], 'invalid value returned'); @bad = $opt->check_value(['red', 'purple', 'orange']); is(\@bad, ['purple', 'orange'], 'multiple invalid values returned'); }; subtest 'check_value with regex allowed_values' => sub { my $opt = Getopt::Yath::Option->create( type => 'Scalar', title => 'avr', group => 'g', no_module => 1, trace => [caller], allowed_values => qr/^\d+$/, ); my @bad = $opt->check_value(['123']); is(\@bad, [], 'numeric value passes regex'); @bad = $opt->check_value(['abc']); is(\@bad, ['abc'], 'non-numeric value fails regex'); }; subtest 'check_value with coderef allowed_values' => sub { my $opt = Getopt::Yath::Option->create( type => 'Scalar', title => 'avc', group => 'g', no_module => 1, trace => [caller], allowed_values => sub { $_[1] > 0 }, ); my @bad = $opt->check_value([5]); is(\@bad, [], 'positive value passes code check'); @bad = $opt->check_value([-1]); is(\@bad, [-1], 'negative value fails code check'); }; subtest 'check_value with no allowed_values' => sub { my $opt = Getopt::Yath::Option->create( type => 'Scalar', title => 'avn', group => 'g', no_module => 1, trace => [caller], ); my @bad = $opt->check_value(['anything']); is(\@bad, [], 'no allowed_values means everything passes'); }; subtest 'trigger' => sub { my @calls; my $opt = Getopt::Yath::Option->create( type => 'Bool', title => 'trig', group => 'g', no_module => 1, trace => [caller], trigger => sub { push @calls, {@_[1..$#_]} }, ); $opt->trigger(action => 'set', val => 1); is(scalar @calls, 1, 'trigger called once'); is($calls[0]->{action}, 'set', 'trigger received action'); }; subtest 'long_args' => sub { my $opt = Getopt::Yath::Option->create( type => 'Scalar', title => 'main-arg', group => 'g', no_module => 1, trace => [caller], alt => ['alias-one', 'alias-two'], ); is([$opt->long_args], ['main-arg', 'alias-one', 'alias-two'], 'long_args returns name + alts'); }; subtest 'init validation' => sub { like( dies { Getopt::Yath::Option->create( type => 'Bool', group => 'g', trace => [caller], no_module => 1, # no title, field, or name ) }, qr/You must specify 'title' or both 'field' and 'name'/, 'dies without title or field+name', ); like( dies { Getopt::Yath::Option->create( type => 'Bool', title => 'x', trace => [caller], # no module and no no_module ) }, qr/You must provide either 'module'/, 'dies without module or no_module', ); like( dies { Getopt::Yath::Option->create( type => 'Bool', title => 'x', # no group trace => [caller], no_module => 1, ) }, qr/The 'group' attribute is required/, 'dies without group', ); }; subtest 'alt with underscore rejected' => sub { like( dies { Getopt::Yath::Option->create( type => 'Bool', title => 'x', group => 'g', no_module => 1, trace => [caller], alt => ['bad_alt'], ) }, qr/alt option form 'bad_alt' contains an underscore/, 'underscore in alt rejected', ); ok( lives { Getopt::Yath::Option->create( type => 'Bool', title => 'x2', group => 'g', no_module => 1, trace => [caller], alt => ['ok_alt'], allow_underscore_in_alt => 1, ) }, 'underscore allowed when allow_underscore_in_alt is set', ); }; subtest 'title to field and name conversion' => sub { my $opt = Getopt::Yath::Option->create( type => 'Scalar', title => 'my-dashed-title', group => 'g', no_module => 1, trace => [caller], ); is($opt->field, 'my_dashed_title', 'dashes in title become underscores in field'); is($opt->name, 'my-dashed-title', 'name keeps dashes'); my $opt2 = Getopt::Yath::Option->create( type => 'Scalar', title => 'my_under_title', group => 'g', no_module => 1, trace => [caller], ); is($opt2->field, 'my_under_title', 'field keeps underscores'); is($opt2->name, 'my-under-title', 'underscores in title become dashes in name'); }; subtest 'explicit field and name override title' => sub { my $opt = Getopt::Yath::Option->create( type => 'Bool', title => 'orig', field => 'custom_field', name => 'custom-name', group => 'g', no_module => 1, trace => [caller], ); is($opt->field, 'custom_field', 'explicit field used'); is($opt->name, 'custom-name', 'explicit name used'); }; subtest 'field and name without title' => sub { my $opt = Getopt::Yath::Option->create( type => 'Bool', field => 'my_field', name => 'my-name', group => 'g', no_module => 1, trace => [caller], ); is($opt->field, 'my_field', 'field set directly'); is($opt->name, 'my-name', 'name set directly'); }; subtest 'set_env_vars on non-env type' => sub { like( dies { Getopt::Yath::Option->create( type => 'List', title => 'sev', group => 'g', no_module => 1, trace => [caller], set_env_vars => ['FOO'], ) }, qr/'set_env_vars' is not supported/, 'set_env_vars on type where can_set_env is false', ); }; subtest 'autofill not allowed on wrong type' => sub { like( dies { Getopt::Yath::Option->create( type => 'Scalar', title => 'af', group => 'g', no_module => 1, trace => [caller], autofill => 'x', ) }, qr/'autofill' is not allowed/, 'autofill rejected on Scalar type', ); }; subtest 'default not allowed on Count type' => sub { like( dies { Getopt::Yath::Option->create( type => 'Count', title => 'df', group => 'g', no_module => 1, trace => [caller], default => 5, ) }, qr/'default' is not allowed/, 'default rejected on Count type', ); }; subtest 'invalid attribute key' => sub { like( dies { Getopt::Yath::Option->create( type => 'Bool', title => 'iak', group => 'g', no_module => 1, trace => [caller], bogus_nonsense => 42, ) }, qr/'bogus_nonsense' is not a valid option attribute/, 'invalid attribute key in constructor', ); }; subtest 'alt must be arrayref' => sub { like( dies { Getopt::Yath::Option->create( type => 'Bool', title => 'aa', group => 'g', no_module => 1, trace => [caller], alt => 'not-an-array', ) }, qr/The 'alt' attribute must be an array-ref/, 'alt as string rejected', ); }; subtest 'alt_no must be arrayref' => sub { like( dies { Getopt::Yath::Option->create( type => 'Bool', title => 'ano', group => 'g', no_module => 1, trace => [caller], alt_no => 'not-an-array', ) }, qr/The 'alt_no' attribute must be an array-ref/, 'alt_no as string rejected', ); }; subtest 'non-CODE ref in default rejected' => sub { like( dies { Getopt::Yath::Option->create( type => 'Bool', title => 'ncr', group => 'g', no_module => 1, trace => [caller], default => [1, 2], ) }, qr/'default' must be a simple scalar, or a coderef/, 'arrayref default rejected', ); }; subtest 'non-CODE ref in normalize rejected' => sub { like( dies { Getopt::Yath::Option->create( type => 'Scalar', title => 'ncn', group => 'g', no_module => 1, trace => [caller], normalize => 'not a code ref', ) }, qr/'normalize' must be undef, or a coderef/, 'string normalize rejected', ); }; subtest 'clear_field' => sub { my $opt = Getopt::Yath::Option->create( type => 'Bool', title => 'clf', group => 'g', no_module => 1, trace => [caller], ); my $val = 1; $opt->clear_field(\$val); is($val, 0, 'Bool clear_field sets to 0'); }; subtest 'get_initial_value from env' => sub { my $opt = Getopt::Yath::Option->create( type => 'Scalar', title => 'giv', group => 'g', no_module => 1, trace => [caller], from_env_vars => ['GETOPT_TEST_INIT_A', 'GETOPT_TEST_INIT_B'], ); delete local $ENV{GETOPT_TEST_INIT_A}; local $ENV{GETOPT_TEST_INIT_B} = 'from_b'; is($opt->get_initial_value(), 'from_b', 'skips unset env, uses first set'); local $ENV{GETOPT_TEST_INIT_A} = 'from_a'; is($opt->get_initial_value(), 'from_a', 'uses first set env var'); }; subtest 'get_initial_value negated env' => sub { my $opt = Getopt::Yath::Option->create( type => 'Scalar', title => 'gine', group => 'g', no_module => 1, trace => [caller], from_env_vars => ['!GETOPT_TEST_NEG'], ); local $ENV{GETOPT_TEST_NEG} = 1; is($opt->get_initial_value(), 0, 'negated env: truthy becomes 0'); local $ENV{GETOPT_TEST_NEG} = 0; is($opt->get_initial_value(), 1, 'negated env: falsy becomes 1'); }; subtest 'get_default_value and get_autofill_value' => sub { my $opt = Getopt::Yath::Option->create( type => 'Auto', title => 'gdv', group => 'g', no_module => 1, trace => [caller], default => 'def_val', autofill => 'auto_val', ); is(($opt->get_default_value())[0], 'def_val', 'get_default_value returns default'); is(($opt->get_autofill_value())[0], 'auto_val', 'get_autofill_value returns autofill'); }; subtest 'get_default_value with coderef' => sub { my $opt = Getopt::Yath::Option->create( type => 'Bool', title => 'gdvc', group => 'g', no_module => 1, trace => [caller], default => sub { 1 }, ); is(($opt->get_default_value())[0], 1, 'coderef default evaluated'); }; subtest 'forms caching' => sub { my $opt = Getopt::Yath::Option->create( type => 'Bool', title => 'fc', group => 'g', no_module => 1, trace => [caller], ); my $f1 = $opt->forms; my $f2 = $opt->forms; ok($f1 == $f2, 'forms returns cached result (same ref)'); }; subtest 'doc_forms' => sub { my $opt = Getopt::Yath::Option->create( type => 'Scalar', title => 'docf', group => 'g', no_module => 1, trace => [caller], short => 'd', alt => ['doc-alias'], alt_no => ['no-doc-alias'], ); my ($forms, $no_forms) = $opt->doc_forms; ok(scalar @$forms > 0, 'doc_forms returns positive forms'); ok((grep { /--docf / } @$forms), 'primary name in forms'); ok((grep { /--doc-alias / } @$forms), 'alt name in forms'); ok((grep { /-d/ } @$forms), 'short flag in forms'); ok((grep { /--no-docf/ } @$no_forms), 'no-name in no_forms'); ok((grep { /--no-doc-alias/ } @$no_forms), 'alt_no in no_forms'); }; subtest 'module from trace when not explicitly set' => sub { # When module is not provided but no_module is also not set, # init requires module or no_module. The module is normally set # by option_group. Here we set it through the init flow. my $opt = Getopt::Yath::Option->create( type => 'Bool', title => 'mdt', group => 'g', module => 'Explicit::Module', trace => ['Some::Caller', 'file.pl', 1], ); is($opt->module, 'Explicit::Module', 'explicit module takes precedence'); # When no module is provided, no_module must be set my $opt2 = Getopt::Yath::Option->create( type => 'Bool', title => 'mdt2', group => 'g', no_module => 1, trace => ['Some::Caller', 'file.pl', 1], ); ok($opt2->no_module, 'no_module flag is set'); }; subtest 'check_value undef passes' => sub { my $opt = Getopt::Yath::Option->create( type => 'Scalar', title => 'cvu', group => 'g', no_module => 1, trace => [caller], allowed_values => ['a'], ); my @bad = $opt->check_value(undef); is(\@bad, [], 'check_value with undef input returns empty'); }; done_testing; parsing.t100644001750001750 3675415165554207 16650 0ustar00exodistexodist000000000000Getopt-Yath-2.000011/tuse Test2::V0; subtest 'stop_at_non_opts' => sub { package StopNonOpt; use Getopt::Yath; option_group {category => 'Stop', group => 'stop', no_module => 1} => sub { option verbose => ( type => 'Bool', short => 'v', description => 'Be verbose', ); }; package main; my $res = StopNonOpt::parse_options(['-v', 'somefile.txt', '--verbose'], stop_at_non_opts => 1); is($res->settings->{stop}->{verbose}, 1, 'options before stop parsed'); is($res->stop, 'somefile.txt', 'stopped at non-option'); is($res->remains, ['--verbose'], 'remaining args preserved'); }; subtest 'stop_at_invalid_opts' => sub { package StopInvalid; use Getopt::Yath; option_group {category => 'Stop2', group => 'stop2', no_module => 1} => sub { option debug => ( type => 'Bool', description => 'Debug mode', ); }; package main; my $res = StopInvalid::parse_options(['--debug', '--unknown-flag', '--debug'], stop_at_invalid_opts => 1); is($res->settings->{stop2}->{debug}, 1, 'valid option parsed before stop'); is($res->stop, '--unknown-flag', 'stopped at invalid option'); is($res->remains, ['--debug'], 'remaining args preserved'); }; subtest 'skip_non_opts' => sub { package SkipNonOpt; use Getopt::Yath; option_group {category => 'Skip', group => 'skip', no_module => 1} => sub { option active => ( type => 'Bool', description => 'Active', ); }; package main; my $res = SkipNonOpt::parse_options(['file1.txt', '--active', 'file2.txt'], skip_non_opts => 1); is($res->settings->{skip}->{active}, 1, 'option parsed'); is($res->skipped, ['file1.txt', 'file2.txt'], 'non-opts collected in skipped'); }; subtest 'groups :{ }:' => sub { package GroupParse; use Getopt::Yath; option_group {category => 'Groups', group => 'grp', no_module => 1} => sub { option items => ( type => 'List', description => 'Item list', ); }; package main; my $res = GroupParse::parse_options( ['--items', ':{', 'a', 'b', 'c', '}:'], groups => {':{' => '}:'}, ); is($res->settings->{grp}->{items}, [qw/a b c/], 'group tokens collect into arrayref'); }; subtest 'groups unmatched end token' => sub { package GroupUnmatched; use Getopt::Yath; option_group {category => 'GU', group => 'gu', no_module => 1} => sub { option x => (type => 'List', description => 'x'); }; package main; like( dies { GroupUnmatched::parse_options(['--x', ':{', 'a', 'b'], groups => {':{' => '}:'}) }, qr/Could not find end token/, 'dies when group end token is missing', ); }; subtest 'standalone groups go to skipped' => sub { package StandaloneGroup; use Getopt::Yath; option_group {category => 'SG', group => 'sg', no_module => 1} => sub { option flag => (type => 'Bool', description => 'flag'); }; package main; my $res = StandaloneGroup::parse_options( [':{', 'hello', 'world', '}:', '--flag'], groups => {':{' => '}:'}, skip_non_opts => 1, ); is($res->settings->{sg}->{flag}, 1, 'flag parsed'); # Standalone group contents are collected as an arrayref in skipped is($res->skipped, [['hello', 'world']], 'standalone group contents go to skipped as arrayref'); }; subtest 'arg=val empty value' => sub { package ArgValTest; use Getopt::Yath; option_group {category => 'AV', group => 'av', no_module => 1} => sub { option thing => (type => 'Scalar', description => 'A thing'); }; package main; # --thing= with empty string is valid and sets to empty string my $res = ArgValTest::parse_options(['--thing=']); is($res->settings->{av}->{thing}, '', '--opt= sets empty string value'); }; subtest 'prefix on option_group' => sub { package PrefixTest; use Getopt::Yath; option_group {category => 'Prefixed', group => 'pfx', prefix => 'runner', no_module => 1} => sub { option timeout => ( type => 'Scalar', description => 'Timeout value', ); }; package main; my $res = PrefixTest::parse_options(['--runner-timeout', '30']); is($res->settings->{pfx}->{timeout}, '30', 'prefix + option name works'); like( dies { PrefixTest::parse_options(['--timeout', '30']) }, qr/is not a valid option/, 'unprefixed form is not valid', ); }; subtest 'include_options' => sub { BEGIN { $INC{'IncludeSource.pm'} = __FILE__ } package IncludeSource; use Getopt::Yath; option_group {category => 'Source', group => 'src', no_module => 1} => sub { option alpha => (type => 'Bool', description => 'Alpha'); option beta => (type => 'Scalar', description => 'Beta'); }; BEGIN { $INC{'IncludeTarget.pm'} = __FILE__ } package IncludeTarget; use Getopt::Yath; include_options('IncludeSource'); package main; my $res = IncludeTarget::parse_options(['--alpha', '--beta', 'hello']); is($res->settings->{src}->{alpha}, 1, 'included Bool option works'); is($res->settings->{src}->{beta}, 'hello', 'included Scalar option works'); }; subtest 'include_options with filter list' => sub { BEGIN { $INC{'FilterSource.pm'} = __FILE__ } package FilterSource; use Getopt::Yath; option_group {category => 'FS', group => 'fs', no_module => 1} => sub { option one => (type => 'Bool', description => 'One'); option two => (type => 'Bool', description => 'Two'); option three => (type => 'Bool', description => 'Three'); }; BEGIN { $INC{'FilterTarget.pm'} = __FILE__ } package FilterTarget; use Getopt::Yath; include_options('FilterSource', ['one', 'three']); package main; my $res = FilterTarget::parse_options(['--one', '--three']); is($res->settings->{fs}->{one}, 1, 'filtered option "one" included'); is($res->settings->{fs}->{three}, 1, 'filtered option "three" included'); like( dies { FilterTarget::parse_options(['--two']) }, qr/is not a valid option/, 'filtered-out option "two" not available', ); }; subtest 'option_group nesting' => sub { package NestTest; use Getopt::Yath; option_group {category => 'Outer', group => 'nest'} => sub { option_group {no_module => 1} => sub { option inner_opt => ( type => 'Bool', description => 'Inner option', ); }; }; package main; my $res = NestTest::parse_options(['--inner-opt']); is($res->settings->{nest}->{inner_opt}, 1, 'nested option_group inherits outer group'); }; subtest 'invalid_opt_callback' => sub { package InvalidCB; use Getopt::Yath; option_group {category => 'ICB', group => 'icb', no_module => 1} => sub { option ok_opt => (type => 'Bool', description => 'OK'); }; package main; my @captured; like( dies { InvalidCB::parse_options( ['--ok-opt', '--bad-opt'], invalid_opt_callback => sub { push @captured, $_[0]; die "custom: $_[0]\n" }, ) }, qr/custom: --bad-opt/, 'invalid_opt_callback invoked with the bad option', ); is(\@captured, ['--bad-opt'], 'callback received the invalid option'); }; subtest 'multiple stops' => sub { package MultiStop; use Getopt::Yath; option_group {category => 'MS', group => 'ms', no_module => 1} => sub { option mflag => (type => 'Bool', description => 'Flag'); }; package main; my $res = MultiStop::parse_options( ['--mflag', '::', 'remaining'], stops => ['--', '::'], ); is($res->stop, '::', 'stopped at ::'); is($res->remains, ['remaining'], 'remaining captured'); is($res->settings->{ms}->{mflag}, 1, 'flag before stop parsed'); }; subtest 'skip_posts' => sub { package SkipPosts; use Getopt::Yath; my $post_ran = 0; option_group {category => 'SP', group => 'sp', no_module => 1} => sub { option sp_flag => (type => 'Bool', description => 'Flag'); }; option_post_process(sub { $post_ran++ }); package main; $post_ran = 0; SkipPosts::parse_options([], skip_posts => 1); is($post_ran, 0, 'post-processor skipped with skip_posts'); SkipPosts::parse_options([]); ok($post_ran, 'post-processor runs without skip_posts'); }; subtest 'nested groups' => sub { package NestedGroupParse; use Getopt::Yath; option_group {category => 'NG', group => 'ng', no_module => 1} => sub { option nlist => (type => 'List', description => 'Nested list'); }; package main; my $res = NestedGroupParse::parse_options( ['--nlist', ':{', 'a', ':{', 'inner1', 'inner2', '}:', 'b', '}:'], groups => {':{' => '}:'}, ); is( $res->settings->{ng}->{nlist}, ['a', ['inner1', 'inner2'], 'b'], 'nested groups produce nested arrayrefs', ); }; subtest 'applicable post-processor' => sub { package ApplicablePost; use Getopt::Yath; my $ran_yes = 0; my $ran_no = 0; option_group {category => 'AP', group => 'ap', no_module => 1} => sub { option ap_flag => (type => 'Bool', description => 'Flag'); }; option_post_process(0, sub { 0 }, sub { $ran_no++ }); option_post_process(0, sub { 1 }, sub { $ran_yes++ }); package main; $ran_yes = 0; $ran_no = 0; ApplicablePost::parse_options([]); is($ran_yes, 1, 'applicable post-processor ran'); is($ran_no, 0, 'inapplicable post-processor skipped'); }; subtest 'process_args requires arrayref' => sub { package ReqArrayRef; use Getopt::Yath; option_group {category => 'RA', group => 'ra', no_module => 1} => sub { option ra_flag => (type => 'Bool', description => 'Flag'); }; package main; like( dies { ReqArrayRef::parse_options('not an arrayref') }, qr/Must provide an argv arrayref/, 'parse_options dies without arrayref', ); }; subtest 'requires_arg with no remaining args' => sub { package ReqArgEmpty; use Getopt::Yath; option_group {category => 'RAE', group => 'rae', no_module => 1} => sub { option need_val => (type => 'Scalar', description => 'Needs a value'); }; package main; like( dies { ReqArgEmpty::parse_options(['--need-val']) }, qr/No argument provided to '--need-val'/, 'dies when requires_arg but no args remain', ); }; subtest 'set=val not allowed on Bool' => sub { package SetValBool; use Getopt::Yath; option_group {category => 'SVB', group => 'svb', no_module => 1} => sub { option svb_flag => (type => 'Bool', description => 'Bool flag'); }; package main; like( dies { SetValBool::parse_options(['--svb-flag=1']) }, qr/Arguments are not allowed for this option type/, 'Bool rejects --flag=val form', ); }; subtest 'option with trigger on clear' => sub { package TriggerClear; use Getopt::Yath; my @trigger_actions; option_group {category => 'TC', group => 'tc', no_module => 1} => sub { option tc_val => ( type => 'Scalar', default => 'x', description => 'Triggerable', trigger => sub { my %p = @_[1..$#_]; push @trigger_actions, $p{action} }, ); }; package main; @trigger_actions = (); TriggerClear::parse_options(['--tc-val', 'hello']); ok((grep { $_ eq 'set' } @trigger_actions), 'trigger fires with set action'); @trigger_actions = (); TriggerClear::parse_options(['--no-tc-val']); ok((grep { $_ eq 'clear' } @trigger_actions), 'trigger fires with clear action'); }; subtest '--no-opt then --opt=val' => sub { package ClearThenSet; use Getopt::Yath; option_group {category => 'CTS', group => 'cts', no_module => 1} => sub { option cts_val => (type => 'Scalar', default => 'orig', description => 'Clear then set'); }; package main; my $res = ClearThenSet::parse_options(['--no-cts-val', '--cts-val=new']); is($res->settings->{cts}->{cts_val}, 'new', 'clear then set gives new value'); ok(!$res->cleared->{cts}->{cts_val}, 'cleared state removed after re-set'); }; subtest 'cleared option skips default' => sub { package ClearNoDefault; use Getopt::Yath; option_group {category => 'CND', group => 'cnd', no_module => 1} => sub { option cnd_val => (type => 'Scalar', default => 'should_not_appear', description => 'Clear no default'); }; package main; my $res = ClearNoDefault::parse_options(['--no-cnd-val']); is($res->settings->{cnd}->{cnd_val}, undef, 'cleared option does not get default'); }; subtest 'skip_invalid_opts collects skipped' => sub { package SkipInvOpt; use Getopt::Yath; option_group {category => 'SIO', group => 'sio', no_module => 1} => sub { option sio_flag => (type => 'Bool', description => 'Flag'); }; package main; my $res = SkipInvOpt::parse_options( ['--sio-flag', '--invalid-one', '--invalid-two'], skip_invalid_opts => 1, ); is($res->settings->{sio}->{sio_flag}, 1, 'valid option parsed'); is($res->skipped, ['--invalid-one', '--invalid-two'], 'invalid opts collected in skipped'); }; subtest 'docs with group filter' => sub { package DocsGroupFilter; use Getopt::Yath; option_group {category => 'Cat A', group => 'grp_a', no_module => 1} => sub { option dg_a => (type => 'Bool', description => 'Option A'); }; option_group {category => 'Cat B', group => 'grp_b', no_module => 1} => sub { option dg_b => (type => 'Bool', description => 'Option B'); }; package main; my $docs = DocsGroupFilter::options->docs('cli', group => 'grp_a'); like($docs, qr/dg-a/, 'filtered docs contain group_a option'); unlike($docs, qr/dg-b/, 'filtered docs exclude group_b option'); }; subtest 'docs invalid format' => sub { package DocsInvFmt; use Getopt::Yath; option_group {category => 'DIF', group => 'dif', no_module => 1} => sub { option dif_flag => (type => 'Bool', description => 'Flag'); }; package main; like( dies { DocsInvFmt::options->docs('invalid_format') }, qr/Invalid documentation format 'invalid_format'/, 'docs dies with invalid format', ); }; subtest 'option_group error propagation' => sub { package GroupError; use Getopt::Yath; package main; like( dies { GroupError::option_group({group => 'gerr', no_module => 1} => sub { die "intentional error\n"; }) }, qr/intentional error/, 'option_group propagates exceptions from sub', ); }; subtest 'category_sort_map affects doc ordering' => sub { package SortMapTest; use Getopt::Yath; # set_category_sort_map is a HashBase setter, takes a single hashref value category_sort_map({'Zzzz' => 1, 'Aaaa' => 2}); option_group {category => 'Aaaa', group => 'sma', no_module => 1} => sub { option sma_opt => (type => 'Bool', description => 'A opt'); }; option_group {category => 'Zzzz', group => 'smz', no_module => 1} => sub { option smz_opt => (type => 'Bool', description => 'Z opt'); }; package main; my $docs = SortMapTest::options->docs('cli'); my $pos_z = index($docs, 'Zzzz'); my $pos_a = index($docs, 'Aaaa'); ok($pos_z < $pos_a, 'category_sort_map puts Zzzz (weight 1) before Aaaa (weight 2)'); }; done_testing; Makefile.PL100644001750001750 233115165554207 16467 0ustar00exodistexodist000000000000Getopt-Yath-2.000011# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.037 use strict; use warnings; use 5.012000; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "Option processing yath style.", "AUTHOR" => "Chad Granum ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "Getopt-Yath", "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.012000", "NAME" => "Getopt::Yath", "PREREQ_PM" => { "Carp" => 0, "Cpanel::JSON::XS" => 0, "Importer" => "0.024", "Term::Table" => "0.028", "parent" => 0 }, "TEST_REQUIRES" => { "Test2::V0" => "0.000097" }, "VERSION" => "2.000011", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Carp" => 0, "Cpanel::JSON::XS" => 0, "Importer" => "0.024", "Term::Table" => "0.028", "Test2::V0" => "0.000097", "parent" => 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); HashBase.t100644001750001750 2024715165554207 16651 0ustar00exodistexodist000000000000Getopt-Yath-2.000011/tuse strict; use warnings; use Test::More; sub warnings(&) { my $code = shift; my @warnings; local $SIG{__WARN__} = sub { push @warnings => @_ }; $code->(); return \@warnings; } sub exception(&) { my $code = shift; local ($@, $!, $SIG{__DIE__}); my $ok = eval { $code->(); 1 }; my $error = $@ || 'SQUASHED ERROR'; return $ok ? undef : $error; } BEGIN { $INC{'Object/HashBase/Test/HBase.pm'} = __FILE__; package Object::HashBase::Test::HBase; use Getopt::Yath::HashBase qw/foo bar baz/; main::is(FOO, 'foo', "FOO CONSTANT"); main::is(BAR, 'bar', "BAR CONSTANT"); main::is(BAZ, 'baz', "BAZ CONSTANT"); } { BEGIN { $INC{'Object/HashBase/Test/HBaseINIT.pm'} = __FILE__; $INC{'Object/HashBase/Test/HBaseINIT2.pm'} = __FILE__; } package Object::HashBase::Test::HBaseINIT; use Getopt::Yath::HashBase qw/foo bar baz/; $main::counter = 0; add_pre_init { shift->{pre_init_1} = $main::counter++ }; add_pre_init { shift->{pre_init_2} = $main::counter++ }; sub init { shift->{init} = $main::counter++ }; add_post_init { shift->{post_init_1} = $main::counter++ }; add_post_init { shift->{post_init_2} = $main::counter++ }; package Object::HashBase::Test::HBaseINIT2; use parent 'Object::HashBase::Test::HBaseINIT'; use Getopt::Yath::HashBase qw/boop/; add_pre_init { shift->{pre_init_3} = $main::counter++ }; sub init { $_[0]->SUPER::init(); $_[0]->{init2} = $main::counter++ }; add_post_init { shift->{post_init_3} = $main::counter++ }; } BEGIN { package Object::HashBase::Test::HBaseSub; use base 'Object::HashBase::Test::HBase'; use Getopt::Yath::HashBase qw/apple pear/; main::is(FOO, 'foo', "FOO CONSTANT"); main::is(BAR, 'bar', "BAR CONSTANT"); main::is(BAZ, 'baz', "BAZ CONSTANT"); main::is(APPLE, 'apple', "APPLE CONSTANT"); main::is(PEAR, 'pear', "PEAR CONSTANT"); } my $one = Object::HashBase::Test::HBase->new(foo => 'a', bar => 'b', baz => 'c'); is($one->foo, 'a', "Accessor"); is($one->bar, 'b', "Accessor"); is($one->baz, 'c', "Accessor"); $one->set_foo('x'); is($one->foo, 'x', "Accessor set"); $one->set_foo(undef); is_deeply( $one, { foo => undef, bar => 'b', baz => 'c', }, 'hash' ); { my @warns; local $SIG{__WARN__} = sub { push @warns => @_ }; Object::HashBase::Test::HBaseINIT->add_post_init(sub { shift->{late_post} = 'yes' }); ok(!@warns, "No Warnings adding a post-init") or diag(@_); } $main::counter = 0; my $two = Object::HashBase::Test::HBaseINIT->new(); is_deeply( $two, { pre_init_1 => 0, pre_init_2 => 1, init => 2, post_init_2 => 3, post_init_1 => 4, late_post => 'yes', }, "inits ran in the correct order" ); $main::counter = 0; my $three = Object::HashBase::Test::HBaseINIT2->new(); is_deeply( $three, { pre_init_1 => 0, pre_init_2 => 1, pre_init_3 => 2, init => 3, init2 => 4, post_init_3 => 5, post_init_2 => 6, post_init_1 => 7, late_post => 'yes', }, "inits ran in the correct order" ); BEGIN { package main::Const::Test; use Getopt::Yath::HashBase qw/foo/; sub do_it { if (FOO()) { return 'const'; } return 'not const' } } my $pkg = 'main::Const::Test'; is($pkg->do_it, 'const', "worked as expected"); { local $SIG{__WARN__} = sub { }; *main::Const::Test::FOO = sub { 0 }; } ok(!$pkg->FOO, "overrode const sub"); { local $TODO = "known to fail on $]" if $] le "5.006002"; is($pkg->do_it, 'const', "worked as expected, const was constant"); } BEGIN { $INC{'Object/HashBase/Test/HBase/Wrapped.pm'} = __FILE__; package Object::HashBase::Test::HBase::Wrapped; use Getopt::Yath::HashBase qw/foo bar dup/; my $foo = __PACKAGE__->can('foo'); no warnings 'redefine'; *foo = sub { my $self = shift; $self->set_bar(1); $self->$foo(@_); }; } BEGIN { $INC{'Object/HashBase/Test/HBase/Wrapped/Inherit.pm'} = __FILE__; package Object::HashBase::Test::HBase::Wrapped::Inherit; use base 'Object::HashBase::Test::HBase::Wrapped'; use Getopt::Yath::HashBase qw/baz dup/; } my $o = Object::HashBase::Test::HBase::Wrapped::Inherit->new(foo => 1); my $foo = $o->foo; is($o->bar, 1, 'parent attribute sub not overridden'); { package Foo; sub new; use Getopt::Yath::HashBase qw/foo bar baz/; sub new { 'foo' }; } is(Foo->new, 'foo', "Did not override existing 'new' method"); BEGIN { $INC{'Object/HashBase/Test/HBase2.pm'} = __FILE__; package Object::HashBase::Test::HBase2; use Getopt::Yath::HashBase qw/foo -bar ^baz ban +boo/; main::is(FOO, 'foo', "FOO CONSTANT"); main::is(BAR, 'bar', "BAR CONSTANT"); main::is(BAZ, 'baz', "BAZ CONSTANT"); main::is(BAT, 'bat', "BAT CONSTANT"); main::is(BAN, 'ban', "BAN CONSTANT"); main::is(BOO, 'boo', "BOO CONSTANT"); } my $ro = Object::HashBase::Test::HBase2->new(foo => 'foo', bar => 'bar', baz => 'baz', bat => 'bat', ban => 'ban'); is($ro->foo, 'foo', "got foo"); is($ro->bar, 'bar', "got bar"); is($ro->baz, 'baz', "got baz"); is($ro->bat, 'bat', "got bat"); ok(!$ro->can('set_bat'), "No setter for bat"); ok(!$ro->can('ban'), "No reader for ban"); ok(!$ro->can('boo'), "No reader for boo"); ok(!$ro->can('set_boo'), "No setter for boo"); is($ro->{ban}, 'ban', "ban attribute is set"); $ro->set_ban('xxx'); is($ro->{ban}, 'xxx', "ban attribute can be set"); is($ro->set_foo('xxx'), 'xxx', "Can set foo"); is($ro->foo, 'xxx', "got foo"); like(exception { $ro->set_bar('xxx') }, qr/'bar' is read-only/, "Cannot set bar"); my $warnings = warnings { is($ro->set_baz('xxx'), 'xxx', 'set baz') }; like($warnings->[0], qr/set_baz\(\) is deprecated/, "Deprecation warning"); is_deeply( [Getopt::Yath::HashBase::attr_list('Object::HashBase::Test::HBase::Wrapped::Inherit')], [qw/foo bar dup baz/], "Got a list of attributes in order starting from base class, duplicates removed", ); my $x = Object::HashBase::Test::HBase::Wrapped::Inherit->new(foo => 1, baz => 2); is($x->foo, 1, "set foo via pairs"); is($x->baz, 2, "set baz via pairs"); # Now with hashref my $y = Object::HashBase::Test::HBase::Wrapped::Inherit->new({foo => 1, baz => 2}); is($y->foo, 1, "set foo via hashref"); is($y->baz, 2, "set baz via hashref"); # Now with hashref my $z = Object::HashBase::Test::HBase::Wrapped::Inherit->new([ 1, # foo 2, # bar 3, # dup 4, # baz ]); is($z->foo, 1, "set foo via arrayref"); is($z->baz, 4, "set baz via arrayref"); like( exception { Object::HashBase::Test::HBase::Wrapped::Inherit->new([1 .. 10]) }, qr/Too many arguments for Object::HashBase::Test::HBase::Wrapped::Inherit constructor/, "Too many args in array form" ); my $CAN_COUNT = 0; my $CAN_COUNT2 = 0; my $INIT_COUNT = 0; BEGIN { $INC{'Object/HashBase/Test/HBase3.pm'} = __FILE__; package Object::HashBase::Test::HBase3; use Getopt::Yath::HashBase qw/foo/; sub can { my $self = shift; $CAN_COUNT++; $self->SUPER::can(@_); } $INC{'Object/HashBase/Test/HBase4.pm'} = __FILE__; package Object::HashBase::Test::HBase4; use Getopt::Yath::HashBase qw/foo/; sub can { my $self = shift; $CAN_COUNT2++; $self->SUPER::can(@_); } sub init { $INIT_COUNT++ } } is($CAN_COUNT, 0, "->can has not been called yet"); my $it = Object::HashBase::Test::HBase3->new; is($CAN_COUNT, 1, "->can has been called once to check for init"); $it = Object::HashBase::Test::HBase3->new; is($CAN_COUNT, 1, "->can was not called again, we cached it"); is($CAN_COUNT2, 0, "->can has not been called yet"); is($INIT_COUNT, 0, "->init has not been called yet"); $it = Object::HashBase::Test::HBase4->new; is($CAN_COUNT2, 1, "->can has been called once to check for init"); is($INIT_COUNT, 1, "->init has been called once"); $it = Object::HashBase::Test::HBase4->new; is($CAN_COUNT2, 1, "->can was not called again, we cached it"); is($INIT_COUNT, 2, "->init has been called again"); done_testing; 1; coverage.t100644001750001750 7754015165554207 16776 0ustar00exodistexodist000000000000Getopt-Yath-2.000011/tuse Test2::V0; # Tests targeting specific uncovered code paths identified by Devel::Cover. # ============================================================================ # Instance: add_option, add_post_process, have_group, option_groups, # check_cache, option_map cache, include with posts # ============================================================================ subtest 'Instance: add_option and add_post_process' => sub { my $inst = Getopt::Yath::Instance->new(); $inst->add_option( type => 'Bool', title => 'inst-flag', group => 'ig', no_module => 1, trace => [__PACKAGE__, __FILE__, __LINE__], ); is(scalar @{$inst->options}, 1, 'add_option adds one option'); is($inst->options->[0]->title, 'inst-flag', 'correct option added'); my $ran = 0; $inst->add_post_process(0, undef, sub { $ran++ }); ok(exists $inst->posts->{0}, 'add_post_process registers post'); my $state = $inst->process_args([]); ok($ran, 'post-processor added via add_post_process ran'); }; subtest 'Instance: have_group and option_groups' => sub { my $inst = Getopt::Yath::Instance->new(); $inst->add_option( type => 'Bool', title => 'hg-a', group => 'grp_x', no_module => 1, trace => [__PACKAGE__, __FILE__, __LINE__], ); $inst->add_option( type => 'Bool', title => 'hg-b', group => 'grp_y', no_module => 1, trace => [__PACKAGE__, __FILE__, __LINE__], ); ok($inst->have_group('grp_x'), 'have_group true for grp_x'); ok($inst->have_group('grp_y'), 'have_group true for grp_y'); ok(!$inst->have_group('grp_z'), 'have_group false for grp_z'); my $groups = $inst->option_groups; is($groups, {grp_x => 1, grp_y => 1}, 'option_groups returns all groups'); # Call again to exercise cache path my $groups2 = $inst->option_groups; is($groups2, $groups, 'option_groups returns cached result'); }; subtest 'Instance: option_map caching' => sub { my $inst = Getopt::Yath::Instance->new(); $inst->add_option( type => 'Bool', title => 'cm-a', group => 'cm', no_module => 1, trace => [__PACKAGE__, __FILE__, __LINE__], ); # First call builds the map and primes the cache key my $map1 = $inst->option_map; # Second call: check_cache sees key mismatch (0 vs 1), clears and rebuilds my $map2 = $inst->option_map; # Third call: cache key matches, returns cached ref my $map3 = $inst->option_map; ok($map2 == $map3, 'option_map returns cached ref after cache is primed'); # Adding another option invalidates the cache $inst->add_option( type => 'Bool', title => 'cm-b', group => 'cm', no_module => 1, trace => [__PACKAGE__, __FILE__, __LINE__], ); my $map4 = $inst->option_map; ok($map4 != $map3, 'option_map regenerated after adding option'); ok(exists $map4->{'--cm-b'}, 'new option in regenerated map'); }; subtest 'Instance: include with posts' => sub { my $src = Getopt::Yath::Instance->new(); $src->add_option( type => 'Bool', title => 'ip-a', group => 'ip', no_module => 1, trace => [__PACKAGE__, __FILE__, __LINE__], ); my $post_ran = 0; $src->add_post_process(0, undef, sub { $post_ran++ }); my $dst = Getopt::Yath::Instance->new(); $dst->include($src); is(scalar @{$dst->options}, 1, 'option included'); my $state = $dst->process_args([]); ok($post_ran, 'post-processor from included instance ran'); }; subtest 'Instance: include propagates nested included instances' => sub { my $inner = Getopt::Yath::Instance->new(); $inner->add_option( type => 'Bool', title => 'ni-a', group => 'ni', no_module => 1, trace => [__PACKAGE__, __FILE__, __LINE__], ); my $middle = Getopt::Yath::Instance->new(); $middle->include($inner); my $outer = Getopt::Yath::Instance->new(); $outer->include($middle); ok(scalar @{$outer->options} >= 1, 'option from nested include available'); my $included = $outer->included; ok(keys %$included > 0, 'included hash populated'); }; # ============================================================================ # BoolMap: doc_forms, default_*_examples, no_arg_value, notes, requires_arg true # ============================================================================ subtest 'BoolMap: doc_forms and doc generation' => sub { package BoolMapDocTest; use Getopt::Yath; option_group {category => 'BM Docs', group => 'bmdoc', no_module => 1} => sub { option bm_doc => ( type => 'BoolMap', pattern => qr/bmdoc-(.+)/, description => 'BoolMap doc test', ); }; package main; my $docs = BoolMapDocTest::options->docs('cli'); ok(defined $docs, 'BoolMap CLI docs generated'); like($docs, qr/bmdoc/, 'docs contain option name'); my $pod = BoolMapDocTest::options->docs('pod', head => 3); ok(defined $pod, 'BoolMap POD docs generated'); like($pod, qr/bmdoc/, 'POD contains option name'); like($pod, qr{/\^--}, 'POD contains pattern form'); }; subtest 'BoolMap: no_arg_value' => sub { my $opt = Getopt::Yath::Option->create( type => 'BoolMap', title => 'bm-nav', group => 'g', no_module => 1, trace => [caller], pattern => qr/bmnav-(.+)/, ); my @val = $opt->no_arg_value; is($val[0], 'bm_nav', 'no_arg_value returns field name'); is($val[1], 1, 'no_arg_value returns 1'); }; subtest 'BoolMap: notes' => sub { my $opt = Getopt::Yath::Option->create( type => 'BoolMap', title => 'bm-notes', group => 'g', no_module => 1, trace => [caller], pattern => qr/bmnotes-(.+)/, ); my @notes = $opt->notes; ok((grep { defined $_ && /multiple times/ } @notes), 'notes includes multiple times message'); }; subtest 'BoolMap: requires_arg true branch' => sub { my $opt = Getopt::Yath::Option->create( type => 'BoolMap', title => 'bm-ra', group => 'g', no_module => 1, trace => [caller], pattern => qr/bmra-(.+)/, requires_arg => 1, ); ok($opt->requires_arg, 'requires_arg returns true when set'); }; # ============================================================================ # PathList: default_long_examples, default_short_examples # ============================================================================ subtest 'PathList: doc generation exercises example methods' => sub { package PathListDocTest; use Getopt::Yath; option_group {category => 'PL Docs', group => 'pldoc', no_module => 1} => sub { option pl_doc => ( type => 'PathList', short => 'P', description => 'PathList doc test', ); }; package main; my $docs = PathListDocTest::options->docs('cli'); ok(defined $docs, 'PathList CLI docs generated'); like($docs, qr/\*\.\*/, 'docs contain glob example'); my $pod = PathListDocTest::options->docs('pod', head => 3); ok(defined $pod, 'PathList POD docs generated'); like($pod, qr/\*\.\*/, 'POD contains glob example'); }; # ============================================================================ # Auto: get_env_value (both branches) # ============================================================================ subtest 'Auto: get_env_value' => sub { my $opt = Getopt::Yath::Option->create( type => 'Auto', title => 'auto-env', group => 'g', no_module => 1, trace => [caller], autofill => 'x', ); my $val = 'hello'; is(($opt->get_env_value('VAR', \$val))[0], 'hello', 'Auto get_env_value returns value'); is(($opt->get_env_value('!VAR', \$val))[0], 0, 'Auto get_env_value negated truthy'); $val = 0; is(($opt->get_env_value('!VAR', \$val))[0], 1, 'Auto get_env_value negated falsy'); }; # ============================================================================ # Count: get_env_value negated, autofill //= 0 path # ============================================================================ subtest 'Count: get_env_value negated' => sub { my $opt = Getopt::Yath::Option->create( type => 'Count', title => 'cnt-neg', group => 'g', no_module => 1, trace => [caller], initialize => 0, ); my $val = 3; is(($opt->get_env_value('!VAR', \$val))[0], 0, 'Count negated env truthy'); $val = 0; is(($opt->get_env_value('!VAR', \$val))[0], 1, 'Count negated env falsy'); }; subtest 'Count: add_value with no args bumps from autofill' => sub { my $opt = Getopt::Yath::Option->create( type => 'Count', title => 'cnt-af', group => 'g', no_module => 1, trace => [caller], initialize => 0, ); # Start with undef to exercise the //= autofill path my $val = undef; $opt->add_value(\$val); is($val, 1, 'add_value with undef starts at autofill (0) then increments to 1'); }; # ============================================================================ # Scalar: get_env_value negated # ============================================================================ subtest 'Scalar: get_env_value negated' => sub { my $opt = Getopt::Yath::Option->create( type => 'Scalar', title => 'scl-neg', group => 'g', no_module => 1, trace => [caller], ); my $val = 'truthy'; is(($opt->get_env_value('!VAR', \$val))[0], 0, 'Scalar negated env truthy'); $val = ''; is(($opt->get_env_value('!VAR', \$val))[0], 1, 'Scalar negated env falsy'); }; # ============================================================================ # Yath.pm: inherit parameter # ============================================================================ subtest 'Getopt::Yath: inherit parameter' => sub { # inherit includes options from $class->options. When used on Getopt::Yath # directly, it's a no-op since Getopt::Yath doesn't have options(). But the # code path (line 23) is still exercised. package CovInheritTest; use Getopt::Yath(inherit => 1); option_group {category => 'Inherit', group => 'inh', no_module => 1} => sub { option inh_flag => (type => 'Bool', description => 'Inherited test'); }; package main; my $res = CovInheritTest::parse_options(['--inh-flag']); is($res->settings->{inh}->{inh_flag}, 1, 'inherit param does not break normal usage'); }; # ============================================================================ # Option.pm: cli_docs with color, base class abstract stubs # ============================================================================ subtest 'Option: cli_docs with color enabled' => sub { package ColorDocTest; use Getopt::Yath; option_group {category => 'Color', group => 'color', no_module => 1} => sub { option col_opt => ( type => 'Scalar', short => 'C', description => 'Colored option', ); }; package main; my $docs = ColorDocTest::options->docs('cli', color => 1); ok(defined $docs, 'CLI docs with color=1 generated'); # If Term::ANSIColor is available, docs will contain escape codes if (Getopt::Yath::Term::USE_COLOR()) { like($docs, qr/\e\[/, 'colored docs contain ANSI escapes'); } }; subtest 'Option: doc_sort_ops with group_first' => sub { package SortOpsTest; use Getopt::Yath; option_group {category => 'Cat A', group => 'grp_a', no_module => 1} => sub { option so_a1 => (type => 'Bool', description => 'A1'); option so_a2 => (type => 'Bool', description => 'A2'); }; option_group {category => 'Cat B', group => 'grp_b', no_module => 1} => sub { option so_b1 => (type => 'Bool', description => 'B1'); }; package main; my $inst = SortOpsTest::options; my @opts = @{$inst->options}; # Exercise the doc_sort_ops with group_first param my @sorted = sort { $inst->doc_sort_ops($a, $b, group_first => 1) } @opts; ok(@sorted > 0, 'doc_sort_ops with group_first works'); }; # ============================================================================ # Instance: option_map and option_groups with in_options parameter # ============================================================================ subtest 'Instance: option_map with explicit options list' => sub { my $inst = Getopt::Yath::Instance->new(); $inst->add_option( type => 'Bool', title => 'om-a', group => 'om', no_module => 1, trace => [__PACKAGE__, __FILE__, __LINE__], ); $inst->add_option( type => 'Scalar', title => 'om-b', group => 'om', no_module => 1, trace => [__PACKAGE__, __FILE__, __LINE__], ); # Pass a subset as in_options — bypasses cache my $subset = [$inst->options->[0]]; my $map = $inst->option_map($subset); ok(exists $map->{'--om-a'}, 'subset map contains om-a'); ok(!exists $map->{'--om-b'}, 'subset map does not contain om-b'); my $groups = $inst->option_groups($subset); is($groups, {om => 1}, 'option_groups with in_options returns subset groups'); }; # ============================================================================ # Instance: process_args with pre-set settings # ============================================================================ subtest 'Instance: process_args with pre-existing settings' => sub { package PresetSettingsTest; use Getopt::Yath; option_group {category => 'PS', group => 'ps', no_module => 1} => sub { option ps_flag => (type => 'Bool', description => 'Flag'); option ps_val => (type => 'Scalar', default => 'def', description => 'Val'); }; package main; my $settings = Getopt::Yath::Settings->new({ps => {ps_flag => 1, ps_val => 'preset'}}); my $res = PresetSettingsTest::parse_options([], settings => $settings); # Pre-existing values should be preserved (not overwritten by defaults) is($res->settings->{ps}->{ps_flag}, 1, 'pre-set bool preserved'); is($res->settings->{ps}->{ps_val}, 'preset', 'pre-set scalar preserved'); }; # ============================================================================ # Instance: process_args with env and cleared params # ============================================================================ subtest 'Instance: process_args with pre-set env/cleared/modules' => sub { package PresetEnvTest; use Getopt::Yath; option_group {category => 'PE', group => 'pe', no_module => 1} => sub { option pe_flag => (type => 'Bool', description => 'Flag'); }; package main; my %env = (EXISTING => 'val'); my %cleared; my %modules; my $res = PresetEnvTest::parse_options( ['--pe-flag'], env => \%env, cleared => \%cleared, modules => \%modules, ); is($res->env->{EXISTING}, 'val', 'pre-set env preserved'); }; # ============================================================================ # List: condition coverage for split_on and maybe # ============================================================================ subtest 'List: add_value with maybe and empty list' => sub { my $opt = Getopt::Yath::Option->create( type => 'List', title => 'lm', group => 'g', no_module => 1, trace => [caller], maybe => 1, ); my $ref = []; # maybe + no values = no-op $opt->add_value(\$ref); is($ref, [], 'maybe list add_value with no args is no-op'); }; # ============================================================================ # AutoPathList: doc generation # ============================================================================ subtest 'AutoPathList: doc generation' => sub { package AutoPathListDocTest; use Getopt::Yath; option_group {category => 'APL Docs', group => 'apldoc', no_module => 1} => sub { option apl_doc => ( type => 'AutoPathList', short => 'A', autofill => sub { 'lib' }, description => 'AutoPathList doc test', ); }; package main; my $docs = AutoPathListDocTest::options->docs('cli'); ok(defined $docs, 'AutoPathList CLI docs generated'); like($docs, qr/\*\.\*/, 'docs contain glob example'); }; # ============================================================================ # Option: allowed_values_text in docs # ============================================================================ subtest 'Option: allowed_values_text in cli_docs' => sub { package AVTextTest; use Getopt::Yath; option_group {category => 'AV Text', group => 'avt', no_module => 1} => sub { option avt_opt => ( type => 'Scalar', allowed_values => ['a', 'b', 'c'], allowed_values_text => 'a, b, or c', description => 'Option with allowed values text', ); }; package main; my $docs = AVTextTest::options->docs('cli'); like($docs, qr/Allowed Values: a, b, or c/, 'allowed_values_text appears in docs'); }; subtest 'Option: allowed_values array in cli_docs' => sub { package AVArrayTest; use Getopt::Yath; option_group {category => 'AV Array', group => 'ava', no_module => 1} => sub { option ava_opt => ( type => 'Scalar', allowed_values => ['x', 'y', 'z'], description => 'Option with allowed values array', ); }; package main; my $docs = AVArrayTest::options->docs('cli'); like($docs, qr/Allowed Values: x, y, z/, 'allowed_values array appears in docs'); }; # ============================================================================ # Option: default_text and autofill_text in docs # ============================================================================ subtest 'Option: default_text in cli_docs' => sub { package DTextTest; use Getopt::Yath; option_group {category => 'DT', group => 'dt', no_module => 1} => sub { option dt_opt => ( type => 'Bool', default => 1, default_text => 'enabled by default', description => 'With default text', ); }; package main; my $docs = DTextTest::options->docs('cli'); like($docs, qr/default: enabled by default/, 'default_text appears in docs'); }; # ============================================================================ # Instance: docs returning empty when no options # ============================================================================ subtest 'Instance: docs with no options' => sub { my $inst = Getopt::Yath::Instance->new(); my $docs = $inst->docs('cli'); ok(!$docs, 'docs returns falsy when no options'); }; # ============================================================================ # Instance: clear_cache # ============================================================================ subtest 'Instance: clear_cache' => sub { my $inst = Getopt::Yath::Instance->new(); $inst->add_option( type => 'Bool', title => 'cc-a', group => 'cc', no_module => 1, trace => [__PACKAGE__, __FILE__, __LINE__], ); # Populate caches $inst->option_map; $inst->option_groups; $inst->clear_cache; # After clear, re-generating should work my $map = $inst->option_map; ok(exists $map->{'--cc-a'}, 'option_map works after clear_cache'); }; # ============================================================================ # Yath.pm condition coverage: option_post_process error, inst_class param # ============================================================================ subtest 'Getopt::Yath: option_post_process without coderef' => sub { package PostProcErr; use Getopt::Yath; option_group {category => 'PPE', group => 'ppe', no_module => 1} => sub { option ppe_flag => (type => 'Bool', description => 'Flag'); }; package main; like( dies { PostProcErr::option_post_process("not a coderef") }, qr/You must provide a callback coderef/, 'option_post_process rejects non-coderef', ); }; # ============================================================================ # Instance: doc_sort_ops prefix comparison # ============================================================================ subtest 'Instance: doc_sort_ops with prefixes' => sub { package PrefixSortTest; use Getopt::Yath; option_group {category => 'Same Cat', group => 'same', prefix => 'aaa', no_module => 1} => sub { option ps_opt1 => (type => 'Bool', description => 'Opt1'); }; option_group {category => 'Same Cat', group => 'same', prefix => 'zzz', no_module => 1} => sub { option ps_opt2 => (type => 'Bool', description => 'Opt2'); }; package main; # Generate docs — this exercises the prefix sort comparison my $docs = PrefixSortTest::options->docs('cli'); ok(defined $docs, 'docs with mixed prefixes generated'); my $pos1 = index($docs, 'aaa-ps-opt1'); my $pos2 = index($docs, 'zzz-ps-opt2'); ok($pos1 < $pos2, 'prefix aaa sorts before zzz'); }; # ============================================================================ # Count: get_autofill_value with explicit autofill set # ============================================================================ subtest 'Count: get_autofill_value with explicit autofill' => sub { my $opt = Getopt::Yath::Option->create( type => 'Count', title => 'cnt-af2', group => 'g', no_module => 1, trace => [caller], initialize => 0, ); # get_autofill_value calls SUPER which returns undef, then // 0 my @af = $opt->get_autofill_value; is($af[0], 0, 'Count autofill defaults to 0'); }; subtest 'Count: add_value when ref already defined' => sub { my $opt = Getopt::Yath::Option->create( type => 'Count', title => 'cnt-ad', group => 'g', no_module => 1, trace => [caller], initialize => 0, ); my $val = 5; $opt->add_value(\$val); # No args — increments is($val, 6, 'add_value increments when already defined'); }; # ============================================================================ # List: condition coverage for clear and initialize with values # ============================================================================ subtest 'List: get_clear_value with explicit clear' => sub { my $opt = Getopt::Yath::Option->create( type => 'List', title => 'lc', group => 'g', no_module => 1, trace => [caller], clear => sub { ['sentinel'] }, ); my $cv = $opt->get_clear_value; is($cv, ['sentinel'], 'List get_clear_value uses explicit clear'); }; subtest 'List: get_initial_value with explicit initialize' => sub { my $opt = Getopt::Yath::Option->create( type => 'List', title => 'li', group => 'g', no_module => 1, trace => [caller], initialize => sub { ['pre'] }, ); delete local $ENV{NONEXISTENT_VAR_XYZ}; my $iv = $opt->get_initial_value; is($iv, ['pre'], 'List get_initial_value uses explicit initialize'); }; subtest 'List: add_value with maybe=false and no values' => sub { my $opt = Getopt::Yath::Option->create( type => 'List', title => 'lnm', group => 'g', no_module => 1, trace => [caller], ); my $ref = []; # Non-maybe list with no values still pushes (empty push is no-op) $opt->add_value(\$ref); is($ref, [], 'non-maybe list add_value with no args'); }; # ============================================================================ # Instance: process_args with multiple values error for non-list option # ============================================================================ subtest 'Instance: group arg to non-list option errors' => sub { package GroupNonListTest; use Getopt::Yath; option_group {category => 'GNL', group => 'gnl', no_module => 1} => sub { option gnl_scalar => (type => 'Scalar', description => 'A scalar'); }; package main; like( dies { GroupNonListTest::parse_options( ['--gnl-scalar', ':{', 'a', 'b', '}:'], groups => {':{' => '}:'}, ) }, qr/cannot take multiple values/, 'group arg to non-list scalar option dies', ); }; # ============================================================================ # Instance: docs with color => 0 explicitly # ============================================================================ subtest 'Instance: docs with color explicitly disabled' => sub { package ColorOffTest; use Getopt::Yath; option_group {category => 'CO', group => 'co', no_module => 1} => sub { option co_flag => (type => 'Bool', description => 'A flag'); }; package main; my $docs = ColorOffTest::options->docs('cli', color => 0); unlike($docs, qr/\e\[/, 'no ANSI escapes with color => 0'); }; # ============================================================================ # Instance: option_map duplicate form detection # ============================================================================ subtest 'Instance: duplicate option form detection' => sub { my $inst = Getopt::Yath::Instance->new(); $inst->add_option( type => 'Bool', title => 'dup-test', group => 'dup', no_module => 1, trace => [__PACKAGE__, __FILE__, __LINE__], ); # Manually re-add the same option (bypassing dedup by using _option directly) # The dedup prevents this, so let's test the form collision with a different option # that has the same form via alt like( dies { $inst->add_option( type => 'Bool', title => 'dup-test2', group => 'dup', no_module => 1, trace => [__PACKAGE__, __FILE__, __LINE__], alt => ['dup-test'], # Conflicts with --dup-test from first option ); $inst->option_map; # Force map rebuild to trigger collision }, qr/Option form '.*dup-test' defined twice/, 'duplicate option form detected', ); }; # ============================================================================ # Yath.pm: already-defined export error # ============================================================================ # ============================================================================ # Count: get_autofill_value with explicit autofill to cover // 0 left side # ============================================================================ subtest 'Count: add_value bump from 0 autofill' => sub { # Exercises the $$ref //= get_autofill_value path where autofill returns 0 my $opt = Getopt::Yath::Option->create( type => 'Count', title => 'cnt-af3', group => 'g', no_module => 1, trace => [caller], initialize => 0, ); # get_autofill_value should return 0 (SUPER returns undef, // 0 kicks in) my @af = $opt->get_autofill_value; is($af[0], 0, 'Count get_autofill_value returns 0'); }; # ============================================================================ # Map: get_initial_value and get_clear_value with explicit values # ============================================================================ subtest 'Map: get_initial_value with explicit initialize' => sub { my $opt = Getopt::Yath::Option->create( type => 'Map', title => 'mi', group => 'g', no_module => 1, trace => [caller], initialize => sub { {pre => 'set'} }, ); my $iv = $opt->get_initial_value; is($iv, {pre => 'set'}, 'Map get_initial_value uses explicit initialize'); }; subtest 'Map: get_clear_value with explicit clear' => sub { my $opt = Getopt::Yath::Option->create( type => 'Map', title => 'mc', group => 'g', no_module => 1, trace => [caller], clear => sub { {cleared => 1} }, ); my $cv = $opt->get_clear_value; is($cv, {cleared => 1}, 'Map get_clear_value uses explicit clear'); }; # ============================================================================ # Option.pm: cli_docs with notes dedup and autofill_text # ============================================================================ subtest 'Option: autofill_text in docs' => sub { package AutofillTextTest; use Getopt::Yath; option_group {category => 'AFT', group => 'aft', no_module => 1} => sub { option aft_opt => ( type => 'Auto', autofill => 'x', autofill_text => 'uses x by default', description => 'With autofill text', ); }; package main; my $docs = AutofillTextTest::options->docs('cli'); like($docs, qr/autofill: uses x by default/, 'autofill_text appears in docs'); }; # ============================================================================ # Option.pm: pod_docs generation # ============================================================================ subtest 'Option: pod_docs exercises env display and notes' => sub { package PodDocsTest; use Getopt::Yath; option_group {category => 'PodDoc', group => 'poddoc', no_module => 1} => sub { option pd_opt => ( type => 'Scalar', from_env_vars => ['PD_TEST_VAR'], clear_env_vars => ['PD_CLEAR_VAR'], set_env_vars => ['PD_SET_VAR'], description => 'Pod doc test option', ); # Use List type which overrides notes() to return a list option pd_list => ( type => 'List', description => 'A list option for notes test', ); }; package main; my $pod = PodDocsTest::options->docs('pod', head => 3); like($pod, qr/Can also be set.*PD_TEST_VAR/, 'POD shows from_env_vars'); like($pod, qr/cleared.*PD_CLEAR_VAR/, 'POD shows clear_env_vars'); like($pod, qr/set after.*PD_SET_VAR/, 'POD shows set_env_vars'); like($pod, qr/Can be specified multiple times/, 'POD shows notes from List type'); }; # ============================================================================ # Instance: doc_sort_ops group_first with same category different groups # ============================================================================ subtest 'Instance: doc_sort_ops exercises all sort branches' => sub { package SortBranchTest; use Getopt::Yath; # Same category, different groups — exercises group cmp after category cmp option_group {category => 'Common', group => 'z_group', no_module => 1} => sub { option sb_z => (type => 'Bool', description => 'Z'); }; option_group {category => 'Common', group => 'a_group', no_module => 1} => sub { option sb_a => (type => 'Bool', description => 'A'); }; # Different category — exercises category cmp option_group {category => 'Another', group => 'b_group', no_module => 1} => sub { option sb_b => (type => 'Bool', description => 'B'); }; package main; my $docs = SortBranchTest::options->docs('cli'); ok(defined $docs, 'docs with same-category different-group options'); # Also exercise group_first sort path my $inst = SortBranchTest::options; my @opts = @{$inst->options}; my @sorted = sort { $inst->doc_sort_ops($a, $b, group_first => 1) } @opts; ok(@sorted > 0, 'group_first sort works'); }; subtest 'Getopt::Yath: error on existing method conflict' => sub { like( dies { package ExistingMethodPkg; sub options { 'already here' } Getopt::Yath->import(); }, qr/already has an 'options' method/, 'import dies when method already exists', ); }; done_testing; settings.t100644001750001750 2024215165554207 17026 0ustar00exodistexodist000000000000Getopt-Yath-2.000011/tuse Test2::V0; use Scalar::Util qw/blessed/; use Getopt::Yath::Settings; use Getopt::Yath::Settings::Group; subtest 'Settings::Group construction' => sub { my $g = Getopt::Yath::Settings::Group->new(foo => 'bar', baz => 42); isa_ok($g, 'Getopt::Yath::Settings::Group'); is($g->{foo}, 'bar', 'hash key set via pairs'); is($g->{baz}, 42, 'hash key set via pairs'); my $g2 = Getopt::Yath::Settings::Group->new({x => 1}); is($g2->{x}, 1, 'hash key set via hashref'); }; subtest 'Settings::Group check_option' => sub { my $g = Getopt::Yath::Settings::Group->new(alpha => 1); ok($g->check_option('alpha'), 'check_option true for existing'); ok(!$g->check_option('beta'), 'check_option false for missing'); }; subtest 'Settings::Group option get/set' => sub { my $g = Getopt::Yath::Settings::Group->new(val => 'original'); is($g->option('val'), 'original', 'option getter'); $g->option('val', 'changed'); is($g->option('val'), 'changed', 'option setter'); like( dies { $g->option('nope') }, qr/The 'nope' option does not exist/, 'option dies on missing key', ); }; subtest 'Settings::Group option lvalue' => sub { skip_all 'lvalue sub assignment unreliable before perl 5.026' if $] < 5.026; my $g = Getopt::Yath::Settings::Group->new(lv => 10); $g->option('lv') = 20; is($g->option('lv'), 20, 'lvalue assignment works'); }; subtest 'Settings::Group create_option' => sub { my $g = Getopt::Yath::Settings::Group->new(); $g->create_option('new_opt', 'hello'); is($g->option('new_opt'), 'hello', 'create_option creates and sets'); }; subtest 'Settings::Group option_ref' => sub { my $g = Getopt::Yath::Settings::Group->new(reftest => 5); my $ref = $g->option_ref('reftest'); is($$ref, 5, 'option_ref returns scalar ref to value'); $$ref = 99; is($g->option('reftest'), 99, 'writing through ref updates the group'); like( dies { $g->option_ref('missing') }, qr/The 'missing' option does not exist/, 'option_ref dies without create flag', ); my $ref2 = $g->option_ref('created', 1); $$ref2 = 'new'; is($g->option('created'), 'new', 'option_ref with create flag'); }; subtest 'Settings::Group delete_option' => sub { my $g = Getopt::Yath::Settings::Group->new(del => 'bye'); $g->delete_option('del'); ok(!$g->check_option('del'), 'delete_option removes the key'); }; subtest 'Settings::Group remove_option' => sub { my $g = Getopt::Yath::Settings::Group->new(rem => 'gone'); $g->remove_option('rem'); ok(!$g->check_option('rem'), 'remove_option removes the key'); }; subtest 'Settings::Group all' => sub { my $g = Getopt::Yath::Settings::Group->new(a => 1, b => 2); is({$g->all}, {a => 1, b => 2}, 'all returns key/value pairs'); }; subtest 'Settings::Group AUTOLOAD' => sub { my $g = Getopt::Yath::Settings::Group->new(magic => 'auto'); is($g->magic, 'auto', 'AUTOLOAD accessor works'); like( dies { $g->no_such_thing }, qr/The 'no_such_thing' option does not exist/, 'AUTOLOAD dies for missing option', ); }; subtest 'Settings::Group TO_JSON' => sub { my $g = Getopt::Yath::Settings::Group->new(j => 1); my $h = $g->TO_JSON; is($h, {j => 1}, 'TO_JSON returns plain hashref'); ok(!blessed($h), 'TO_JSON result is not blessed'); }; subtest 'Settings construction' => sub { my $s = Getopt::Yath::Settings->new({ grp1 => {opt_a => 1}, grp2 => {opt_b => 2}, }); isa_ok($s, 'Getopt::Yath::Settings'); isa_ok($s->{grp1}, ['Getopt::Yath::Settings::Group'], 'groups are blessed'); isa_ok($s->{grp2}, ['Getopt::Yath::Settings::Group'], 'groups are blessed'); }; subtest 'Settings check_group' => sub { my $s = Getopt::Yath::Settings->new({present => {}}); ok($s->check_group('present'), 'check_group true for existing'); ok(!$s->check_group('absent'), 'check_group false for missing'); }; subtest 'Settings group' => sub { my $s = Getopt::Yath::Settings->new({stuff => {x => 1}}); my $g = $s->group('stuff'); isa_ok($g, 'Getopt::Yath::Settings::Group'); is($g->x, 1, 'retrieved group has correct data'); like( dies { $s->group('nope') }, qr/The 'nope' group is not defined/, 'group dies for missing without vivify', ); my $g2 = $s->group('vivified', 1); isa_ok($g2, 'Getopt::Yath::Settings::Group'); }; subtest 'Settings maybe' => sub { my $s = Getopt::Yath::Settings->new({ grp => {opt => 'found'}, }); is($s->maybe('grp', 'opt'), 'found', 'maybe returns value when present'); is($s->maybe('grp', 'missing', 'fallback'), 'fallback', 'maybe returns default for missing option'); is($s->maybe('no_grp', 'opt', 'def'), 'def', 'maybe returns default for missing group'); }; subtest 'Settings create_group' => sub { my $s = Getopt::Yath::Settings->new({}); my $g = $s->create_group('new_grp', x => 1); isa_ok($g, 'Getopt::Yath::Settings::Group'); is($g->x, 1, 'create_group sets values'); }; subtest 'Settings delete_group' => sub { my $s = Getopt::Yath::Settings->new({del_me => {a => 1}}); $s->delete_group('del_me'); ok(!$s->check_group('del_me'), 'delete_group removes the group'); }; subtest 'Settings AUTOLOAD' => sub { my $s = Getopt::Yath::Settings->new({auto_grp => {v => 9}}); my $g = $s->auto_grp; isa_ok($g, 'Getopt::Yath::Settings::Group'); is($g->v, 9, 'AUTOLOAD group accessor'); }; subtest 'Settings TO_JSON' => sub { my $s = Getopt::Yath::Settings->new({g => {a => 1}}); my $h = $s->TO_JSON; ref_ok($h, 'HASH', 'TO_JSON returns hashref'); }; subtest 'Settings FROM_JSON' => sub { my $s = Getopt::Yath::Settings->FROM_JSON('{"mygrp":{"val":42}}'); isa_ok($s, 'Getopt::Yath::Settings'); is($s->mygrp->val, 42, 'FROM_JSON round-trips correctly'); }; subtest 'Settings FROM_JSON_FILE' => sub { use Getopt::Yath::Util qw/encode_json_file/; my $file = encode_json_file({filegrp => {z => 99}}); my $s = Getopt::Yath::Settings->FROM_JSON_FILE($file); isa_ok($s, 'Getopt::Yath::Settings'); is($s->filegrp->z, 99, 'FROM_JSON_FILE loads correctly'); unlink $file; }; subtest 'Settings construction with pairs' => sub { my $s = Getopt::Yath::Settings->new(pgrp => {p => 1}); isa_ok($s, 'Getopt::Yath::Settings'); isa_ok($s->{pgrp}, ['Getopt::Yath::Settings::Group'], 'pair-constructed group is blessed'); is($s->pgrp->p, 1, 'pair-constructed group has data'); }; subtest 'Settings create_group with hashref' => sub { my $s = Getopt::Yath::Settings->new({}); my $g = $s->create_group('href_grp', {a => 10, b => 20}); isa_ok($g, 'Getopt::Yath::Settings::Group'); is($g->a, 10, 'create_group with hashref arg'); is($g->b, 20, 'create_group with hashref arg'); }; subtest 'Settings maybe with undef value' => sub { my $s = Getopt::Yath::Settings->new({grp => {opt => undef}}); is($s->maybe('grp', 'opt', 'fallback'), 'fallback', 'maybe returns default when value is undef'); }; subtest 'Settings AUTOLOAD on non-blessed dies' => sub { like( dies { Getopt::Yath::Settings::nonexistent() }, qr/must be called on a blessed instance/, 'Settings AUTOLOAD dies on non-blessed call', ); }; subtest 'Settings::Group AUTOLOAD on non-blessed dies' => sub { like( dies { Getopt::Yath::Settings::Group::nonexistent() }, qr/must be called on a blessed instance/, 'Group AUTOLOAD dies on non-blessed call', ); }; subtest 'Settings::Group option too many args' => sub { my $g = Getopt::Yath::Settings::Group->new(x => 1); like( dies { $g->option('x', 'a', 'b') }, qr/Too many arguments/, 'option() dies with too many arguments', ); }; subtest 'Settings::Group AUTOLOAD set' => sub { my $g = Getopt::Yath::Settings::Group->new(aset => 'orig'); $g->aset('updated'); is($g->aset, 'updated', 'AUTOLOAD setter works'); }; subtest 'Settings::Group AUTOLOAD lvalue' => sub { skip_all 'lvalue sub assignment unreliable before perl 5.026' if $] < 5.026; my $g = Getopt::Yath::Settings::Group->new(alv => 'x'); $g->alv = 'y'; is($g->alv, 'y', 'AUTOLOAD lvalue assignment works'); }; done_testing; acceptance.t100644001750001750 6404715165554207 17267 0ustar00exodistexodist000000000000Getopt-Yath-2.000011/tuse Test2::V0; # ============================================================================ # Acceptance tests: end-to-end parsing of realistic command lines # ============================================================================ # --- Shared option definitions used across multiple tests --- BEGIN { $INC{'AcceptLib.pm'} = __FILE__ } package AcceptLib; use Getopt::Yath; option_group {category => 'Display', group => 'display', no_module => 1} => sub { option verbose => ( type => 'Count', short => 'v', initialize => 0, description => 'Increase verbosity', ); option color => ( type => 'Bool', default => 1, alt_no => ['no-colour'], description => 'Enable colored output', ); option formatter => ( type => 'Auto', short => 'F', autofill => 'Default', default => undef, description => 'Output formatter', ); }; option_group {category => 'Runner', group => 'runner', no_module => 1} => sub { option jobs => ( type => 'Scalar', short => 'j', default => 1, allowed_values => qr/^\d+$/, description => 'Number of parallel jobs', ); option includes => ( type => 'List', short => 'I', split_on => ',', description => 'Include paths', ); option env_vars => ( type => 'Map', short => 'E', description => 'Environment variables to set', ); option timeout => ( type => 'Scalar', default => 60, description => 'Test timeout in seconds', normalize => sub { $_[0] + 0 }, ); option retry => ( type => 'Bool', default => 0, description => 'Retry failed tests', ); option tags => ( type => 'List', description => 'Tags to filter by', ); }; BEGIN { $INC{'AcceptPluginLib.pm'} = __FILE__ } package AcceptPluginLib; use Getopt::Yath; option_group {category => 'Plugin', group => 'plugin', no_module => 1} => sub { option plugin_opt => ( type => 'Scalar', default => 'none', description => 'Plugin option', ); }; package main; # ============================================================================ # Test: Typical CI pipeline command line # yath test -j4 -vv --no-color --retry --timeout 120 --include lib,blib/lib t/ # ============================================================================ subtest 'CI pipeline: parallel, verbose, no-color, retry, custom timeout' => sub { my $res = AcceptLib::parse_options( ['-j4', '-vv', '--no-color', '--retry', '--timeout', '120', '--includes', 'lib,blib/lib', 't/'], skip_non_opts => 1, stops => ['--'], ); is($res->settings->{runner}->{jobs}, 4, 'jobs = 4'); is($res->settings->{display}->{verbose}, 2, 'verbosity = 2'); is($res->settings->{display}->{color}, 0, 'color disabled'); is($res->settings->{runner}->{retry}, 1, 'retry enabled'); is($res->settings->{runner}->{timeout}, 120, 'timeout = 120'); is($res->settings->{runner}->{includes}, ['lib', 'blib/lib'], 'includes split on comma'); is($res->skipped, ['t/'], 'test path skipped as non-opt'); }; # ============================================================================ # Test: Developer workflow with short flags combined # yath test -vvvj8 -Ilib -Iblib/lib -E HOME=/tmp -E USER=test # ============================================================================ subtest 'Developer workflow: combined short flags and repeated options' => sub { my $res = AcceptLib::parse_options( ['-vvvj', '8', '-I', 'lib', '-I', 'blib/lib', '-E', 'HOME=/tmp', '-E', 'USER=test'], ); is($res->settings->{display}->{verbose}, 3, 'three v flags counted'); is($res->settings->{runner}->{jobs}, '8', 'jobs from short after count expansion'); is($res->settings->{runner}->{includes}, ['lib', 'blib/lib'], 'two -I flags collected'); is( $res->settings->{runner}->{env_vars}, {HOME => '/tmp', USER => 'test'}, 'repeated -E flags build map', ); }; # ============================================================================ # Test: Mixed long and short forms with = and space separators # ============================================================================ subtest 'Mixed long/short with = and space separators' => sub { my $res = AcceptLib::parse_options( ['--jobs=2', '-v', '--timeout=30', '--includes=src', '-Ivendor', '--retry'], ); is($res->settings->{runner}->{jobs}, '2', 'long= form'); is($res->settings->{display}->{verbose}, 1, 'short flag'); is($res->settings->{runner}->{timeout}, 30, 'long= with normalize'); is($res->settings->{runner}->{includes}, ['src', 'vendor'], 'mixed long= and short'); is($res->settings->{runner}->{retry}, 1, 'long bool'); }; # ============================================================================ # Test: Clearing and re-setting options # Simulates: user sets defaults in config, then overrides on command line # ============================================================================ subtest 'Clear and re-set: override defaults and config' => sub { my $res = AcceptLib::parse_options( [ '--includes', 'from_config', # initial set '--no-includes', # clear all '--includes', 'actual_path', # re-set '--no-retry', # explicitly disable '--color', # re-enable after default ], ); is( $res->settings->{runner}->{includes}, ['actual_path'], 'list cleared then re-populated', ); is($res->settings->{runner}->{retry}, 0, 'retry explicitly disabled'); is($res->settings->{display}->{color}, 1, 'color explicitly enabled'); }; # ============================================================================ # Test: Stop processing at -- and pass remaining to test runner # ============================================================================ subtest 'Double-dash stop: pass remaining args through' => sub { my $res = AcceptLib::parse_options( ['-v', '--jobs', '2', '--', '--some-test-flag', 'testfile.t', '--another'], stops => ['--'], ); is($res->settings->{display}->{verbose}, 1, 'option before -- parsed'); is($res->settings->{runner}->{jobs}, '2', 'option with arg before -- parsed'); is($res->stop, '--', 'stopped at --'); is( $res->remains, ['--some-test-flag', 'testfile.t', '--another'], 'everything after -- preserved verbatim', ); }; # ============================================================================ # Test: Environment variable integration # ============================================================================ subtest 'Environment variable integration: from_env, clear_env, set_env' => sub { package EnvAcceptLib; use Getopt::Yath; option_group {category => 'Env', group => 'env', no_module => 1} => sub { option log_level => ( type => 'Scalar', from_env_vars => ['ACCEPT_LOG_LEVEL'], set_env_vars => ['ACCEPT_LOG_LEVEL'], default => 'warn', description => 'Log level', ); option token => ( type => 'Scalar', from_env_vars => ['ACCEPT_TOKEN'], clear_env_vars => ['ACCEPT_TOKEN'], description => 'Auth token (cleared from env after reading)', ); option quiet => ( type => 'Bool', from_env_vars => ['!ACCEPT_VERBOSE'], set_env_vars => ['!ACCEPT_VERBOSE'], description => 'Quiet mode (inverse of VERBOSE)', ); }; package main; # Scenario: env vars set before parsing local $ENV{ACCEPT_LOG_LEVEL} = 'debug'; local $ENV{ACCEPT_TOKEN} = 'secret123'; local $ENV{ACCEPT_VERBOSE} = '1'; my $res = EnvAcceptLib::parse_options([], no_set_env => 1); is($res->settings->{env}->{log_level}, 'debug', 'log_level from env'); is($res->settings->{env}->{token}, 'secret123', 'token from env'); is($res->settings->{env}->{quiet}, 0, 'quiet=0 because VERBOSE=1'); is($res->env->{ACCEPT_TOKEN}, undef, 'token env cleared'); is($res->env->{ACCEPT_LOG_LEVEL}, 'debug', 'log_level env would be set'); is($res->env->{ACCEPT_VERBOSE}, 1, '!VERBOSE negated: quiet=0 -> VERBOSE=1'); # Scenario: command line overrides env local $ENV{ACCEPT_LOG_LEVEL} = 'debug'; local $ENV{ACCEPT_TOKEN} = 'old_token'; local $ENV{ACCEPT_VERBOSE} = '1'; $res = EnvAcceptLib::parse_options( ['--log-level', 'error', '--token', 'new_token', '--quiet'], no_set_env => 1, ); is($res->settings->{env}->{log_level}, 'error', 'command line overrides env'); is($res->settings->{env}->{token}, 'new_token', 'command line overrides env token'); is($res->settings->{env}->{quiet}, 1, 'quiet explicitly set'); is($res->env->{ACCEPT_VERBOSE}, 0, '!VERBOSE negated: quiet=1 -> VERBOSE=0'); }; # ============================================================================ # Test: Argument groups for passing structured data # ============================================================================ subtest 'Argument groups: structured args with :{ }:' => sub { my $res = AcceptLib::parse_options( [ '--tags', ':{', 'smoke', 'regression', 'integration', '}:', '--jobs', '4', '--tags', 'unit', ], groups => {':{' => '}:'}, ); is( $res->settings->{runner}->{tags}, ['smoke', 'regression', 'integration', 'unit'], 'group args expanded into list, then additional value appended', ); is($res->settings->{runner}->{jobs}, '4', 'non-group option still works'); }; # ============================================================================ # Test: JSON values inline # ============================================================================ subtest 'JSON values: inline JSON arrays and objects' => sub { my $res = AcceptLib::parse_options([ '--includes', '["src/lib","vendor/lib"]', '--env-vars', '{"PERL5LIB":"/opt/lib","HOME":"/tmp"}', ]); is( $res->settings->{runner}->{includes}, ['src/lib', 'vendor/lib'], 'JSON array parsed into list', ); is( $res->settings->{runner}->{env_vars}, {PERL5LIB => '/opt/lib', HOME => '/tmp'}, 'JSON object parsed into map', ); }; # ============================================================================ # Test: Defaults, autofill, and unset options # ============================================================================ subtest 'Defaults and autofill: no args produces correct defaults' => sub { my $res = AcceptLib::parse_options([]); is($res->settings->{display}->{verbose}, 0, 'count defaults to 0'); is($res->settings->{display}->{color}, 1, 'bool default true'); is($res->settings->{display}->{formatter}, undef, 'auto with no default stays undef'); is($res->settings->{runner}->{jobs}, 1, 'scalar default'); is($res->settings->{runner}->{includes}, [], 'list defaults to empty'); is($res->settings->{runner}->{env_vars}, undef, 'map with no default stays undef'); is($res->settings->{runner}->{timeout}, 60, 'scalar default with normalize'); is($res->settings->{runner}->{retry}, 0, 'bool default false'); }; subtest 'Autofill: auto option without value uses autofill' => sub { my $res = AcceptLib::parse_options(['-F']); is($res->settings->{display}->{formatter}, 'Default', 'autofill used for -F without arg'); $res = AcceptLib::parse_options(['-F=Custom']); is($res->settings->{display}->{formatter}, 'Custom', '-F=Custom uses explicit value'); }; # ============================================================================ # Test: alt_no forms (--no-colour as alias for --no-color) # ============================================================================ subtest 'alt_no: --no-colour as alias for disabling color' => sub { my $res = AcceptLib::parse_options(['--no-colour']); is($res->settings->{display}->{color}, 0, '--no-colour disables color via alt_no'); }; # ============================================================================ # Test: Allowed values validation # ============================================================================ subtest 'Allowed values: jobs must be numeric' => sub { like( dies { AcceptLib::parse_options(['--jobs', 'lots']) }, qr/Invalid value.*'lots'/, 'non-numeric jobs value rejected', ); ok( lives { AcceptLib::parse_options(['--jobs', '16']) }, 'numeric jobs value accepted', ); }; # ============================================================================ # Test: Skip and stop behaviors combined # ============================================================================ subtest 'Skip non-opts with stop: file args mixed with options' => sub { my $res = AcceptLib::parse_options( ['-v', 'test1.t', '--jobs', '4', 'test2.t', '--', 'extra'], skip_non_opts => 1, stops => ['--'], ); is($res->settings->{display}->{verbose}, 1, 'option parsed'); is($res->settings->{runner}->{jobs}, '4', 'option with arg parsed'); is($res->skipped, ['test1.t', 'test2.t'], 'non-opts skipped'); is($res->stop, '--', 'stopped at --'); is($res->remains, ['extra'], 'args after stop preserved'); }; # ============================================================================ # Test: include_options from another library # ============================================================================ subtest 'Include options from external library' => sub { package AcceptWithPlugin; use Getopt::Yath; include_options('AcceptLib'); include_options('AcceptPluginLib'); package main; my $res = AcceptWithPlugin::parse_options(['-v', '--plugin-opt', 'custom', '--jobs', '8']); is($res->settings->{display}->{verbose}, 1, 'included display option works'); is($res->settings->{runner}->{jobs}, '8', 'included runner option works'); is($res->settings->{plugin}->{plugin_opt}, 'custom', 'included plugin option works'); }; # ============================================================================ # Test: Multiple option groups with different prefixes # ============================================================================ subtest 'Prefixed options: runner and display prefixes' => sub { package PrefixAcceptLib; use Getopt::Yath; option_group {category => 'Runner', group => 'runner', prefix => 'runner', no_module => 1} => sub { option timeout => (type => 'Scalar', default => 30, description => 'Runner timeout'); option verbose => (type => 'Bool', description => 'Runner verbose'); }; option_group {category => 'Formatter', group => 'fmt', prefix => 'fmt', no_module => 1} => sub { option timeout => (type => 'Scalar', default => 10, description => 'Formatter timeout'); option verbose => (type => 'Bool', description => 'Formatter verbose'); }; package main; my $res = PrefixAcceptLib::parse_options([ '--runner-timeout', '60', '--fmt-verbose', '--runner-verbose', '--fmt-timeout', '5', ]); is($res->settings->{runner}->{timeout}, '60', 'runner-prefixed timeout'); is($res->settings->{runner}->{verbose}, 1, 'runner-prefixed verbose'); is($res->settings->{fmt}->{timeout}, '5', 'fmt-prefixed timeout'); is($res->settings->{fmt}->{verbose}, 1, 'fmt-prefixed verbose'); }; # ============================================================================ # Test: Complex Map usage with multiple forms # ============================================================================ subtest 'Map: key=value, JSON, split_on, and clearing' => sub { my $res = AcceptLib::parse_options([ '-E', 'PATH=/usr/bin', '-EHOME=/home/test', '--env-vars=SHELL=/bin/bash', '--no-env-vars', '-E', 'TERM=xterm', ]); is( $res->settings->{runner}->{env_vars}, {TERM => 'xterm'}, 'map: set, set, set, clear all, then re-set produces only last value', ); }; # ============================================================================ # Test: BoolMap pattern matching in realistic scenario # ============================================================================ subtest 'BoolMap: feature flags toggled by pattern' => sub { package FeatureFlagLib; use Getopt::Yath; option_group {category => 'Features', group => 'features', no_module => 1} => sub { option flags => ( type => 'BoolMap', pattern => qr/feature-(.+)/, description => 'Feature flags', ); }; package main; my $res = FeatureFlagLib::parse_options([ '--feature-fork', '--feature-preload', '--no-feature-preload', '--feature-timeout', ]); is( $res->settings->{features}->{flags}, {fork => 1, preload => 0, timeout => 1}, 'BoolMap: features toggled on and off by pattern', ); }; # ============================================================================ # Test: Post-processors mutating state # ============================================================================ subtest 'Post-processors: validate and transform after parsing' => sub { package PostProcLib; use Getopt::Yath; option_group {category => 'PP', group => 'pp', no_module => 1} => sub { option pp_jobs => (type => 'Scalar', default => 1, description => 'Jobs'); option pp_mode => (type => 'Scalar', default => 'auto', description => 'Mode'); }; option_post_process -10 => sub { my ($instance, $state) = @_; my $jobs = $state->settings->pp->pp_jobs; # If mode is 'auto' and jobs > 1, switch to 'parallel' if ($state->settings->pp->pp_mode eq 'auto' && $jobs > 1) { $state->settings->pp->pp_mode('parallel'); } }; option_post_process 10 => sub { my ($instance, $state) = @_; # Verify mode was set by the earlier post-processor $state->settings->pp->create_option('mode_verified', 1) if $state->settings->pp->pp_mode eq 'parallel'; }; package main; my $res = PostProcLib::parse_options(['--pp-jobs', '4']); is($res->settings->{pp}->{pp_mode}, 'parallel', 'post-processor changed mode'); is($res->settings->{pp}->{mode_verified}, 1, 'second post-processor saw the change'); }; # ============================================================================ # Test: Applicable options: some options hidden based on state # ============================================================================ subtest 'Applicable: options conditionally available' => sub { package ApplicableLib; use Getopt::Yath; option_group {category => 'Applicable', group => 'app', no_module => 1} => sub { option mode => ( type => 'Scalar', default => 'simple', description => 'Run mode', ); option workers => ( type => 'Scalar', default => 4, applicable => sub { my ($self, $opts, $settings) = @_; $settings && $settings->check_group('app') && $settings->app->check_option('mode') && $settings->app->mode eq 'parallel' }, description => 'Number of workers (only in parallel mode)', ); }; package main; # In simple mode, --workers should not be recognized my $res = ApplicableLib::parse_options(['--mode', 'simple'], skip_invalid_opts => 1); is($res->settings->{app}->{mode}, 'simple', 'mode set'); ok(!exists $res->settings->{app}->{workers}, 'workers not populated in simple mode'); # Rebuild with parallel mode pre-set my $settings = Getopt::Yath::Settings->new({app => {mode => 'parallel'}}); $res = ApplicableLib::parse_options(['--workers', '8'], settings => $settings); is($res->settings->{app}->{workers}, '8', 'workers available in parallel mode'); }; # ============================================================================ # Test: Realistic yath-like command: yath test -j4 -vvv -Ilib -D --retry t/ # ============================================================================ subtest 'Realistic yath command line' => sub { package YathLike; use Getopt::Yath; option_group {category => 'Yath', group => 'yath', no_module => 1} => sub { option jobs => (type => 'Scalar', short => 'j', default => 1, description => 'Jobs'); option verbose => (type => 'Count', short => 'v', initialize => 0, description => 'Verbose'); option include => (type => 'List', short => 'I', description => 'Include paths'); option dev_lib => ( type => 'AutoList', short => 'D', autofill => sub { 'lib', 'blib/lib', 'blib/arch' }, description => 'Dev libraries', ); option retry => (type => 'Bool', default => 0, description => 'Retry failed'); option color => (type => 'Bool', default => 1, description => 'Color output'); option env_var => (type => 'Map', short => 'E', description => 'Env vars'); }; package main; my $res = YathLike::parse_options( ['-j4', '-vvv', '-Ilib', '-D', '--retry', '--no-color', '-E', 'HARNESS_ACTIVE=1', 't/', 'xt/'], skip_non_opts => 1, stops => ['--'], ); is($res->settings->{yath}->{jobs}, '4', 'jobs=4'); is($res->settings->{yath}->{verbose}, 3, 'verbose=3'); is($res->settings->{yath}->{include}, ['lib'], 'single include'); is($res->settings->{yath}->{dev_lib}, ['lib', 'blib/lib', 'blib/arch'], 'autofill dev libs'); is($res->settings->{yath}->{retry}, 1, 'retry enabled'); is($res->settings->{yath}->{color}, 0, 'color disabled'); is($res->settings->{yath}->{env_var}, {HARNESS_ACTIVE => '1'}, 'env var set'); is($res->skipped, ['t/', 'xt/'], 'test dirs skipped'); }; # ============================================================================ # Test: Everything at once — the kitchen sink # ============================================================================ subtest 'Kitchen sink: every feature in one command line' => sub { package KitchenSink; use Getopt::Yath; my @trigger_log; option_group {category => 'All', group => 'all', no_module => 1} => sub { option bool_opt => (type => 'Bool', short => 'b', default => 0, description => 'A bool'); option count_opt => (type => 'Count', short => 'c', initialize => 0, description => 'A count'); option scalar_opt => ( type => 'Scalar', short => 's', default => 'def', normalize => sub { lc $_[0] }, trigger => sub { push @trigger_log, $_[2] }, description => 'A scalar', ); option list_opt => (type => 'List', short => 'l', split_on => ',', description => 'A list'); option map_opt => (type => 'Map', short => 'm', description => 'A map'); option auto_opt => (type => 'Auto', short => 'a', autofill => 'yes', default => 'no', description => 'An auto'); }; option_post_process(sub { my ($inst, $state) = @_; my $g = $state->settings->all; if ($g->count_opt > 2) { $g->create_option('was_very_verbose', 1); } }); package main; @trigger_log = (); my $res = KitchenSink::parse_options( [ '-b', # bool on '-ccc', # count = 3 '-s=UPPER', # scalar with normalize '--no-scalar-opt', # clear scalar '-s', 'Final', # set scalar again '-l', 'x,y', # list with split '-l', 'z', # append to list '-m', 'k=v', # map entry '--map-opt', '{"a":"b"}', # map JSON '-a', # auto with autofill 'positional', # non-opt '--', 'rest', # stop ], skip_non_opts => 1, stops => ['--'], ); is($res->settings->{all}->{bool_opt}, 1, 'bool on'); is($res->settings->{all}->{count_opt}, 3, 'count = 3'); is($res->settings->{all}->{scalar_opt}, 'final', 'scalar normalized, last wins'); is($res->settings->{all}->{list_opt}, [qw/x y z/], 'list split and appended'); is($res->settings->{all}->{map_opt}, {k => 'v', a => 'b'}, 'map from key=val and JSON merged'); is($res->settings->{all}->{auto_opt}, 'yes', 'auto used autofill'); is($res->settings->{all}->{was_very_verbose}, 1, 'post-processor ran'); is($res->skipped, ['positional'], 'positional skipped'); is($res->stop, '--', 'stopped at --'); is($res->remains, ['rest'], 'remaining preserved'); # Trigger should have fired for: initialize, clear, two sets ok(@trigger_log >= 2, 'trigger fired multiple times'); }; done_testing; getopt_yath.t100644001750001750 5366115165554207 17530 0ustar00exodistexodist000000000000Getopt-Yath-2.000011/tuse Test2::V0 -target => 'Getopt::Yath'; use Getopt::Yath; imported_ok qw/options option include_options option_post_process option_group parse_options/; delete $ENV{EXAMPLEA}; delete $ENV{EXAMPLEB}; delete $ENV{EXAMPLEC}; option_group {category => 'This is the category', group => 'foo', no_module => 1} => sub { like( dies { parse_options(['--xyz']) }, qr/'--xyz' is not a valid option\./, "Cannot use an invalid option", ); ok( lives { parse_options(['--xyz'], skip_invalid_opts => 1) }, "Skip invalid", ); subtest Bool => sub { my $trigger = 0; option foo => ( type => 'Bool', short => 'f', default => 1, description => 'foo boolean', trigger => sub { $trigger++ } ); like( parse_options([]), {settings => {foo => {foo => 1}}}, "A bool with a default of 1 and nothing provided" ); ok($trigger, "Triggered"); $trigger = 0; like( parse_options(['--foo']), {settings => {foo => {foo => 1}}}, "Parsed a bool with a default of 1 turned on" ); ok($trigger, "triggered"); $trigger = 0; like( parse_options(['-f']), {settings => {foo => {foo => 1}}}, "Parsed a bool with a default of 1 turned on" ); ok($trigger, "triggered"); $trigger = 0; like( dies { parse_options(['-f=0']) }, qr/Use of 'arg=val' form is not allowed in option '-f=0'\. Arguments are not allowed for this option type\./, "Boolean types do not allow an argument" ); ok($trigger, "triggered"); $trigger = 0; like( parse_options(['--no-foo']), {settings => {foo => {foo => 0}}}, "Parsed a bool with a default of 1 turned off" ); ok($trigger, "triggered"); $trigger = 0; option bar => ( type => 'Bool', default => 0, description => 'bar boolean', ); like( parse_options([]), {settings => {foo => {bar => 0}}}, "A bool with a default of 0 and nothing provided" ); like( parse_options(['--bar']), {settings => {foo => {bar => 1}}}, "Parsed a bool with a default of 0 turned on" ); like( parse_options(['--no-bar']), {settings => {foo => {bar => 0}}}, "Parsed a bool with a default of 0 turned off" ); option baz => ( type => 'Bool', description => 'baz boolean', ); like( parse_options([]), {settings => {foo => {baz => 0}}}, "A bool with no default and nothing provided" ); like( parse_options(['--baz']), {settings => {foo => {baz => 1}}}, "Parsed a bool with no default, turned on" ); like( parse_options(['--no-baz']), {settings => {foo => {baz => 0}}}, "Parsed a bool with no default, turned off" ); }; subtest Count => sub { option cnt => ( type => 'Count', short => 'c', alt => ['count'], initialize => 2, description => 'A counter', ); like( parse_options([]), {settings => {foo => {cnt => 2}}}, "Nothing provided, initialized to 2" ); like( parse_options(['--no-count']), {settings => {foo => {cnt => 0}}}, "disabled via --no-count" ); like( parse_options(['--no-count', '-ccc']), {settings => {foo => {cnt => 3}}}, "disabled via --no-count, but then seen 3 times as short value" ); like( parse_options(['--no-count', '-cc', '-c=-1']), {settings => {foo => {cnt => -1}}}, "disabled via --no-count, but then seen 2 times as short value, but last one sets a specific value" ); like( parse_options(['-c=5', '--count', '-c']), {settings => {foo => {cnt => 7}}}, "Set a value, then add 2 more" ); like( parse_options(['-c=0']), {settings => {foo => {cnt => 0}}}, "Set to 0" ); }; subtest Scalar => sub { option scl => ( type => 'Scalar', short => 's', alt => ['scalar'], default => 'I am a scalar', description => 'A scalar', ); like( parse_options([]), {settings => {foo => {scl => 'I am a scalar'}}}, "Nothing provided, default used" ); like( parse_options(['-s' => 'foo']), {settings => {foo => {scl => 'foo'}}}, "set to foo, short form" ); like( parse_options(['-s=foo']), {settings => {foo => {scl => 'foo'}}}, "set to foo, short assign form" ); like( parse_options(['--scl' => 'foo']), {settings => {foo => {scl => 'foo'}}}, "set to foo, long form" ); like( parse_options(['--scalar=foo']), {settings => {foo => {scl => 'foo'}}}, "set to foo, long assign form" ); like( dies { parse_options(['--scalar']) }, qr/No argument provided to '--scalar'\./, "Need a value" ); like( parse_options(['--no-scalar']), {settings => {foo => {scl => undef}}}, "Disabled" ); option scl2 => ( type => 'Scalar', description => 'Another scalar', ); like( parse_options([]), {settings => {foo => {scl2 => undef}}}, "Nothing provided, default to undef" ); }; subtest Auto => sub { option aut => ( type => 'Auto', short => 'a', alt => ['auto'], autofill => 'xxx', default => 'yyy', description => 'An auto-field', ); like( parse_options([]), {settings => {foo => {aut => 'yyy'}}}, "Nothing provided, default used" ); like( parse_options(['-a']), {settings => {foo => {aut => 'xxx'}}}, "Short with no arg, use autofill" ); like( parse_options(['-afub']), {settings => {foo => {aut => 'fub'}}}, "Short with arg, no space and no =" ); like( parse_options(['-a=foo']), {settings => {foo => {aut => 'foo'}}}, "Short with arg" ); like( parse_options(['--no-aut']), {settings => {foo => {aut => undef}}}, "--no form" ); like( parse_options(['--aut', 'foo'], skip_non_opts => 1), {settings => {foo => {aut => 'xxx'}}, skipped => ['foo']}, "Does not slurp next arg" ); option aut2 => ( type => 'Auto', autofill => 'zzz' ); like( parse_options([]), {settings => {foo => {aut2 => undef}}}, "Nothing provided" ); like( dies { option aut3 => ( type => 'Auto' ) }, qr/'autofill' is required/, "autofill is required for auto type" ); }; subtest Map => sub { option map => ( type => 'Map', short => 'm', default => sub { 'yyy' => 'xxx' }, split_on => ',', description => 'A map', ); like( parse_options([]), {settings => {foo => {map => {'yyy' => 'xxx'}}}}, "Nothing provided, default used" ); like( parse_options(['-m' => 'foo=bar']), {settings => {foo => {map => {'foo' => 'bar'}}}}, "Specified a value" ); like( parse_options(['-m=foo=bar']), {settings => {foo => {map => {'foo' => 'bar'}}}}, "Specified a value with =" ); like( parse_options(['-mfoo=bar']), {settings => {foo => {map => {'foo' => 'bar'}}}}, "Specified a value with no gap" ); like( parse_options(['-m' => 'foo=bar,baz=bat', '--map' => 'fruit=pear']), {settings => {foo => {map => {'foo' => 'bar', 'baz' => 'bat', 'fruit' => 'pear'}}}}, "Specified multiple values" ); like( parse_options(['--no-map']), {settings => {foo => {map => {}}}}, "Cleared values" ); }; subtest AutoMap => sub { option auto_map => ( type => 'AutoMap', short => 'A', autofill => sub { 'aaa' => 'bbb' }, default => sub { 'yyy' => 'xxx' }, split_on => ',', description => 'An Auto map', ); like( parse_options([]), {settings => {foo => {auto_map => {'yyy' => 'xxx'}}}}, "Nothing provided, default used" ); like( parse_options(['-A']), {settings => {foo => {auto_map => {'aaa' => 'bbb'}}}}, "Option, but no value, autofill" ); like( parse_options(['-A=foo=bar']), {settings => {foo => {auto_map => {'foo' => 'bar'}}}}, "Specified a value" ); like( dies { parse_options(['-A', 'foo=bar']) }, qr/'foo=bar' is not a valid option\./, "Do not slurp value after space" ); like( parse_options(['-A=foo=bar,baz=bat', '--auto-map=fruit=pear']), {settings => {foo => {auto_map => {'foo' => 'bar', 'baz' => 'bat', 'fruit' => 'pear'}}}}, "Specified multiple values" ); like( parse_options(['--no-auto-map']), {settings => {foo => {auto_map => {}}}}, "Cleared values" ); }; subtest List => sub { option list => ( type => 'List', short => 'l', default => sub { qw/foo bar baz/ }, split_on => ',', description => 'a list', ); like( parse_options([]), {settings => {foo => {list => [qw/foo bar baz/]}}}, "Nothing provided, default used" ); like( parse_options(['-l' => 'xxx']), {settings => {foo => {list => ['xxx']}}}, "Specified a value" ); like( parse_options(['-l' => 'xxx,yyy,baz,bat', '--list' => 'fruit,pear', '-l=bob']), {settings => {foo => {list => ['xxx', 'yyy', 'baz', 'bat', 'fruit','pear','bob']}}}, "Specified multiple values" ); like( parse_options(['--no-list']), {settings => {foo => {list => []}}}, "Cleared values" ); }; subtest AutoList => sub { option auto_list => ( type => 'AutoList', short => 'L', default => sub { qw/foo bar baz/ }, autofill => sub { qw/xxx yyy zzz/ }, split_on => ',', description => 'an auto list', ); like( parse_options([]), {settings => {foo => {auto_list => [qw/foo bar baz/]}}}, "Nothing provided, default used" ); like( parse_options(['-L']), {settings => {foo => {auto_list => [qw/xxx yyy zzz/]}}}, "Provided, but no value, use autofill" ); like( parse_options(['-L=xxx']), {settings => {foo => {auto_list => ['xxx']}}}, "Specified a value" ); like( parse_options(['-L=xxx,yyy,baz,bat', '--auto-list=fruit,pear']), {settings => {foo => {auto_list => ['xxx', 'yyy', 'baz', 'bat', 'fruit','pear']}}}, "Specified multiple values" ); like( parse_options(['--no-auto-list']), {settings => {foo => {auto_list => []}}}, "Cleared values" ); like( dies { parse_options(['-L', 'foo']) }, qr/'foo' is not a valid option\./, "Do not slurp value after space" ); }; subtest stop => sub { my $res = parse_options(['-f', '-L', '--', "-m" => 'do_not=parse', "extra"], stops => ['::', '--'], skip_non_opts => 1); like( $res, {'skipped' => [], 'stop' => '--', 'remains' => ['-m', 'do_not=parse', 'extra']}, "Stopped at '--', got remaining args", ); }; subtest env => sub { option env => ( type => 'Scalar', from_env_vars => [qw/EXAMPLEA EXAMPLEB EXAMPLEC/], clear_env_vars => ['EXAMPLEA'], set_env_vars => ['EXAMPLEC'], ); local $ENV{EXAMPLEA} = "A"; local $ENV{EXAMPLEB} = "B"; local $ENV{EXAMPLEC} = "C"; like( parse_options([]), {settings => {foo => {env => 'A'}}, env => {EXAMPLEA => undef, EXAMPLEC => 'A'}}, "Set by env var" ); ok(!$ENV{EXAMPLEA}, "Clear env EXAMPLEA"); is($ENV{EXAMPLEC}, 'A', "Set EXAMPLEC"); like( parse_options([]), {settings => {foo => {env => 'B'}}, env => {EXAMPLEA => undef, EXAMPLEC => 'B'}}, "Set by another env var" ); is($ENV{EXAMPLEC}, 'B', "Set EXAMPLEC"); }; subtest env_neg => sub { option env_neg => ( type => 'Scalar', from_env_vars => [qw/!EXAMPLEA/], clear_env_vars => ['EXAMPLEA'], set_env_vars => ['!EXAMPLEX'], ); local $ENV{EXAMPLEA} = 1; local $ENV{EXAMPLEX}; like( parse_options([]), {settings => {foo => {env_neg => F()}}, env => {EXAMPLEA => undef, EXAMPLEX => T()}}, "Set by env var" ); ok(!$ENV{EXAMPLEA}, "Clear env EXAMPLEA"); is($ENV{EXAMPLEX}, T(), "Set EXAMPLEX"); local $ENV{EXAMPLEA} = 0; local $ENV{EXAMPLEX}; like( parse_options([]), {settings => {foo => {env_neg => T()}}, env => {EXAMPLEA => undef, EXAMPLEX => F()}}, "Set by env var" ); ok(!$ENV{EXAMPLEA}, "Clear env EXAMPLEA"); is($ENV{EXAMPLEX}, F(), "Set EXAMPLEX"); }; subtest post => sub { my @order; option_post_process(sub { push @order => 'A' }); option_post_process(-5 => sub { push @order => 'B' }); option_post_process(5 => sub { push @order => 'C' }); option_post_process(5 => sub { my ($options, $state) = @_; push @order => 'D'; like( $state, { cleared => {}, env => {}, remains => [], settings => {}, skipped => [], }, "State was passed in", ); }); parse_options([]); is(\@order, [qw/B A C D/], "Callbacks ran in order"); }; subtest cli_docs => sub { local $ENV{TABLE_TERM_SIZE} = 120; # Note this was done by printing the value and spot-checking it, so it # is a test that the doc output does not accidentally change, there # could be bugs that need to be fixed that mean this needs to change. is(options->docs('cli'), <<" EOT", "Got expected docs"); This is the category (foo) [aut] -a -aARG -a=ARG --aut --auto --aut=ARG --auto=ARG --no-aut An auto-field default: yyy autofill: xxx [aut2] --aut2 --aut2=ARG --no-aut2 NO DESCRIPTION - FIX ME autofill: zzz [auto-list] -L -LARG -L=ARG -L='["json","list"]' --auto-list --auto-list=ARG --auto-list='["json","list"]' --no-auto-list an auto list Note: Can be specified multiple times [auto-map] -A -Akey=val -A=key=val --auto-map --auto-map=key=val --no-auto-map An Auto map Note: Can be specified multiple times [bar] --bar --no-bar bar boolean default: 0 [baz] --baz --no-baz baz boolean [cnt] -c -cc -ccc.. -c=COUNT --cnt --count --cnt=COUNT --count=COUNT --no-cnt A counter Note: Can be specified multiple times, counter bumps each time it is used. [env] --env ARG --env=ARG --no-env NO DESCRIPTION - FIX ME Can also be set with the following environment variables: EXAMPLEA, EXAMPLEB, EXAMPLEC The following environment variables will be cleared after arguments are processed: EXAMPLEA The following environment variables will be set after arguments are processed: EXAMPLEC [env-neg] --env-neg ARG --env-neg=ARG --no-env-neg NO DESCRIPTION - FIX ME Can also be set with the following environment variables: !EXAMPLEA The following environment variables will be cleared after arguments are processed: EXAMPLEA The following environment variables will be set after arguments are processed: !EXAMPLEX [foo] -f --foo --no-foo foo boolean default: 1 [list] -lARG -l ARG -l=ARG -l '["json","list"]' -l='["json","list"]' --list ARG --list=ARG --list '["json","list"]' --list='["json","list"]' --no-list a list Note: Can be specified multiple times [map] -m key=val -m=key=val -mkey=value -m '{"json":"hash"}' -m='{"json":"hash"}' --map key=val --map=key=val --map '{"json":"hash"}' --map='{"json":"hash"}' --no-map A map Note: Can be specified multiple times [scl] -sARG -s ARG -s=ARG --scl ARG --scl=ARG --scalar ARG --scalar=ARG --no-scl A scalar default: I am a scalar [scl2] --scl2 ARG --scl2=ARG --no-scl2 Another scalar EOT }; subtest pod_docs => sub { local $ENV{TABLE_TERM_SIZE} = 120; # Note this was done by printing the value and spot-checking it, so it # is a test that the doc output does not accidentally change, there # could be bugs that need to be fixed that mean this needs to change. is(options->docs('pod', groups => {':{' => '}:'}, head => 3), <<" EOT", "Got expected docs"); =head3 This is the category =over 4 =item -a =item -aARG =item -a=ARG =item --aut =item --auto =item --aut=ARG =item --auto=ARG =item --no-aut An auto-field =item --aut2 =item --aut2=ARG =item --no-aut2 NO DESCRIPTION - FIX ME =item -L =item -LARG =item -L=ARG =item -L='["json","list"]' =item -L:{ ARG1 ARG2 ... }: =item -L=:{ ARG1 ARG2 ... }: =item --auto-list =item --auto-list=ARG =item --auto-list='["json","list"]' =item --auto-list=:{ ARG1 ARG2 ... }: =item --no-auto-list an auto list Note: Can be specified multiple times =item -A =item -Akey=val =item -A=key=val =item --auto-map =item --auto-map=key=val =item --no-auto-map An Auto map Note: Can be specified multiple times =item --bar =item --no-bar bar boolean =item --baz =item --no-baz baz boolean =item -c =item -cc =item -ccc.. =item -c=COUNT =item --cnt =item --count =item --cnt=COUNT =item --count=COUNT =item --no-cnt A counter Note: Can be specified multiple times, counter bumps each time it is used. =item --env ARG =item --env=ARG =item --no-env NO DESCRIPTION - FIX ME Can also be set with the following environment variables: C, C, C The following environment variables will be cleared after arguments are processed: C The following environment variables will be set after arguments are processed: C =item --env-neg ARG =item --env-neg=ARG =item --no-env-neg NO DESCRIPTION - FIX ME Can also be set with the following environment variables: C The following environment variables will be cleared after arguments are processed: C The following environment variables will be set after arguments are processed: C =item -f =item --foo =item --no-foo foo boolean =item -lARG =item -l ARG =item -l=ARG =item -l '["json","list"]' =item -l='["json","list"]' =item -l:{ ARG1 ARG2 ... }: =item -l :{ ARG1 ARG2 ... }: =item -l=:{ ARG1 ARG2 ... }: =item --list ARG =item --list=ARG =item --list '["json","list"]' =item --list='["json","list"]' =item --list :{ ARG1 ARG2 ... }: =item --list=:{ ARG1 ARG2 ... }: =item --no-list a list Note: Can be specified multiple times =item -m key=val =item -m=key=val =item -mkey=value =item -m '{"json":"hash"}' =item -m='{"json":"hash"}' =item -m:{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }: =item -m :{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }: =item -m=:{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }: =item --map key=val =item --map=key=val =item --map '{"json":"hash"}' =item --map='{"json":"hash"}' =item --map :{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }: =item --map=:{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }: =item --no-map A map Note: Can be specified multiple times =item -sARG =item -s ARG =item -s=ARG =item --scl ARG =item --scl=ARG =item --scalar ARG =item --scalar=ARG =item --no-scl A scalar =item --scl2 ARG =item --scl2=ARG =item --no-scl2 Another scalar =back EOT }; subtest modules => sub { package Foo::Bar; main::option_group({no_module => 0} => sub { package main; option(mod => (type => 'Bool')); like( parse_options(['--mod']), {modules => {'Foo::Bar' => 1}}, "Option got package name when no_module is not set, and we bumped it when we used the flag from it" ); like( parse_options([]), {modules => in_set({'Foo::Bar' => FDNE()}, FDNE())}, "Did not set module as used" ); }); }; }; done_testing; option_types.t100644001750001750 4165515165554207 17735 0ustar00exodistexodist000000000000Getopt-Yath-2.000011/tuse Test2::V0; use File::Temp qw/tempdir/; use File::Path qw/mkpath/; use Getopt::Yath; # Clean env delete $ENV{$_} for qw/OT_TEST_A OT_TEST_B/; subtest 'BoolMap pattern matching' => sub { package BoolMapTest; use Getopt::Yath; option_group {category => 'BoolMap Tests', group => 'boolmap', no_module => 1} => sub { option features => ( type => 'BoolMap', pattern => qr/feature-(.+)/, description => 'Feature flags', ); }; package main; my $res = BoolMapTest::parse_options(['--feature-foo', '--feature-bar', '--no-feature-baz']); is( $res->settings->{boolmap}->{features}, {foo => 1, bar => 1, baz => 0}, 'BoolMap matches patterns and respects --no- prefix', ); $res = BoolMapTest::parse_options(['--no-features']); is( $res->settings->{boolmap}->{features}, {}, 'BoolMap --no clears all values', ); }; subtest 'PathList glob expansion' => sub { my $dir = tempdir(CLEANUP => 1); for my $name (qw/alpha.txt beta.txt gamma.log/) { open my $fh, '>', "$dir/$name" or die "Cannot create $dir/$name: $!"; close $fh; } package PathListTest; use Getopt::Yath; option_group {category => 'PathList Tests', group => 'pathlist', no_module => 1} => sub { option files => ( type => 'PathList', description => 'File list', ); }; package main; my $res = PathListTest::parse_options(['--files', "$dir/*.txt"]); my @files = sort @{$res->settings->{pathlist}->{files}}; is(\@files, ["$dir/alpha.txt", "$dir/beta.txt"], 'PathList expands globs'); $res = PathListTest::parse_options(['--files', "$dir/gamma.log"]); is($res->settings->{pathlist}->{files}, ["$dir/gamma.log"], 'PathList passes non-glob through'); }; subtest 'List JSON parsing' => sub { package ListJsonTest; use Getopt::Yath; option_group {category => 'List JSON', group => 'listjson', no_module => 1} => sub { option items => ( type => 'List', description => 'Items list', ); }; package main; my $res = ListJsonTest::parse_options(['--items', '["aaa","bbb","ccc"]']); is( $res->settings->{listjson}->{items}, ['aaa', 'bbb', 'ccc'], 'List parses JSON array input', ); }; subtest 'Map JSON parsing' => sub { package MapJsonTest; use Getopt::Yath; option_group {category => 'Map JSON', group => 'mapjson', no_module => 1} => sub { option kvs => ( type => 'Map', description => 'Key-value pairs', ); }; package main; my $res = MapJsonTest::parse_options(['--kvs', '{"x":"1","y":"2"}']); is( $res->settings->{mapjson}->{kvs}, {x => '1', y => '2'}, 'Map parses JSON object input', ); }; subtest 'Map custom key_on delimiter' => sub { package MapKeyOnTest; use Getopt::Yath; option_group {category => 'Map KeyOn', group => 'mapkeyon', no_module => 1} => sub { option pairs => ( type => 'Map', key_on => ':', description => 'Colon-separated pairs', ); }; package main; my $res = MapKeyOnTest::parse_options(['--pairs', 'host:localhost']); is( $res->settings->{mapkeyon}->{pairs}, {host => 'localhost'}, 'Map uses custom key_on delimiter', ); }; subtest 'Bool set_env_vars' => sub { package BoolEnvTest; use Getopt::Yath; option_group {category => 'Bool Env', group => 'boolenv', no_module => 1} => sub { option loud => ( type => 'Bool', set_env_vars => ['OT_TEST_A'], description => 'Loud mode', ); }; package main; local $ENV{OT_TEST_A}; my $res = BoolEnvTest::parse_options(['--loud']); is($res->env->{OT_TEST_A}, 1, 'Bool set_env_vars sets env to 1 when true'); is($ENV{OT_TEST_A}, 1, 'ENV actually set'); local $ENV{OT_TEST_A}; $res = BoolEnvTest::parse_options(['--loud'], no_set_env => 1); is($res->env->{OT_TEST_A}, 1, 'env recorded in state'); ok(!$ENV{OT_TEST_A}, 'ENV not set with no_set_env'); }; subtest 'Count set_env_vars' => sub { package CountEnvTest; use Getopt::Yath; option_group {category => 'Count Env', group => 'cntenv', no_module => 1} => sub { option verbosity => ( type => 'Count', short => 'V', set_env_vars => ['OT_TEST_B'], initialize => 0, description => 'Verbosity level', ); }; package main; local $ENV{OT_TEST_B}; my $res = CountEnvTest::parse_options(['-VVV']); is($res->env->{OT_TEST_B}, 3, 'Count set_env_vars captures counter value'); }; subtest 'Scalar with allowed_values at parse time' => sub { package ScalarAVTest; use Getopt::Yath; option_group {category => 'Scalar AV', group => 'sav', no_module => 1} => sub { option level => ( type => 'Scalar', allowed_values => ['low', 'medium', 'high'], description => 'Level setting', ); }; package main; my $res = ScalarAVTest::parse_options(['--level', 'medium']); is($res->settings->{sav}->{level}, 'medium', 'valid allowed_values accepted'); like( dies { ScalarAVTest::parse_options(['--level', 'extreme']) }, qr/Invalid value.*'extreme'/, 'invalid allowed_values rejected at parse time', ); }; subtest 'Scalar with normalize' => sub { package NormTest; use Getopt::Yath; option_group {category => 'Norm', group => 'norm', no_module => 1} => sub { option mode => ( type => 'Scalar', normalize => sub { lc $_[0] }, description => 'Mode', ); }; package main; my $res = NormTest::parse_options(['--mode', 'UPPER']); is($res->settings->{norm}->{mode}, 'upper', 'normalize callback applied during parsing'); }; subtest 'maybe option attribute' => sub { package MaybeTest; use Getopt::Yath; option_group {category => 'Maybe', group => 'maybe', no_module => 1} => sub { option optional => ( type => 'Bool', maybe => 1, description => 'An optional bool', ); option opt_list => ( type => 'List', maybe => 1, description => 'An optional list', ); }; package main; my $res = MaybeTest::parse_options([]); is($res->settings->{maybe}->{optional}, undef, 'maybe Bool has no default'); is($res->settings->{maybe}->{opt_list}, undef, 'maybe List has no initial value'); }; subtest 'List JSON parse error' => sub { skip_all "Perl $] has unreliable \$@ handling" if "$]" < 5.014; package ListJsonErrTest; use Getopt::Yath; option_group {category => 'LJSON Err', group => 'ljerr', no_module => 1} => sub { option bad_json_list => ( type => 'List', description => 'Bad JSON list', ); }; package main; # Input must match /^\s*\[.*\]\s*$/s to trigger JSON parsing like( dies { ListJsonErrTest::parse_options(['--bad-json-list', '[invalid json]']) }, qr/Could not decode JSON string/, 'List dies on invalid JSON array', ); }; subtest 'Map JSON parse error' => sub { skip_all "Perl $] has unreliable \$@ handling" if "$]" < 5.014; package MapJsonErrTest; use Getopt::Yath; option_group {category => 'MJSON Err', group => 'mjerr', no_module => 1} => sub { option bad_json_map => ( type => 'Map', description => 'Bad JSON map', ); }; package main; like( dies { MapJsonErrTest::parse_options(['--bad-json-map', '{invalid json}']) }, qr/Could not decode JSON string/, 'Map dies on invalid JSON object', ); }; subtest 'Map normalize_value with multiple inputs' => sub { package MapMultiInputTest; use Getopt::Yath; option_group {category => 'Map Multi', group => 'mapmulti', no_module => 1} => sub { option multi_map => ( type => 'Map', normalize => sub { @_ }, description => 'Multi-input map', ); }; package main; # When normalize_value gets >1 args, it calls SUPER::normalize_value directly my $opt = MapMultiInputTest::options->options->[0]; my %result = $opt->normalize_value('key', 'val'); is(\%result, {key => 'val'}, 'Map normalize_value with >1 inputs passes through to SUPER'); }; subtest 'List with from_env_vars' => sub { package ListEnvTest; use Getopt::Yath; option_group {category => 'List Env', group => 'listenv', no_module => 1} => sub { option env_list => ( type => 'List', from_env_vars => ['GETOPT_LIST_TEST_A', 'GETOPT_LIST_TEST_B'], description => 'Env list', ); }; package main; local $ENV{GETOPT_LIST_TEST_A} = 'aval'; local $ENV{GETOPT_LIST_TEST_B} = 'bval'; my $res = ListEnvTest::parse_options([]); is($res->settings->{listenv}->{env_list}, ['aval', 'bval'], 'List collects from multiple env vars'); }; subtest 'Map with from_env_vars' => sub { package MapEnvTest; use Getopt::Yath; option_group {category => 'Map Env', group => 'mapenv', no_module => 1} => sub { option env_map => ( type => 'Map', from_env_vars => ['GETOPT_MAP_TEST_X'], description => 'Env map', ); }; package main; local $ENV{GETOPT_MAP_TEST_X} = 'xval'; my $res = MapEnvTest::parse_options([]); is($res->settings->{mapenv}->{env_map}, {GETOPT_MAP_TEST_X => 'xval'}, 'Map uses env var name as key'); }; subtest 'Bool negated from_env_vars' => sub { package BoolNegEnvTest; use Getopt::Yath; option_group {category => 'Bool Neg Env', group => 'boolnegenv', no_module => 1} => sub { option quiet => ( type => 'Bool', from_env_vars => ['!GETOPT_BOOL_VERBOSE'], description => 'Quiet mode', ); }; package main; local $ENV{GETOPT_BOOL_VERBOSE} = 1; my $res = BoolNegEnvTest::parse_options([]); is($res->settings->{boolnegenv}->{quiet}, 0, 'negated env: VERBOSE=1 means quiet=0'); local $ENV{GETOPT_BOOL_VERBOSE} = 0; $res = BoolNegEnvTest::parse_options([]); is($res->settings->{boolnegenv}->{quiet}, 1, 'negated env: VERBOSE=0 means quiet=1'); }; subtest 'Bool negated set_env_vars' => sub { package BoolNegSetTest; use Getopt::Yath; option_group {category => 'Bool Neg Set', group => 'boolnegset', no_module => 1} => sub { option be_quiet => ( type => 'Bool', set_env_vars => ['!GETOPT_BNEG_VERBOSE'], description => 'Quiet', ); }; package main; local $ENV{GETOPT_BNEG_VERBOSE}; my $res = BoolNegSetTest::parse_options(['--be-quiet']); is($ENV{GETOPT_BNEG_VERBOSE}, 0, 'negated set_env: --be-quiet (true) sets !VERBOSE to 0'); local $ENV{GETOPT_BNEG_VERBOSE}; $res = BoolNegSetTest::parse_options(['--no-be-quiet']); is($ENV{GETOPT_BNEG_VERBOSE}, 1, 'negated set_env: --no-be-quiet (false) sets !VERBOSE to 1'); }; subtest 'Scalar negated set_env_vars' => sub { package ScalarNegSetTest; use Getopt::Yath; option_group {category => 'Scl Neg Set', group => 'sclnegset', no_module => 1} => sub { option flag_val => ( type => 'Scalar', set_env_vars => ['!GETOPT_SNEG_FLAG'], description => 'Flag value', ); }; package main; local $ENV{GETOPT_SNEG_FLAG}; my $res = ScalarNegSetTest::parse_options(['--flag-val', 'truthy']); is($ENV{GETOPT_SNEG_FLAG}, 0, 'negated set_env: truthy scalar value negates to 0'); local $ENV{GETOPT_SNEG_FLAG}; $res = ScalarNegSetTest::parse_options(['--flag-val', '0']); is($ENV{GETOPT_SNEG_FLAG}, 1, 'negated set_env: falsy scalar value negates to 1'); }; subtest 'PathList empty glob' => sub { my $dir = tempdir(CLEANUP => 1); package PathListEmptyTest; use Getopt::Yath; option_group {category => 'PL Empty', group => 'plempty', no_module => 1} => sub { option no_match => ( type => 'PathList', description => 'No matches', ); }; package main; my $res = PathListEmptyTest::parse_options(['--no-match', "$dir/*.zzz_nonexistent"]); is($res->settings->{plempty}->{no_match}, [], 'PathList with no glob matches returns empty'); }; subtest 'BoolMap with custom_matches coderef' => sub { package BoolMapCustomTest; use Getopt::Yath; option_group {category => 'BM Custom', group => 'bmcustom', no_module => 1} => sub { option bm_custom => ( type => 'BoolMap', pattern => qr/bmcflag-(.+)/, custom_matches => sub { my ($self, $input, $state) = @_; return unless $input =~ m/^--(?:no-)?bmcflag-(.+)$/; my $key = $1; my $no = $input =~ m/^--no-/; return ($self, 1, [$key => $no ? 0 : 1]); }, description => 'BoolMap with custom matcher', ); }; package main; my $res = BoolMapCustomTest::parse_options(['--bmcflag-alpha', '--no-bmcflag-beta']); is( $res->settings->{bmcustom}->{bm_custom}, {alpha => 1, beta => 0}, 'BoolMap custom_matches coderef works', ); }; subtest 'Count get_env_value' => sub { my $opt = Getopt::Yath::Option->create( type => 'Count', title => 'cntenv', group => 'g', no_module => 1, trace => [caller], initialize => 0, ); my $val = 3; my @ev = $opt->get_env_value('SOME_VAR', \$val); is($ev[0], 3, 'Count get_env_value returns counter value'); }; subtest 'Scalar get_env_value' => sub { my $opt = Getopt::Yath::Option->create( type => 'Scalar', title => 'sclenv2', group => 'g', no_module => 1, trace => [caller], ); my $val = 'hello'; my @ev = $opt->get_env_value('SOME_VAR', \$val); is($ev[0], 'hello', 'Scalar get_env_value returns value'); }; subtest 'Bool get_env_value negated' => sub { my $opt = Getopt::Yath::Option->create( type => 'Bool', title => 'benv', group => 'g', no_module => 1, trace => [caller], ); my $val = 1; is(($opt->get_env_value('VAR', \$val))[0], 1, 'Bool env value for true'); is(($opt->get_env_value('!VAR', \$val))[0], 0, 'Bool negated env value for true'); $val = 0; is(($opt->get_env_value('VAR', \$val))[0], 0, 'Bool env value for false'); is(($opt->get_env_value('!VAR', \$val))[0], 1, 'Bool negated env value for false'); }; subtest 'List split_on with regex' => sub { package ListSplitRegexTest; use Getopt::Yath; option_group {category => 'List Split', group => 'listsplit', no_module => 1} => sub { option split_items => ( type => 'List', split_on => qr/[;,]/, description => 'Split list', ); }; package main; my $res = ListSplitRegexTest::parse_options(['--split-items', 'a,b;c']); is($res->settings->{listsplit}->{split_items}, [qw/a b c/], 'List splits on regex'); }; subtest 'Map split_on' => sub { package MapSplitTest; use Getopt::Yath; option_group {category => 'Map Split', group => 'mapsplit', no_module => 1} => sub { option split_pairs => ( type => 'Map', split_on => ',', description => 'Split map', ); }; package main; my $res = MapSplitTest::parse_options(['--split-pairs', 'a=1,b=2']); is($res->settings->{mapsplit}->{split_pairs}, {a => 1, b => 2}, 'Map splits on delimiter'); }; subtest 'Count explicit value then increment' => sub { package CountMixTest; use Getopt::Yath; option_group {category => 'Count Mix', group => 'cntmix', no_module => 1} => sub { option cntm => ( type => 'Count', short => 'C', initialize => 0, description => 'Mixed counter', ); }; package main; my $res = CountMixTest::parse_options(['-C=10', '-C', '-C']); is($res->settings->{cntmix}->{cntm}, 12, 'Count: set to 10 then increment twice'); }; subtest 'maybe Map has no initial value' => sub { package MaybeMapTest; use Getopt::Yath; option_group {category => 'Maybe Map', group => 'maybemap', no_module => 1} => sub { option opt_map => ( type => 'Map', maybe => 1, description => 'An optional map', ); }; package main; my $res = MaybeMapTest::parse_options([]); is($res->settings->{maybemap}->{opt_map}, undef, 'maybe Map has no initial value'); }; done_testing; cover_db000755001750001750 015165554207 16141 5ustar00exodistexodist000000000000Getopt-Yath-2.000011digests100644001750001750 3277115165554207 17720 0ustar00exodistexodist000000000000Getopt-Yath-2.000011/cover_db{"de06c227788ebdc5311c41119d79784a":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/x86_64-linux/POSIX.pm","b5de2696c583dfec247af39b45288735":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/Digest/base.pm","6972f29b58f3f7a76f779de0c27a1a4f":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/Iterator/Array.pm","fe4ff21c2abb11cb2c7d44caf10ff9cd":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/SourceHandler/Perl.pm","4380ad3b24ebed284fd397500d639af5":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/x86_64-linux/Cwd.pm","3fe475b2dea671263d6e7c4a45eddc12":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser.pm","5cffe584d935fe851c6d3d782968d0c7":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/x86_64-linux/Fcntl.pm","b4d93a76a68dfbfadd82aaa7b9567d54":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/Source.pm","28be4fb8c2765d040746f4c3f8648598":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Devel/Cover/DB.pm","730724bb51441728ff205171ad4c4dec":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Formatter/Session.pm","af05aa5e8728c95362440dc25e86443f":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Devel/Cover/Statement.pm","71d793b8c9b2259c96570bcc84e232da":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Devel/Cover/Condition_and_2.pm","09d591c375ef8e640bb4a42a3010f81c":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/x86_64-linux/IO/Handle.pm","bddc465e351ad0508581b94ef112d322":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/SelectSaver.pm","451908ba40b2bdaa937f4f9fc732e0a1":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/Result/Bailout.pm","e24166cf8e8c8385d1b4d7b28685cb3e":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/IPC/Open3.pm","fd7875f9683391e3e42ac3462e0b8fe8":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/App/Prove/State.pm","07cff00624a56a64b5e552853259808e":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/feature.pm","2901234298a4e18dc36c153529c3f5ac":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/version/regex.pm","4f0720c740d73cb8c005cb7e8d843103":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/x86_64-linux/attributes.pm","3ff6dd491183ff7f354553c8d123d905":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Devel/Cover/Dumper.pm","019d59c1c70df0cf71992e184573ac7b":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Devel/Cover/DB/IO/JSON.pm","37e1c1c1ee67b77b89fea4fad690f669":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/Result/YAML.pm","6fc331d9568ba8cb3580254ffc07118a":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Scalar/Util.pm","1f68adcfecda180bb0d223a95b3a45ab":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/File/Find.pm","41f3600866a852b03fe303a8e60dcecf":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/x86_64-linux/File/Glob.pm","7188b77aab0b77239438c54560928da7":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Devel/Cover/DB/File.pm","ccd4a1a762d2a2717abe7475a5cfd74c":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Devel/Cover/Condition_or_3.pm","fec1c1985d96c2edd842ff2b71821afb":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/vars.pm","70bfa0403fd841e436e387dcd442abd1":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/version.pm","7fab80c38fc12826ba678441fedef41b":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/warnings.pm","cbb752bf4e395a09046aa636327203a5":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Base.pm","010c008b0df159c5e24f86f8ca771f29":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Devel/Cover/Condition.pm","8e33400cea62838ace373422aa5e2a00":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/x86_64-linux/IO.pm","c27cb6a23d00b89d081631cde5215bae":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/experimental.pm","7cb93a4bd6efe02cdacc13a7c2175298":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Devel/Cover/DB/Structure.pm","659f224aca973447a05e25591806f4e3":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Devel/Cover/Util.pm","e7b6b81ef7f83974d11e9ef3a83d5859":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/Result/Version.pm","1212e080ddc044e44a9ae4c8350f1338":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/Symbol.pm","dc22d7dfc9a7d615f236cbf2e76f7ea1":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Formatter/Base.pm","a707195c5be1dba8bc7ea32c82c52282":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/x86_64-linux/DynaLoader.pm","20906d5a08172350688aa9617e3edb77":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Devel/Cover/Pod.pm","9031b6229d640c96e7871ac23e072384":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/x86_64-linux/Time/HiRes.pm","d70b39ada7680a66d6b2b756d0681a0e":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Formatter/File/Session.pm","24830cf79d7f9568e19adaeb2b45dfda":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/Carp.pm","56cde6eba0f667ab56196613df3933c1":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/constant.pm","0c8e698d96ab7f6a9a8d6931825b365c":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/Result/Unknown.pm","aa7171c11a5f2dd48c6346e16b0f6098":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/IteratorFactory.pm","7617b40104071a2033317a2d29fde298":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/warnings/register.pm","bcf495a035439d1ed334059cb2f84fb2":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/x86_64-linux/re.pm","67340c319dc5d38dd16085291ffa618b":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/JSON/MaybeXS.pm","be193f0ad6212335a9b36c8cdf43965e":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/App/Prove.pm","c6c8164356e9760ebb8b956381b5bb30":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/App/Prove/State/Result/Test.pm","905a2b7f4b370e8514225376299b335d":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/B/Deparse.pm","6149a15ab5891c1dd5475b3e784b0cba":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Devel/Cover/Time.pm","3f69f5d00af24de863f7fc28342e974c":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Devel/Cover/Condition_or_2.pm","23b7d65e22b42927d6fcec631ab1c211":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/base.pm","5a0f4824c3b03d6e3c1cc5d506628646":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/Getopt/Long.pm","43c2fc0c6c7fcce361baeebca99732de":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/x86_64-linux/Config_git.pl","1166f09b8774d0dd7a408e57b8905b4d":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/Exporter.pm","2894d05696f2b94fa53eb4b35c9028ac":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/Text/ParseWords.pm","0478e017afdb6a6a964f3e6599fde6bd":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/bytes.pm","0dd86bb925b0208040e698d97185402a":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/x86_64-linux/B.pm","04a4603ee1bbd197056e31ab7046b7d4":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Harness/Env.pm","5dfb650ac2747252811fbaecce6cfdb7":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Formatter/File.pm","63ec9996f012f5f8bd41140dc0f1d759":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/App/Prove/State/Result.pm","2e4dcdc80279a254d9ced7306f7c17dc":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/SourceHandler/RawTAP.pm","e7d606122db71220fb81144d42c1a80b":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/YAMLish/Reader.pm","ad4c93721ee00880bdc656ca7eb4661f":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/Result/Comment.pm","93e7b739db7771025debcbad93cb12a1":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/File/Basename.pm","0ae952d21c9c96d74b22496dfc8d2377":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Devel/Cover/Condition_xor_4.pm","92ab1e76487f41226ce92a846fc91017":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/Tie/Hash.pm","aec6b4439913a29d5f242bf2e62df5d4":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/x86_64-linux/File/Spec/Unix.pm","6647a99c66c3b073cd7c07baedec07f0":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/x86_64-linux/Config.pm","5fcdb36b15a50b727454d758fa13dce6":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/SourceHandler.pm","f3d4a48e4bfabcd32bde7c69db3bc03c":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/x86_64-linux/Errno.pm","05f1de8fabb57959124210f1d27ead8a":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Devel/Cover/DB/IO/Base.pm","aa4977737d81f5ef42657da1473e6622":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/Result/Pragma.pm","236388038d62e72bfeec28d0d3d63446":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Devel/Cover/DB/Digests.pm","d4741a1bf9a11a9f6ef13323736b292b":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/Benchmark.pm","d73e6f08df8235b142e081faf5b6f2c0":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/if.pm","72aca368c9d7ecf3441488755d9d07f0":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/Exporter/Heavy.pm","7d91b58c67770281a1169e6836510cc1":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/strict.pm","d5691df10a0c0e7b8d5814157f02d94f":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Devel/Cover.pm","5e90241bb43a95e1083dadb70ab1dc73":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/Scheduler/Spinner.pm","3631a91bf02496cc953b19d5194a343b":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/x86_64-linux/Data/Dumper.pm","d8c730d9f5488ac54107b0b02f59fb96":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/Grammar.pm","5f4ce793ede305e7767fc395b83e5cb8":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/ResultFactory.pm","2d8b6912625f43f463e13711c7f0ae32":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/Result/Plan.pm","0f6e78d312685df9a1ac65afe8ff81e5":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/SourceHandler/File.pm","8a63d457536d21a99577f5f82fd63047":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/SourceHandler/Handle.pm","c4df442929815a995aaeaed3e6ac11cd":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/x86_64-linux/Config_heavy.pl","bf1ccd10a256f30aa2e4ad20a316bb46":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/Scheduler.pm","755e0f9e55e6c39684d2cd5eb219b02d":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Devel/Cover/Branch.pm","712fbd26a74d712e11428f23cb327f1f":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/List/Util.pm","7509c7d640c59c4cb2eacee17f46f474":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/Iterator/Stream.pm","60786b940161c55de889fbfa52b5c501":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Devel/Cover/Condition_and_3.pm","36e1b34f8175e036d57e51fd7d56becd":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/overloading.pm","ae39afa653f674cee493a3c57d496d4c":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/YAMLish/Writer.pm","95520f713b59bab9850fce323e0d6791":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/SourceHandler/Executable.pm","9afd6bf5c501a6990b9debed52efd3da":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/Iterator/Process.pm","553b72ae1964681af279abe4c00deb83":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/Result/Test.pm","3b8b611f1f99a8cd2fcecf5c03e9e183":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/x86_64-linux/IO/Select.pm","d3ba0976ab82e51fd581c86e8d34e415":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/Aggregator.pm","4d14922195653b35b2a7696325aa1044":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/Result.pm","74126e247fac3a4f6537913018b7ee93":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Harness.pm","9ee50c2c41c397a93f44a6740de91b4b":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Cpanel/JSON/XS.pm","a0e31d5259418b668dce45bbfd84ab8d":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/Scheduler/Job.pm","9a6feab54e1d129ac711333b0074f374":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/XSLoader.pm","becf4247919f617ab51cb6d1ac26c424":"/home/exodist/perl5/perlbrew/perls/main/bin/prove","22941e06f70b9d06033a5b411fb60c21":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/overload.pm","a95672c5e4c06ebe1ae1a92a5f71f614":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Devel/Cover/DB/IO.pm","b022cdf70fab4dd10e1895d3f41fee52":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Parser/Iterator.pm","3e82792800b06742b5e275937e6637d5":"/home/exodist/perl5/perlbrew/perls/main/lib/5.42.2/File/Path.pm","7e713368f07cce7363b85e25156b1481":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/TAP/Object.pm","384ff3b84506ba65403f26c960882a8f":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Devel/Cover/Subroutine.pm","b6bc5c03ef631d62f71bc40355474b2a":"/home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.42.2/x86_64-linux/Devel/Cover/Criterion.pm"}cover.14100644001750001750 31707515165554207 17642 0ustar00exodistexodist000000000000Getopt-Yath-2.000011/cover_db{"runs":{"1775441774.2233983.40588":{"finish":1775441774.40122,"collected":["branch","condition","statement","subroutine","time"],"version":"unknown","perl":"5.42.2","OS":"linux","run":"t/acceptance.t","digests":{"lib/Getopt/Yath/Util.pm":"a20e1ed3446db7439850620b7acfc96c","lib/Getopt/Yath.pm":"f32ba23251c7beef0a4fe0eaa54fe555","lib/Getopt/Yath/Settings.pm":"5935a1c1dc8a7b5d8a398c10d88be35b","lib/Getopt/Yath/Option/Map.pm":"6a827e48e74afc25312686ca19d59be8","lib/Getopt/Yath/Option/Count.pm":"eb8bc1a2c2dfe8bb39eb83c8ede73cba","lib/Getopt/Yath/Option/List.pm":"123a2812c394bf08bb84455b37b6292d","lib/Getopt/Yath/Settings/Group.pm":"074198fa9d9f930e73513c89f513402e","lib/Getopt/Yath/Option.pm":"c966eed5df47d66977103c0068d2ccc5","lib/Getopt/Yath/Instance.pm":"9b30e2fc1222fa186afd5bf5a7376d18","lib/Getopt/Yath/Option/BoolMap.pm":"d3e7a78339f259ed5077b808dc815c12","lib/Getopt/Yath/Option/Bool.pm":"e169eb9cf9ee8f25fe6c90a46c963bb0","lib/Getopt/Yath/HashBase.pm":"7d23b0bf85ec79b212a8f76564523107","lib/Getopt/Yath/Option/Scalar.pm":"77cca76ea82c90e86e9c2d1d1fe60337","lib/Getopt/Yath/Option/AutoList.pm":"a6b7b00c9e2237d585b5223604d20bb3","t/acceptance.t":"56fcfa520871a24b5f42f01dfec1ba55","lib/Getopt/Yath/Term.pm":"f3a721bedf2a61b478c4702a40da962c","lib/Getopt/Yath/Option/Auto.pm":"416b69c8408206cdd3a54ba7fb914057"},"count":{"lib/Getopt/Yath/Option/Map.pm":{"condition":[[0,0],[0,4.0],[0,19.0],[0,1.0],[8,6.0],[8,0]],"time":[2,1,7,1,1,22,3,1,2,9,1,2,23,1,2,null,null,12,12,null,2,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,2,9,7,8,4,7,21,11,12,34,12,25,null,17,10,19,1,2,23,28,43,15,10,36,13,9,12,10,16,1,2,2,3,4,4,null,null,null,4,2,12,null,null,null,6,10,8,35,9,13],"branch":[[0,0],[6.0,12],[19.0,0],[0,0],[0,19],[0,19],[31.0,14],[4.0,10],[0,2],[2.0,8],[0,8]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,9,10,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,18,6,6,18,19,19,19,19,19,0,19,19,19,1,1,45,45,45,14,14,14,14,14,14,14,10,2,2,2,2,2,2,0,0,0,2,8,8,0,0,0,8,8,8,8,8,8],"subroutine":[1,1,1,1,1,0,0,9,10,0,3,0,0,0,0,4,18,19,1,45,14]},"lib/Getopt/Yath/Util.pm":{"subroutine":[1,1,1,1,1,1,3,0,0,0,37,35],"branch":[[0,0],[0,0],[0,0],[0,37],[0,35],[35.0,0],[0,35],[0,35],[0,0],[0,0],[0,35],[0,35],[35.0,0],[0,35]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,37,37,37,37,37,35,35,35,35,35,35,0,0,0,0,0,0,35,35,35,35,0,35,35,35,0,0,0,0,0],"time":[2,1,7,1,1,13,2,0,17,2,5,9,182,2350,3,479,7943,655,2,3,21,4,3,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,24,30,18,49,30,871,28,31,38,30,64,43,null,null,null,null,null,null,17,25,71,32,null,16,27,59],"condition":[[3,0],[0,0,0],[35,0,0]]},"lib/Getopt/Yath.pm":{"time":[63125,3,9,2,0,24,1,1,20,87,2,3,203,2,14,2,1,229,1,1,66,41,7,9,19,11,13,5,12,3,18,94,45,49,49,16,633,4,5,11,4,5,14,11,4,3,3,8,7,19,4014,23,null,15,12,8,14,9,8,10,17,10,12320,12,null,14,45,102,43,81,42563],"condition":[[0,10.0],[10,0,0],[2,0,0],[2,1.0],[0,0,0],[0,0,3]],"subroutine":[1,1,1,1,1,1,1,10,2,35,2,3,11,25,0],"branch":[[0,10],[35,0],[0,2],[0,2],[0,2],[0,3],[0,3],[0,11],[0,11],[0,11],[0,70]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,10,10,10,10,10,10,10,10,2,10,35,35,35,35,10,2,2,2,2,2,2,10,3,3,3,3,3,3,10,11,11,0,11,11,11,11,11,11,11,11,10,25,10,0,10,70,70,70,70,10]},"lib/Getopt/Yath/Settings.pm":{"time":[2,1,9,2,1,29,1,1,7,79,1,12,2,1,3,257,21,19,27,26,null,null,null,null,null,null,9,324,342,522,52,null,null,null,null,null,null,null,14001,18,55,56,8,7],"condition":[[0,0,0],[1,1.0]],"subroutine":[1,1,1,1,1,25,0,2,595,0,0,33,0,0,0],"branch":[[25,0],[0,0],[0,0],[553.0,42],[42.0,0],[0,0],[25.0,8],[0,8]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,25,25,25,25,25,0,0,0,0,0,0,2,595,595,595,42,0,0,0,0,0,0,0,33,33,33,33,8,8,0,0,0,0,0,0,0,0,0,0]},"lib/Getopt/Yath/Option/List.pm":{"subroutine":[1,1,1,1,1,1,9,13,0,0,4,0,33,1,35,73,13,0,0,0,0],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,13,0,0,4,0,33,33,33,33,1,1,35,35,35,35,35,0,35,35,35,73,73,73,73,73,13,13,13,1,1,1,1,1,1,0,0,0,1,12,12,9,11,9,3,5,12,0,0,0,0,0,0,0,0,0,0,0,0],"branch":[[33,0],[35.0,0],[0,0],[0,35],[0,35],[0,73],[0,1],[1.0,12],[9,3]],"time":[1,1,6,1,1,20,1,1,3,9,1,2,19,2,1,1,14,17,null,null,4,null,17,14,40,27,1,3,25,18,23,22,33,null,27,23,30,35,50,54,41,83,11,9,15,1,2,1,2,3,3,null,null,null,2,7,11,8,9,40,4,3,13],"condition":[[0,1.0],[0,35.0],[73,0,0]]},"lib/Getopt/Yath/Option/Count.pm":{"condition":[[0,0],[15,0,0]],"time":[1,1,11,1,0,38,1,1,53,1,1,3,32,1,2,16,null,14,11,4,15,10,null,null,null,null,null,null,null,null,17,21,39,10,10,27,13],"branch":[[18.0,15],[0,0],[0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,15,0,15,15,3,17,15,0,0,0,0,0,0,0,0,33,33,33,15,15,15,17,0,0,0,0],"subroutine":[1,1,1,1,1,15,0,15,15,3,17,15,0,0,0,0,0,33,17,0]},"lib/Getopt/Yath/Settings/Group.pm":{"subroutine":[1,1,1,43,0,1,6,2,587,0,0,49,0],"statement":[1,1,1,1,1,1,1,1,1,43,43,43,0,0,1,6,6,6,6,6,6,2,2,2,2,587,587,587,587,0,0,0,0,0,0,49,49,49,49,6,6,0,0],"branch":[[42,1],[1,0],[0,6],[0,6],[0,6],[0,0],[43.0,6],[0,6]],"time":[1,1,7,3,1,16,1,1,214,30,36,49,null,null,2,3,6,4,5,7,9,3,2,3,3,289,334,368,440,null,null,null,null,null,null,35,24,49,104,4,8],"condition":[[587,0,0]]},"lib/Getopt/Yath/Option.pm":{"condition":[[267,0,0],[0,35,0],[0,0,0],[35,0,0],[33,2,0],[35,0,0],[34,1,0],[0,0,0],[0,35,0],[0,35,0],[0,35.0],[20,15,0],[32,3,0],[32,3,0],[0,1,0],[4,0],[35,0],[35,0],[0,0],[0,0],[0,0,0],[0,0,0],[4,31.0],[0,35.0],[0,35.0],[1,34.0],[0,0],[0,0],[0,0],[0,0],[0,0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0,0],[0,0]],"time":[2,1,7,1,1,15,1,1,25,2,1,2,87,1,4,199,2,3,2,1,865,null,null,null,null,null,46,null,25,null,null,null,null,4,70,25,67,34,37,37,27,73,65,74,60,109,5,8,4,6,9,3,101,1,1,138,159,182,256,36,100,2,2,43,41,71,5,105,217,5,3,3,5,85,91,172,3,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,18,40,49,30,25,33,35,29,24,34,46,40,21,34,46,18,43,null,null,46,42,32,27,89,24,4,26,80,6,6,null,27,24,84,347,32,36,40,46,55,78,6,4,8,6,16,null,18,null,null,null,null,null,null,9,2,10,390,683,26,37,44,22,19,null,36,21,null,36,14,3,38,31,37,35,36],"branch":[[0,35],[0,35],[113.0,6],[0,6],[4.0,2],[2,0],[0,267],[188.0,79],[78.0,1],[0,1],[47.0,4],[252.0,4],[173.0,2],[0,0],[0,0],[0,0],[0,0],[0,35],[0,35],[0,0],[0,35],[0,35],[0,35],[0,35],[0,35],[35.0,0],[0,0],[35.0,0],[0,0],[0,35],[0,35],[0,35],[87.0,18],[17.0,1],[0,1],[101.0,4],[4.0,0],[0,340],[0,76],[0,76],[67.0,9],[0,0],[0,0],[0,0],[0,9],[9,0],[0,0],[8.0,1],[719.0,35],[16.0,19],[4.0,31],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,51,0,22,0,0,0,0,3,94,35,35,35,35,35,35,35,119,119,119,119,6,6,6,6,6,2,113,1,1,267,267,267,267,79,79,1,1,51,51,51,4,256,256,4,3,3,3,175,175,175,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,0,0,35,35,35,35,105,18,1,35,105,4,4,0,35,35,35,340,35,76,76,76,76,76,9,9,9,9,9,0,9,0,0,0,0,0,0,9,1,9,754,754,35,35,35,35,35,0,35,35,0,35,35,1,35,35,35,35,35,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"subroutine":[1,1,1,1,1,1,1,0,0,0,0,0,51,0,22,0,0,0,0,3,94,174,165,35,119,1,267,51,256,3,175,0,0,0,0,35,76,754,0,0,0,0,0,0]},"lib/Getopt/Yath/Option/BoolMap.pm":{"time":[2,1,14,2,0,85,1,1,35,2,0,5,32,2,5,5,null,5,null,1,null,4,1,4,2,0,null,3,3,20,null,null,null,null,null,null,null,null,2,3,7,3,4,7,5,9],"subroutine":[1,1,1,1,1,4,0,4,0,1,0,4,1,0,4,0,0,4,4,0],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,0,4,0,1,0,4,1,1,1,1,0,4,4,4,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0],"branch":[[0,4],[0,1],[0,4],[0,4],[1,3]]},"lib/Getopt/Yath/Instance.pm":{"condition":[[0,10.0],[0,10.0],[0,10.0],[0,10.0],[3,0],[1,1.0],[0,0],[0,0,0],[45,0],[0,0],[0,0,0],[0,0,0],[0,0,25],[1,24,0],[5,20.0],[1,24.0],[0,0,25],[25,0],[0,25.0],[0,25.0],[0,25.0],[0,25,0],[2,5,15],[16,15,7],[68,15,0],[68,15,0],[4,79,0],[31,10,35],[71,0,5],[71,5,0],[0,134,31],[134,27,4],[3,0,0],[2,163.0],[0,0],[0,0,0],[0,0],[0,0],[0,0,0],[0,0],[0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]],"time":[2,1,9,1,3,31,1,1,21,1,1,2,141,2,12,130,1,13,1,1,3,16,1,3,5,21,16,19,15,16,null,null,null,null,null,3,4,2,6,3,9,2,2,2,5,2,6,4,2,4,null,null,null,2,null,null,null,null,null,1,4,2,3,null,null,null,3,22,29,36,63,29,53,1,2,2,3,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,42,61,34,70,47,null,null,61,59,542,6,331,416,1040,null,null,1159,74,null,10,22,39,22,44,28,25,39,8,17,130,34,17,82,23,159,161,91,124,147,119,108,57,50,19,189,158,153,40,null,17,34,1,1,2,3,4,3,null,3,null,25,65,55,67,null,null,59,3,3,74,6,null,null,6,5,7,null,48,82,20,32,35,45,3,7,null,32,53,35,57,1,4,3,2,4,1,64,58,null,null,null,null,null,null,null,55,85,78,57,44,68,66,56,15,8,8,13,53,76,23,30,51,34,1,62,null,47,29,105,24,50,2,7,13,24,79,null,null,null,null,null,87,70,53,2,8,60,16,119,86,112,111,189,134,73,18,19,3,27,1,3,5,3,17,136,143,75,173,2,4,167,128,93,4,3,3,4,4,3,7,4,null,null,null,12,5,4,6,56],"branch":[[0,3],[0,2],[0,2],[2.0,0],[0,0],[0,2],[0,45],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[92,0],[4.0,671],[0,0],[0,1807],[92.0,0],[0,25],[25.0,0],[35,19],[95,78],[54,24],[173.0,1],[1.0,3],[0,3],[0,92],[3.0,89],[0,6],[6.0,0],[6.0,83],[8.0,23],[7,31],[0,31],[38.0,0],[38,45],[0,4],[4.0,0],[4.0,79],[0,83],[0,0],[0,0],[0,83],[0,83],[0,83],[7.0,0],[7.0,76],[9.0,67],[0,35],[35.0,41],[1.0,49],[50.0,26],[0,5],[5,45],[50,26],[3,23],[0,0],[0,0],[0,76],[1,0],[1.0,75],[4.0,27],[67.0,94],[0,3],[24.0,0],[0,2],[51.0,114],[110.0,4],[0,4],[0,4],[0,4],[0,4],[1,1],[2.0,2],[0,4],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,10,10,10,10,10,10,0,0,0,0,0,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,0,0,0,2,0,0,0,0,0,2,2,2,2,0,0,0,2,45,45,45,45,45,45,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,92,92,92,92,92,0,0,92,92,675,4,675,675,1807,0,0,1807,92,0,25,25,25,25,25,25,25,25,5,25,175,25,25,25,25,174,174,174,174,173,173,173,95,54,24,173,173,174,25,0,25,25,1,1,1,4,4,3,0,3,0,25,92,92,92,0,0,92,3,3,89,6,0,0,6,6,6,0,83,83,38,38,38,38,7,7,0,31,45,45,83,4,4,4,4,4,4,83,83,0,0,0,0,0,0,0,83,83,83,83,83,83,83,83,7,7,7,7,76,76,35,35,76,50,1,76,0,76,76,76,50,50,3,3,23,23,76,0,0,0,0,0,76,76,76,1,1,75,24,165,165,165,165,165,161,94,24,24,1,24,3,3,3,3,24,165,165,165,165,2,2,165,165,114,4,4,4,4,4,4,4,4,0,0,0,4,4,4,4,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"subroutine":[1,1,1,1,1,1,1,1,10,0,0,3,2,45,2,0,0,0,92,25,0,1,0,0]},"lib/Getopt/Yath/HashBase.pm":{"time":[2,1,9,1,1,29,2,0,42,1,1,78,2,0,61,0,6,1,121,1000,3,6,null,188,null,null,null,null,null,null,3,1,605,2,1,96,51,11,8,18,9,6,16,23,19,23,17,7,9,47,9,14,24,55,12,32,274,200,3768,33,890,8,12,18,6,13,33,36,46,52,44,45,120,null,53,36,43,34,null,76,null,null,56,2,null,4,null,null,null,null,null,null,null,59,null,null,49,null,null,null,null,null,null,null,null,null,null,null,null,7,12,22,null,16,null,31,19,26,45,28,18,26,41,24,28,30,32,null,null,null,null,null,null,null,null,null,null,null,null,72,59,43,71,36,55,14,19,7,3,7,22,8,21,7,20,7,13,7,15,30],"condition":[[0,0,1],[10,0,0],[10,0,0],[0,10.0],[0,10.0],[8,0],[49,1.0],[0,0],[9,1.0]],"subroutine":[1,1,1,1,1,1,1,1,50,10,10,10,0,0,0,0,0,0,10,0,0,39,45,45],"branch":[[1,0],[1,0],[10.0,0],[0,8],[8.0,2],[10,0],[0,11],[375,40],[49.0,1],[0,39],[39,0],[39.0,11],[0,1],[1,0],[0,0],[0,0],[1,49],[0,49],[0,49],[0,50],[0,0],[0,0],[8,2],[8,2],[0,0],[0,0],[0,0],[0,45],[9.0,36],[45.0,0],[10.0,0],[10.0,0],[10.0,0],[10.0,0],[10.0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,1,1,1,1,1,1,50,10,10,10,10,10,10,10,10,10,10,10,10,10,8,8,10,11,10,10,415,375,375,40,40,10,10,10,10,10,50,50,50,50,50,50,50,0,50,50,50,39,0,39,0,0,50,1,0,1,0,0,0,0,0,0,0,50,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10,0,10,0,10,10,39,45,10,10,39,45,10,45,45,45,0,0,0,0,0,0,0,0,0,0,0,0,45,45,45,45,45,45,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10]},"lib/Getopt/Yath/Option/Bool.pm":{"subroutine":[1,1,1,1,1,2,0,8,8,8,8,35,71,4,24,38,2],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,2,0,8,8,8,8,35,35,71,71,4,4,24,24,24,38,2,2,2,2,0],"branch":[[11,24],[0,24],[12,12],[1,1],[2.0,0],[0,0]],"time":[2,0,10,1,1,32,1,1,2,20,1,2,2,3,null,10,8,8,7,18,39,37,65,3,5,15,20,27,30,2,2,4,4]},"lib/Getopt/Yath/Option/Scalar.pm":{"time":[62,1,6,1,0,15,1,1,4,16,1,4,14,20,29,null,12,42,63,68,122,33,2,11,5],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,12,10,22,0,13,62,62,120,120,45,2,2,2,0],"branch":[[28,34],[2.0,0],[0,0]],"subroutine":[1,1,1,1,12,10,22,0,13,62,120,45,2]},"lib/Getopt/Yath/Option/AutoList.pm":{"time":[1,1,10,2,0,35,2,0,3,23,1,3,2,2,1,2],"subroutine":[1,1,1,1,1,1,2,1,0,0],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,0,0]},"lib/Getopt/Yath/Term.pm":{"condition":[[0,0,0],[0,0,0]],"time":[2,0,7,2,1,30,1,1,2,25,1,62,1,256,4123,3,150],"branch":[[1,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"subroutine":[1,1,1,1,1,0]},"lib/Getopt/Yath/Option/Auto.pm":{"time":[1,1,7,1,1,20,1,1,2,12,0,2,1,7,4,5,5,13],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,4,3,4,2,16,0,0,0,0],"branch":[[0,0],[0,0]],"subroutine":[1,1,1,1,1,4,3,4,2,16,0]}},"dir":"/home/exodist/projects/Test2/Getopt-Yath","vec":{"lib/Getopt/Yath/HashBase.pm":{"condition":{"vec":"\u0004€\u0019","size":21},"subroutine":{"vec":"ÿ\u000fä","size":24},"statement":{"size":160,"vec":"ÿÿ¿Àÿÿÿÿÿ½, \u0001àú\u0000øÿÿ"},"branch":{"vec":"\u0005`Û\u0006+\u0000€\u0005\u0000","size":70}},"lib/Getopt/Yath/Option/Bool.pm":{"branch":{"size":12,"vec":"Á\u0000"},"statement":{"vec":"ÿ¿ÿÿ\u0001","size":34},"subroutine":{"size":17,"vec":"¿ÿ\u0001"}},"lib/Getopt/Yath/Option/BoolMap.pm":{"subroutine":{"size":20,"vec":"¿Z\u0006"},"branch":{"vec":"\b\u0003","size":10},"statement":{"size":53,"vec":"ÿÿê;À?\u0000"}},"lib/Getopt/Yath/Instance.pm":{"condition":{"size":124,"vec":"\u0000\r\u0002`Š©²%µ£\"\u0000\u0000\u0000\u0000\u0000"},"subroutine":{"size":24,"vec":"ÿy,"},"branch":{"vec":"\u0002 \u0000 bÇË ‹  Ö>Î@›\u0010\u0000\u0003\u0000\u0000","size":166},"statement":{"size":331,"vec":"ÿÿÿ?øÿ#xü\u001f\u0000\u0000ðù³ÿÿÿï_Ïçþý?àÿÿý\u000fþÿÿÿÿñ\u0001\u0000\u0000\u0000\u0000\u0000"}},"lib/Getopt/Yath/Option/Count.pm":{"subroutine":{"size":20,"vec":"¿\u000f\u0006"},"branch":{"vec":"\u0002","size":6},"statement":{"size":41,"vec":"ÿÿ>À\u001f\u0000"},"condition":{"vec":"\u0004","size":5}},"lib/Getopt/Yath/Settings/Group.pm":{"subroutine":{"size":13,"vec":"ï\t"},"branch":{"vec":"\u0006\u0010","size":16},"statement":{"vec":"ÿÏÿ\u001fø\u0001","size":43},"condition":{"vec":"\u0001","size":3}},"lib/Getopt/Yath/Option/List.pm":{"subroutine":{"vec":"ÿô\u0001","size":21},"statement":{"vec":"ÿÿÓÿýÿÇ\u0000\u0000","size":75},"branch":{"size":18,"vec":"…j\u0003"},"condition":{"vec":"\u001a","size":7}},"lib/Getopt/Yath/Option.pm":{"condition":{"vec":"\u0011’\b’’D\u0001 \u0006\u0000\u0000\u0000","size":96},"statement":{"vec":"ÿÿ\u001f\u0014þÿÿÿÿ\u001f\u0000àÿ?ÿ÷ÿ\u0017øßþ\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000","size":278},"branch":{"vec":"\u001a \u001a\u0001(ªF¨m\u0000\u0003†+\u0000\u0000\u0000\u0000\u0000\u0000","size":152},"subroutine":{"vec":"Pø8\u0000","size":44}},"lib/Getopt/Yath/Option/Map.pm":{"subroutine":{"vec":"Ÿ…\u001f","size":21},"statement":{"size":89,"vec":"ÿ\u0016\u0000€ÿ÷ÿÿãø\u0001"},"branch":{"vec":"\u0010\u001a\u0000","size":22},"condition":{"vec":" \u0000","size":12}},"lib/Getopt/Yath/Util.pm":{"subroutine":{"size":12,"vec":"\f"},"branch":{"vec":"€¦ \t","size":28},"statement":{"size":73,"vec":"ÿÿ\u0000\u0000ü?ð\u000e\u0000"},"condition":{"size":8,"vec":"!"}},"lib/Getopt/Yath.pm":{"subroutine":{"size":15,"vec":"ÿ?"},"statement":{"size":71,"vec":"ÿÿÿÿÿÿïÿ~"},"branch":{"size":22,"vec":"\u0004¨\n"},"condition":{"vec":"\u0000‚","size":16}},"lib/Getopt/Yath/Settings.pm":{"subroutine":{"size":15,"vec":"¿\t"},"branch":{"vec":"A\u0010","size":16},"statement":{"size":54,"vec":"ÿÿ\u000f|À\u000f\u0000"},"condition":{"size":5,"vec":"\u0018"}},"lib/Getopt/Yath/Option/Auto.pm":{"subroutine":{"vec":"ÿ\u0003","size":11},"statement":{"size":22,"vec":"ÿÿ\u0003"},"branch":{"vec":"\u0000","size":4}},"lib/Getopt/Yath/Option/AutoList.pm":{"statement":{"vec":"ÿÿ\u0000","size":18},"subroutine":{"vec":"ÿ\u0000","size":10}},"lib/Getopt/Yath/Term.pm":{"condition":{"vec":"\u0000","size":6},"statement":{"vec":"ÿÿ\u0001\u0000\u0000","size":39},"branch":{"vec":"\u0001\u0000","size":16},"subroutine":{"size":6,"vec":"\u001f"}},"lib/Getopt/Yath/Option/Scalar.pm":{"subroutine":{"vec":"\u001f","size":13},"branch":{"vec":"\u0000","size":6},"statement":{"vec":"ÿÿ\u0001","size":26}}},"name":"/home/exodist/projects/Test2/Getopt-Yath","start":1775441774.33947},"1775441775.2234035.40588":{"version":"unknown","finish":1775441775.61783,"collected":["branch","condition","statement","subroutine","time"],"count":{"lib/Getopt/Yath/Option/List.pm":{"subroutine":[1,1,1,1,1,8,10,8,2,0,1,4,28,2,32,64,7,2,2,4,4],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,8,10,8,2,0,1,4,28,28,28,28,2,2,32,32,32,32,32,0,32,32,32,64,64,64,64,64,7,7,7,0,0,0,0,0,0,0,0,0,0,7,7,7,15,7,0,0,7,2,2,4,4,4,4,4,4,4,4,4,4],"branch":[[28,0],[32.0,0],[0,0],[0,32],[0,32],[0,64],[0,0],[0,7],[7,0]],"time":[2,0,7,1,1,21,2,1,2,8,1,2,17,1,2,6,11,9,2,null,1,5,8,12,31,25,2,2,13,18,15,23,27,null,27,21,24,55,40,51,24,78,5,4,6,null,null,null,null,null,null,null,null,null,null,4,6,5,11,23,null,null,9,2,2,4,2,6,4,6,2,4,4,5,4],"condition":[[0,2.0],[0,32.0],[64,0,0]]},"lib/Getopt/Yath/Settings/Group.pm":{"branch":[[62,0],[0,0],[0,0],[0,0],[0,0],[0,0],[62.0,0],[0,0]],"statement":[1,1,1,1,1,1,1,1,1,62,62,62,0,0,0,0,0,0,0,0,0,0,0,0,0,1426,1426,1426,1426,0,0,0,0,0,0,62,62,62,62,0,0,0,0],"subroutine":[1,1,1,62,0,0,0,0,1426,0,0,62,0],"condition":[[1426,0,0]],"time":[1,0,4,1,1,10,2,1,160,30,51,68,null,null,null,null,null,null,null,null,null,null,null,null,null,625,661,756,889,null,null,null,null,null,null,31,32,59,190]},"lib/Getopt/Yath/Option/Count.pm":{"subroutine":[1,1,1,1,1,9,3,10,7,1,47,7,3,0,2,2,2,61,48,0],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,3,10,7,1,47,7,3,3,0,2,2,2,2,2,61,61,61,7,7,7,48,0,0,0,0],"branch":[[54.0,7],[0,0],[0,0]],"time":[1,1,7,1,1,17,1,1,26,1,0,2,21,1,8,10,3,8,6,1,49,5,1,3,null,2,3,2,7,3,37,30,70,6,2,11,39],"condition":[[0,0],[7,0,0]]},"lib/Getopt/Yath/Option.pm":{"subroutine":[1,1,1,1,1,1,1,0,0,0,0,0,80,0,29,0,16,0,0,7,354,475,447,16,389,2,833,34,531,6,503,0,0,28,16,16,44,509,24,22,10,28,14,14],"branch":[[0,16],[0,16],[377.0,12],[10.0,9],[7.0,2],[1,1],[0,833],[539.0,294],[226.0,68],[0,68],[34.0,0],[465.0,66],[503.0,0],[0,0],[0,0],[0,28],[0,16],[0,16],[0,15],[0,0],[0,16],[0,16],[0,16],[0,16],[1.0,15],[16.0,0],[3.0,0],[16.0,0],[0,0],[0,16],[1.0,15],[0,15],[33.0,12],[6.0,6],[0,6],[44.0,1],[1.0,0],[0,156],[0,44],[0,44],[44.0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[494.0,15],[8.0,7],[0,15],[16.0,8],[6.0,16],[10.0,6],[2.0,8],[4.0,0],[4.0,4],[4.0,0],[0,28],[22.0,6],[16.0,12],[0,67],[0,14],[2.0,12],[2.0,12],[2.0,12],[5.0,14],[14.0,0],[6.0,6],[0,0],[0,14],[0,14],[2.0,12],[2.0,12],[2.0,12],[5.0,14]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,80,0,29,0,16,0,0,7,354,16,16,16,16,16,16,16,389,389,389,389,19,19,19,19,9,2,380,2,2,833,833,833,833,294,294,68,68,34,34,34,0,531,531,66,6,6,6,503,503,503,0,0,0,0,0,0,0,28,28,0,28,28,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,3,0,16,16,15,15,45,12,6,15,45,1,1,0,15,15,15,156,15,44,44,44,44,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,509,509,15,15,15,15,15,3,15,15,3,15,15,0,15,15,15,15,15,24,24,24,8,8,8,16,8,8,22,22,22,16,10,6,10,10,10,8,4,0,4,0,28,28,28,28,28,28,65,28,28,6,12,28,16,16,64,28,213,213,213,213,213,28,28,28,0,28,28,14,14,14,14,14,14,0,0,0,0,0,0,0,14,14,14,14,14,14,2,14,2,14,2,14,14,14,5,19,14,28,28,12,6,14,0,0,14,14,14,14,14,91,91,14,14,4,2,14,2,2,14,2,2,14,14,5,19,14],"time":[1,1,5,0,1,12,0,1,18,1,1,2,56,1,3,140,1,2,2,1,567,null,null,null,null,null,65,null,27,null,25,null,null,6,211,9,32,14,17,20,9,28,160,203,168,300,11,14,11,15,11,3,239,1,2,351,442,502,629,144,273,48,48,14,22,42,null,260,351,52,4,3,7,168,267,368,null,null,null,null,null,null,null,8,21,null,10,32,5,13,null,6,21,11,18,20,14,12,13,17,14,10,15,24,23,11,13,28,6,19,3,null,21,15,14,16,38,14,8,13,32,2,1,null,12,18,40,154,14,17,27,24,30,43,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,201,438,12,16,23,9,10,4,19,9,4,16,8,null,18,14,14,13,13,10,16,17,5,7,3,12,8,11,9,14,19,12,8,8,5,8,20,6,2,null,2,null,11,19,12,19,25,16,46,15,25,4,10,20,21,11,48,23,114,118,116,111,125,12,18,11,null,31,23,10,5,13,13,9,6,null,null,null,null,null,null,null,10,9,12,15,15,11,2,9,3,7,2,15,9,5,3,22,5,15,50,9,7,19,null,null,28,8,9,12,13,45,39,16,9,5,1,9,3,1,8,3,2,6,11,6,16,22],"condition":[[833,0,0],[1,15,0],[0,0,0],[16,0,0],[14,2,0],[13,3,0],[16,0,0],[1,0,0],[0,16,0],[0,16,0],[3,13.0],[9,7,0],[11,4,1],[11,4,0],[0,6,0],[1,0],[15,0],[11,4.0],[0,0],[0,0],[0,0,0],[0,0,0],[0,15.0],[3,12.0],[3,12.0],[0,15.0],[4,4.0],[213,0],[213,0],[0,28.0],[14,0,0],[0,0],[0,0],[0,0],[14,0],[14,0],[0,14.0],[0,12,16],[12,16.0]]},"lib/Getopt/Yath/Util.pm":{"time":[1,0,5,1,1,8,0,1,16,3,0,6,130,1601,3,337,5350,301,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,9,12,7,21,12,752,13,9,22,8,14,19,null,null,null,null,null,null,4,14,41,12,null,9,13,39],"condition":[[0,0,0],[0,0,0],[16,0,0]],"subroutine":[1,1,1,1,1,1,0,0,0,0,16,16],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,16,16,16,16,0,16,16,16,0,0,0,0,0],"branch":[[0,0],[0,0],[0,0],[0,16],[0,16],[16.0,0],[0,16],[0,16],[0,0],[0,0],[0,16],[0,16],[16.0,0],[0,16]]},"lib/Getopt/Yath/Settings.pm":{"branch":[[64,0],[0,0],[0,0],[1364.0,62],[62.0,0],[0,0],[64.0,0],[0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,64,64,64,64,64,0,0,0,0,0,0,0,1426,1426,1426,62,0,0,0,0,0,0,0,64,64,64,64,0,0,0,0,0,0,0,0,0,0,0,0],"subroutine":[1,1,1,1,1,64,0,0,1426,0,0,64,0,0,0],"condition":[[0,0,0],[0,0]],"time":[1,1,6,1,0,18,1,1,4,59,1,9,1,1,2,36,42,42,54,65,null,null,null,null,null,null,null,623,656,985,74,null,null,null,null,null,null,null,3578,32,89,118]},"lib/Getopt/Yath.pm":{"time":[42302,2,5,1,1,14,1,0,14,58,1,2,127,2,8,1,1,164,1,3,46,399,0,1,3,2,1,1,1,1496,2,6892,20,25,21,1,null,null,null,null,null,null,1,802,5,2,8,6,7,1,2723,3,2,5,2,2,2,933,1,2,4,1,1753,1,null,1,4,8,2,7,29728],"condition":[[0,1.0],[1,0,0],[0,0,0],[3,1.0],[0,0,4],[0,0,4]],"subroutine":[1,1,1,1,1,1,1,1,2,16,0,4,2,64,0],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,16,16,16,15,1,0,0,0,0,0,0,1,4,4,4,4,4,4,1,2,2,1,2,2,2,2,2,2,2,2,1,64,1,0,1,7,7,7,7,1],"branch":[[0,1],[16,0],[0,0],[0,0],[0,0],[4.0,0],[0,4],[1,1],[1.0,1],[0,2],[0,7]]},"lib/Getopt/Yath/Option/Map.pm":{"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,1,6,5,0,1,4,4,4,4,4,4,4,10,5,4,2,2,2,2,2,2,2,2,2,2,2,48,7,7,48,54,54,54,54,54,0,54,54,54,2,2,105,105,105,51,51,51,51,8,8,8,8,0,0,0,0,0,0,0,0,0,0,8,8,8,10,8,0,8,8,10,10,8],"branch":[[0,4],[7.0,41],[54.0,0],[0,0],[0,54],[0,54],[54.0,51],[0,8],[0,0],[0,8],[8,0]],"subroutine":[1,1,1,1,1,4,1,6,5,0,1,4,4,2,2,2,48,54,2,105,8],"condition":[[2,2.0],[0,2.0],[0,54.0],[0,2.0],[2,49.0],[8,0]],"time":[1,1,7,1,1,21,2,0,3,9,0,2,19,1,1,4,2,11,7,null,1,3,2,3,4,3,3,3,8,4,5,1,2,4,3,2,3,1,3,2,3,6,26,3,10,41,25,25,39,21,47,null,43,34,39,2,2,81,80,84,59,21,66,43,2,7,14,4,null,null,null,null,null,null,null,null,null,null,7,7,4,7,31,null,7,6,19,10,12]},"lib/Getopt/Yath/Option/Bool.pm":{"statement":[1,1,1,1,1,1,1,1,1,1,1,1,3,1,9,6,6,4,6,162,162,337,337,3,3,156,156,156,165,0,0,0,0,0],"branch":[[6,156],[0,156],[54,102],[0,0],[0,0],[0,0]],"subroutine":[1,1,1,1,3,1,9,6,6,4,6,162,337,3,156,165,0],"time":[1,1,7,1,1,22,1,1,3,23,1,1,4,1,15,7,9,5,5,67,140,151,226,2,2,82,90,96,100]},"lib/Getopt/Yath/HashBase.pm":{"subroutine":[1,1,1,1,1,1,1,1,47,10,10,10,0,0,0,0,0,0,10,0,0,21,19,17],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,1,1,1,1,1,1,47,10,10,10,10,10,10,10,10,10,10,10,10,10,8,8,10,11,10,10,412,372,372,40,40,10,10,10,10,10,47,47,47,47,47,47,47,0,47,47,47,39,0,39,0,0,47,1,0,1,0,0,0,0,0,0,0,47,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10,0,10,0,10,10,21,17,10,10,19,16,10,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,17,17,17,17,16,16,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10],"branch":[[1,0],[1,0],[10.0,0],[0,8],[8.0,2],[10,0],[0,11],[372,40],[46.0,1],[0,39],[39,0],[39.0,8],[0,1],[1,0],[0,0],[0,0],[1,46],[0,46],[0,46],[0,47],[0,0],[0,0],[8,2],[8,2],[0,0],[0,0],[0,0],[0,17],[9.0,8],[17.0,0],[10.0,0],[10.0,0],[10.0,0],[10.0,0],[10.0,0]],"time":[1,1,6,1,1,20,1,0,33,1,1,52,1,0,41,0,4,1,89,682,2,4,null,110,null,null,null,null,null,null,1,1,401,1,0,72,28,7,4,11,6,4,12,14,13,16,11,6,5,31,5,12,15,37,11,23,225,145,2915,24,366,5,7,14,3,8,27,19,30,39,21,32,69,null,31,24,27,23,null,47,null,null,34,2,null,2,null,null,null,null,null,null,null,33,null,null,42,null,null,null,null,null,null,null,null,null,null,null,null,6,8,15,null,11,null,21,20,13,17,11,15,16,13,18,10,10,9,null,null,null,null,null,null,null,null,null,null,null,null,27,27,15,21,11,27,10,11,2,7,3,18,3,18,6,10,7,11,3,10,21],"condition":[[0,0,1],[10,0,0],[10,0,0],[0,10.0],[0,10.0],[8,0],[46,1.0],[0,0],[9,1.0]]},"lib/Getopt/Yath/Option/AutoMap.pm":{"time":[2,0,8,1,0,24,1,1,2,18,1,1,11,7,1,3,1,3,2],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,7,5,1,3,1,2,2],"subroutine":[1,1,1,1,7,5,1,3,1,2,2]},"lib/Getopt/Yath/Instance.pm":{"condition":[[0,1.0],[0,1.0],[0,1.0],[0,1.0],[4,0],[0,0],[0,0],[0,0,0],[15,0],[0,0],[0,0,0],[0,0,0],[0,0,64],[0,64,0],[1,63.0],[0,64.0],[0,0,64],[64,0],[0,64.0],[0,64.0],[0,64.0],[0,64,0],[8,2,11],[12,11,10],[43,17,0],[41,16,1],[0,57,0],[31,5,9],[44,0,0],[44,0,0],[0,375,72],[375,62,10],[12,0,0],[12,435.0],[0,0],[0,2,0],[2,0],[2,0],[2,0,26],[0,74.0],[0,74.0],[0,0,0],[0,0,0],[0,0,74],[0,0,74],[0,74.0],[0,74.0],[0,0,74],[0,74,0]],"time":[2,0,6,1,0,19,1,1,14,1,1,1,111,1,8,87,1,8,1,1,2,11,1,2,1,4,2,2,2,1,null,null,null,null,null,3,3,4,4,2,11,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,9,10,12,25,10,18,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,38,29,40,36,33,null,null,35,38,332,null,189,250,729,null,null,787,49,null,30,46,81,40,93,64,53,89,3,31,331,67,31,163,49,353,359,186,286,315,248,261,159,63,36,406,350,325,100,16,41,79,null,null,null,null,null,null,null,null,null,53,38,36,46,null,null,35,1,2,45,3,null,null,4,1,2,1,40,55,15,34,29,28,5,8,3,12,29,19,40,2,2,null,null,null,null,59,26,2,1,1,1,null,null,1,46,52,46,32,34,34,36,41,22,14,10,18,32,37,10,7,25,14,null,33,null,21,19,30,12,25,2,9,5,11,47,null,null,null,null,null,45,40,27,null,null,36,37,264,222,274,275,421,323,224,42,29,10,58,9,4,16,8,1378,275,296,214,379,11,26,328,257,282,14,11,6,7,11,5,8,9,null,null,null,6,7,9,27,192,2,3,9,2,2,26,5,3,4,3,2,2,3,2,null,4,3,34,2,3,28,5,3,35,19,2,48,16,40,35,40,65,71,36,36,null,null,80,62,144,87,54],"branch":[[0,4],[0,0],[0,0],[0,0],[0,0],[0,0],[0,15],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[64,0],[0,452],[0,0],[0,1435],[64.0,0],[0,64],[64.0,0],[32,54],[329,146],[86,60],[475.0,0],[0,0],[0,0],[0,64],[1.0,63],[0,3],[1.0,2],[3.0,60],[3.0,16],[10,23],[4,19],[33.0,0],[33,27],[0,0],[2.0,0],[2.0,58],[0,60],[1.0,1],[0,1],[2.0,58],[1.0,57],[1.0,56],[12.0,0],[12.0,45],[6.0,39],[1.0,8],[9.0,36],[0,23],[23.0,21],[0,0],[0,24],[24,20],[7,13],[0,0],[0,0],[0,44],[0,0],[0,44],[10.0,62],[83.0,354],[0,12],[59.0,0],[12.0,0],[80.0,367],[355.0,12],[0,12],[3.0,9],[0,9],[0,9],[1,1],[2.0,7],[9.0,0],[28.0,0],[0,2],[0,2],[0,2],[0,2],[0,2],[2.0,26],[0,74]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,64,64,64,64,0,0,64,64,452,0,452,452,1435,0,0,1435,64,0,64,64,64,64,64,64,64,64,2,64,475,64,64,64,64,475,475,475,475,475,475,475,329,86,60,475,475,475,64,3,64,64,0,0,0,0,0,0,0,0,0,64,64,64,64,0,0,64,1,1,63,3,0,0,3,1,1,2,60,60,33,33,33,33,10,10,4,19,27,27,60,2,2,0,0,0,0,60,60,2,1,1,1,0,0,1,58,57,57,57,57,57,57,57,12,12,12,12,45,45,9,8,44,23,0,44,0,44,44,44,24,24,7,7,13,13,44,0,0,0,0,0,44,44,44,0,0,44,59,447,447,447,447,447,437,354,59,59,9,59,9,9,12,12,59,447,447,447,447,12,12,447,447,367,12,12,9,9,9,9,9,9,0,0,0,9,9,9,9,59,2,2,2,2,2,28,2,2,2,2,2,2,2,2,0,2,2,74,2,2,28,2,2,28,28,2,2,2,74,74,74,74,74,74,74,0,0,74,74,74,74,74],"subroutine":[1,1,1,1,1,1,1,1,1,0,0,4,0,15,0,0,0,0,64,64,3,0,2,74]},"lib/Getopt/Yath/Option/Scalar.pm":{"subroutine":[1,1,1,1,1,16,15,0,4,164,306,92,9],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,16,15,0,4,164,164,306,306,92,9,9,9,0],"branch":[[26,138],[9.0,0],[0,0]],"time":[1,1,31,1,1,22,1,1,1,18,1,1,1,13,15,null,2,68,145,143,214,56,4,7,16]},"lib/Getopt/Yath/Option/Auto.pm":{"subroutine":[1,1,1,1,1,13,10,4,3,64,0],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,13,10,4,3,64,0,0,0,0],"branch":[[0,0],[0,0]],"time":[1,0,8,1,0,21,1,1,2,18,0,2,1,19,10,4,137,40]},"lib/Getopt/Yath/Option/AutoList.pm":{"statement":[1,1,1,1,1,1,1,1,1,1,1,1,14,10,4,1,2,2],"subroutine":[1,1,1,1,14,10,4,1,2,2],"time":[2,0,8,1,1,21,2,0,2,18,0,2,18,10,4,2,2,3]},"lib/Getopt/Yath/Term.pm":{"branch":[[1,0],[0,31],[31.0,0],[0,31],[130,31],[0,161],[31.0,0],[31.0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,31,31,31,31,31,31,31,31,31,31,161,161,0,0,161,31,31,31,31],"subroutine":[1,1,1,1,1,31],"condition":[[0,0,31],[31,130,0]],"time":[1,1,4,1,1,15,4,0,4,22,1,45,0,180,2801,1,93,null,null,null,22,15,13,20,19,51,28,15,13,13,101,96,null,null,74,19,17,34,41]}},"dir":"/home/exodist/projects/Test2/Getopt-Yath","vec":{"lib/Getopt/Yath/Option/Bool.pm":{"subroutine":{"size":17,"vec":"ÿÿ\u0000"},"branch":{"vec":"\u0000\u0000","size":12},"statement":{"vec":"ÿÿÿ\u001f\u0000","size":34}},"lib/Getopt/Yath/HashBase.pm":{"condition":{"vec":"\u0004\u0000\u0019","size":21},"branch":{"size":70,"vec":"\u0005 Z\u0006\u0000€\u0005\u0000"},"statement":{"size":160,"vec":"ÿÿ¿Àÿÿÿÿÿ½, \u0001àú\u0000øÿÿ"},"subroutine":{"size":24,"vec":"ÿ\u000fä"}},"lib/Getopt/Yath/Instance.pm":{"condition":{"vec":"ª\u0000\u0002\u0000\u0006\u0000 V\u001dP \u0000\u0000\u0000\u0000\u0000","size":124},"subroutine":{"size":24,"vec":"ÿ)Ü"},"branch":{"vec":"\u0000 \u0000\u0000\u0002DÀVÚ\u0000Ë¡åÀ\u0000\u0010a¬\u001b\u0000\u0000","size":166},"statement":{"vec":"ÿÿÿ?ø\u0001\u0000\u0000ø\u0001\u0000\u0000ð¹³ÿÿÿ\u0000Ïçÿÿðóÿý\u000fÎÿÿÿÿñÿÿÿÏ\u0007","size":331}},"lib/Getopt/Yath/Option/AutoMap.pm":{"statement":{"vec":"ÿÿ\u0007","size":19},"subroutine":{"size":11,"vec":"ÿ\u0007"}},"lib/Getopt/Yath/Option.pm":{"condition":{"vec":"\u0019€!ÀkP\u0001`I\u0001\u0000\u0000","size":96},"subroutine":{"size":44,"vec":"Pùþ\u000f"},"branch":{"vec":"m@\u0001 \u0000\u0013°\u0001\u0000\u0000*\u0000\u0000\b\u0010\u0000@","size":152},"statement":{"size":278,"vec":"ÿÿ\u001fTþÿÿÿû\u000fØûÿÿ÷?\u0000Àÿ÷ÿÿ_ÿÿÿþ\u0001ÿÿ?ÿÿ?"}},"lib/Getopt/Yath/Option/List.pm":{"subroutine":{"vec":"ÿý\u001f","size":21},"branch":{"size":18,"vec":"\u0000€\u0001"},"statement":{"size":75,"vec":"ÿÿ÷ÿý\u001f€Ïÿ\u0007"},"condition":{"vec":"\u0000","size":7}},"lib/Getopt/Yath/Option/Count.pm":{"condition":{"size":5,"vec":"\u0004"},"subroutine":{"vec":"ÿß\u0007","size":20},"branch":{"size":6,"vec":"\u0002"},"statement":{"vec":"ÿÿÿþ\u001f\u0000","size":41}},"lib/Getopt/Yath/Settings/Group.pm":{"condition":{"vec":"\u0000","size":3},"subroutine":{"size":13,"vec":"\u000f\t"},"statement":{"size":43,"vec":"ÿ\u000f\u0000\u001ex\u0000"},"branch":{"size":16,"vec":"\u0000\u0000"}},"lib/Getopt/Yath/Settings.pm":{"condition":{"size":5,"vec":"\u0000"},"subroutine":{"vec":"?\t","size":15},"branch":{"size":16,"vec":"\u0000\u0000"},"statement":{"vec":"ÿÿ\u000fxÀ\u0003\u0000","size":54}},"lib/Getopt/Yath.pm":{"condition":{"vec":"\u0006\u0003","size":16},"subroutine":{"vec":"ÿ;","size":15},"branch":{"vec":"\u0002À#","size":22},"statement":{"size":71,"vec":"ÿÿÿÿ\u000füÿÿ~"}},"lib/Getopt/Yath/Util.pm":{"condition":{"vec":"\u0000\u0000","size":9},"subroutine":{"size":12,"vec":"?\f"},"branch":{"vec":"\u0000\u0000\u0000\u0000","size":28},"statement":{"vec":"ÿÿ\u0003\u0000\u0000ü?ð\u000e\u0000","size":73}},"lib/Getopt/Yath/Option/Map.pm":{"subroutine":{"vec":"ÿý\u001f","size":21},"branch":{"size":22,"vec":"\f \u0000"},"statement":{"vec":"ÿÿ÷ÿÿÿ÷ÿ\u000fÀ÷\u0001","size":89},"condition":{"vec":"\u0000\u0002","size":12}},"lib/Getopt/Yath/Option/Auto.pm":{"statement":{"size":22,"vec":"ÿÿ\u0003"},"branch":{"vec":"\u0000","size":4},"subroutine":{"size":11,"vec":"ÿ\u0003"}},"lib/Getopt/Yath/Term.pm":{"condition":{"size":6,"vec":"\f"},"statement":{"vec":"ÿÿñÿ|","size":39},"branch":{"size":16,"vec":"™Z"},"subroutine":{"size":6,"vec":"?"}},"lib/Getopt/Yath/Option/AutoList.pm":{"statement":{"size":18,"vec":"ÿÿ\u0003"},"subroutine":{"vec":"ÿ\u0003","size":10}},"lib/Getopt/Yath/Option/Scalar.pm":{"branch":{"size":6,"vec":"\u0004"},"statement":{"vec":"ÿÿ\u0001","size":26},"subroutine":{"size":13,"vec":"\u001f"}}},"name":"/home/exodist/projects/Test2/Getopt-Yath","start":1775441775.5397,"perl":"5.42.2","OS":"linux","run":"t/getopt_yath.t","digests":{"lib/Getopt/Yath/Option/Map.pm":"6a827e48e74afc25312686ca19d59be8","lib/Getopt/Yath/Util.pm":"a20e1ed3446db7439850620b7acfc96c","lib/Getopt/Yath/Settings.pm":"5935a1c1dc8a7b5d8a398c10d88be35b","lib/Getopt/Yath.pm":"f32ba23251c7beef0a4fe0eaa54fe555","lib/Getopt/Yath/Settings/Group.pm":"074198fa9d9f930e73513c89f513402e","lib/Getopt/Yath/Option/Count.pm":"eb8bc1a2c2dfe8bb39eb83c8ede73cba","lib/Getopt/Yath/Option/List.pm":"123a2812c394bf08bb84455b37b6292d","lib/Getopt/Yath/Option.pm":"c966eed5df47d66977103c0068d2ccc5","t/getopt_yath.t":"f7a9c2e858acae2de01fc250adeedc8d","lib/Getopt/Yath/Option/AutoMap.pm":"97ba764446ce74b6c33a1ab4b586dfaf","lib/Getopt/Yath/Instance.pm":"9b30e2fc1222fa186afd5bf5a7376d18","lib/Getopt/Yath/HashBase.pm":"7d23b0bf85ec79b212a8f76564523107","lib/Getopt/Yath/Option/Bool.pm":"e169eb9cf9ee8f25fe6c90a46c963bb0","lib/Getopt/Yath/Option/Scalar.pm":"77cca76ea82c90e86e9c2d1d1fe60337","lib/Getopt/Yath/Option/AutoList.pm":"a6b7b00c9e2237d585b5223604d20bb3","lib/Getopt/Yath/Term.pm":"f3a721bedf2a61b478c4702a40da962c","lib/Getopt/Yath/Option/Auto.pm":"416b69c8408206cdd3a54ba7fb914057"}},"1775441777.2234149.40588":{"version":"unknown","finish":1775441777.91112,"collected":["branch","condition","statement","subroutine","time"],"count":{"lib/Getopt/Yath/Term.pm":{"branch":[[1,0],[1.0,0],[1.0,12],[2,11],[56,12],[6,62],[12.0,1],[4.0,9]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,13,13,13,13,1,1,13,13,13,13,68,68,6,6,62,13,13,4,13],"subroutine":[1,1,1,1,1,13],"condition":[[0,1,0],[12,50,6]],"time":[42049,2,4,1,1,19,138,1622,3,20,1,48,0,189,3026,1,119,null,null,null,39491,9,5,12,2,7,16,5,9,8,44,51,7,3,31,11,7,10,21]}},"dir":"/home/exodist/projects/Test2/Getopt-Yath","vec":{"lib/Getopt/Yath/Term.pm":{"condition":{"vec":"\u0002","size":6},"subroutine":{"size":6,"vec":"?"},"statement":{"vec":"ÿÿñÿ","size":39},"branch":{"size":16,"vec":"• "}}},"name":"/home/exodist/projects/Test2/Getopt-Yath","start":1775441777.89937,"OS":"linux","perl":"5.42.2","run":"t/term.t","digests":{"t/term.t":"2e883e5af3a8c533ecbc749a22d28745","lib/Getopt/Yath/Term.pm":"f3a721bedf2a61b478c4702a40da962c"}},"1775441778.2233932.64367":{"digests":{"/home/exodist/perl5/perlbrew/perls/main/bin/prove":"becf4247919f617ab51cb6d1ac26c424"},"run":"/home/exodist/perl5/perlbrew/perls/main/bin/prove","perl":"5.42.2","OS":"linux","name":"/home/exodist/projects/Test2/Getopt-Yath","vec":{"/home/exodist/perl5/perlbrew/perls/main/bin/prove":{"branch":{"vec":"\t","size":4},"statement":{"size":13,"vec":"ÿ\u001f"},"subroutine":{"vec":"\u000f","size":4}}},"start":1775441773.77037,"dir":"/home/exodist/projects/Test2/Getopt-Yath","count":{"/home/exodist/perl5/perlbrew/perls/main/bin/prove":{"time":[22590,57,1664,1767,8,0,9,2,1,18,155,14818,660],"subroutine":[1,1,1,1],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1],"branch":[[1,0],[0,1]]}},"collected":["branch","condition","statement","subroutine","time"],"finish":1775441778.31099,"version":"unknown"},"1775441775.2233989.40588":{"version":"unknown","finish":1775441774.9704,"collected":["branch","condition","statement","subroutine","time"],"dir":"/home/exodist/projects/Test2/Getopt-Yath","count":{"lib/Getopt/Yath/Option.pm":{"subroutine":[1,1,1,1,1,1,1,0,0,0,0,0,0,0,4,0,7,0,0,3,2,7,6,53,5,0,14,0,7,0,25,0,2,18,4,53,2,15,13,16,4,18,14,4],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,4,0,7,0,0,3,2,53,53,53,53,53,53,53,5,5,5,5,0,0,0,0,0,0,5,0,0,14,14,14,14,4,4,4,4,0,0,0,0,7,7,0,0,0,0,25,25,25,0,0,0,0,2,2,2,18,18,0,18,18,4,4,0,4,4,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,1,0,53,53,53,53,159,7,3,53,159,0,0,0,53,53,53,458,53,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,9,9,9,9,9,1,9,9,1,9,9,0,9,9,9,9,9,13,13,13,7,7,7,15,0,7,16,16,16,9,7,2,4,4,4,4,3,0,1,0,18,18,18,18,18,18,47,18,18,0,0,18,4,4,22,18,104,104,104,104,104,18,18,18,0,18,18,14,14,14,14,14,14,1,5,1,1,1,0,1,13,13,13,13,14,14,0,14,0,14,0,14,14,14,3,18,14,28,28,3,2,14,1,1,14,4,4,4,4,29,29,4,4,1,1,4,1,1,4,1,1,4,4,3,8,4],"branch":[[0,53],[0,53],[5.0,0],[0,0],[0,0],[0,0],[0,14],[10.0,4],[0,4],[0,4],[0,0],[7.0,0],[25.0,0],[0,0],[0,2],[0,18],[0,4],[0,53],[0,53],[0,0],[0,53],[0,53],[0,53],[0,53],[0,53],[53.0,0],[1.0,0],[53.0,0],[0,0],[0,53],[0,53],[0,53],[152.0,7],[4.0,3],[0,3],[159.0,0],[0,0],[0,458],[0,2],[0,2],[2.0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[6.0,9],[0,9],[0,9],[6.0,7],[7.0,9],[7.0,2],[0,4],[3.0,0],[3.0,1],[1.0,0],[2,16],[18.0,0],[4.0,14],[0,26],[1,13],[0,14],[0,14],[0,14],[4,14],[14.0,0],[1.0,2],[1.0,0],[1,13],[1.0,12],[1.0,3],[1.0,3],[1.0,3],[4,4]],"time":[1,0,9,1,1,18,1,1,27,1,1,2,70,1,3,147,1,2,2,1,574,null,null,null,null,null,null,null,4,null,12,null,null,6,3,9749,77,47,40,44,35,75,3,5,3,11,null,null,null,null,null,null,9,null,null,8,9,14,22,2,3,5,5,null,null,null,null,4,9,null,null,null,null,12,19,34,null,null,null,null,1,3,43,11,15,null,10,21,4,4,null,2,5,22,54,70,35,36,49,40,35,26,47,64,57,40,42,59,24,59,2,null,42,55,39,37,124,8,6,36,117,null,null,null,53,46,107,403,47,2,5,2,4,4,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,11,15,10,8,12,9,5,2,13,7,2,13,3,null,14,17,10,9,10,9,8,14,6,5,4,11,null,11,8,12,18,9,8,5,3,5,3,4,4,null,2,null,10,10,14,13,23,12,38,10,20,null,null,15,4,5,16,18,64,65,55,57,66,9,14,9,null,18,25,24,12,10,16,8,11,2,49,17,1,12,null,15,9,10,10,14,19,11,null,10,null,10,null,20,5,12,3,21,9,14,64,3,3,26,2,4,28,2,4,6,4,18,15,10,4,1,2,6,1,1,4,2,1,1,4,4,9,10],"condition":[[14,0,0],[0,53,0],[0,0,0],[53,0,0],[52,1,0],[52,1,0],[53,0,0],[0,0,0],[0,53,0],[0,53,0],[1,52.0],[51,2,0],[50,3,0],[50,3,0],[0,3,0],[0,0],[25,28.0],[25,28.0],[0,0],[0,0],[0,0,0],[0,0,0],[0,9.0],[1,8.0],[1,8.0],[0,9.0],[0,7.0],[104,0],[104,0],[0,18.0],[14,0,0],[1,0],[1,0],[0,1.0],[13,0],[13,0],[1,12.0],[2,1,25],[3,25.0]]},"lib/Getopt/Yath/Option/Count.pm":{"subroutine":[1,1,1,1,1,0,0,0,0,5,0,0,0,3,0,0,0,2,0,2],"branch":[[0,2],[0,2],[1,1]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,5,0,0,0,0,3,0,0,0,0,0,2,2,2,2,2,2,0,2,2,2,2],"time":[1,1,10,1,0,19,1,1,32,1,1,2,20,1,2,null,null,null,null,4,null,null,null,null,5,null,null,null,null,null,6,1,2,3,2,5,null,5,2,2,5],"condition":[[0,3.0],[1,1,0]]},"lib/Getopt/Yath/Option/List.pm":{"time":[64,0,10,2,0,15,1,1,3,9,0,2,15,1,1,7,7,5,null,null,4,7,null,null,null,null,3,3,7,1,2,1,3,null,1,2,1,5,2,5,1,1,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,4,1,1,3,5,6,4,2,1,11,4,3],"condition":[[1,0],[1,0],[1,0,1]],"subroutine":[1,1,1,1,1,7,7,5,0,0,6,4,0,1,1,2,0,3,2,4,3],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,7,7,5,0,0,6,4,0,0,0,0,1,1,1,1,1,1,1,0,1,1,1,2,2,2,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,2,4,4,4,4,4,3,3,3,3,3],"branch":[[0,0],[1.0,0],[0,0],[0,1],[0,1],[1.0,1],[0,0],[0,0],[0,0]]},"lib/Getopt/Yath/Settings/Group.pm":{"branch":[[5,1],[0,0],[0,0],[0,0],[0,0],[0,0],[6.0,0],[0,0]],"statement":[1,1,1,1,1,1,1,1,1,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,22,22,22,22,0,0,0,0,0,0,6,6,6,6,0,0,0,0],"subroutine":[1,1,1,6,0,0,0,0,22,0,0,6,0],"condition":[[22,0,0]],"time":[1,0,5,0,1,10,1,0,148,6,6,10,null,null,null,null,null,null,null,null,null,null,null,null,null,14,10,16,23,null,null,null,null,null,null,2,4,10,20]},"lib/Getopt/Yath/Option/Map.pm":{"time":[83,1,6,1,0,15,1,1,3,9,0,3,19,0,2,null,null,null,null,null,2,10,0,2,7,4,1,1,3,null,2,2,1,3,3,null,null,null,null,5,6,8,null,null,null,null,3,1,3,0,3,null,1,2,2,2,2],"condition":[[0,2.0],[0,6.0],[1,0],[1,0],[0,0],[0,0]],"subroutine":[1,1,1,1,1,0,0,0,0,0,2,3,2,2,0,6,0,1,1,0,0],"branch":[[0,2],[0,0],[1.0,0],[0,0],[0,1],[0,1],[0,0],[0,0],[0,0],[0,0],[0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,2,3,2,2,2,2,2,2,4,0,2,2,2,2,2,0,0,0,0,6,6,6,0,0,0,0,1,1,1,1,1,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"lib/Getopt/Yath/Settings.pm":{"subroutine":[1,1,1,1,1,6,0,0,22,0,0,6,0,0,0],"branch":[[6,0],[0,0],[0,0],[17.0,5],[5.0,0],[0,0],[6.0,0],[0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,6,6,6,6,0,0,0,0,0,0,0,22,22,22,5,0,0,0,0,0,0,0,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0],"time":[2,0,6,1,1,18,1,0,5,58,1,8,1,1,2,8,7,6,8,5,null,null,null,null,null,null,null,11,12,21,13,null,null,null,null,null,null,null,776,5,15,15],"condition":[[0,0,0],[0,0]]},"lib/Getopt/Yath.pm":{"condition":[[0,19.0],[18,1,0],[0,0,0],[0,1.0],[0,0,0],[0,1,0]],"time":[44323,2,5,2,0,16,1,1,13,63,1,2,116,1,9,1,1,152,1,0,47,765,12,9,18,15,16,10,13,664,13,61,38,31,27,27,null,null,null,null,null,null,21,11,3,0,2,108,null,18,11718,45,null,21,13,13,21,18,11,16,30,26,28,15,null,15,53,188,54,110,33904],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,19,19,19,19,19,19,19,19,16,19,25,25,25,25,19,0,0,0,0,0,0,19,1,1,1,1,1,0,19,22,22,0,22,22,22,22,22,22,22,22,19,4,19,0,19,127,127,126,126,18],"branch":[[0,19],[25,0],[0,0],[0,0],[0,0],[0,1],[1.0,0],[0,22],[0,22],[0,22],[1.0,126]],"subroutine":[1,1,1,1,1,1,1,19,16,25,0,1,22,4,0]},"lib/Getopt/Yath/Util.pm":{"condition":[[0,0,0],[0,1.0],[53,0,0]],"time":[1,0,5,1,0,9,1,0,13,3,1,5,126,1569,3,326,5568,276,null,null,null,null,null,574,1,153,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,33,30,28,64,29,679,40,34,46,39,41,38,null,null,null,null,null,null,29,26,106,37,null,23,48,80],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,53,53,53,53,53,53,53,53,53,53,53,53,0,0,0,0,0,0,53,53,53,53,0,53,53,53,0,0,0,0,0],"branch":[[0,0],[0,0],[0,0],[0,53],[0,53],[53.0,0],[0,53],[0,53],[0,0],[0,0],[0,53],[0,53],[53.0,0],[0,53]],"subroutine":[1,1,1,1,1,1,0,1,0,0,53,53]},"lib/Getopt/Yath/HashBase.pm":{"subroutine":[1,1,1,1,1,1,1,1,50,12,12,12,0,0,0,0,0,0,12,0,0,62,84,84],"branch":[[1,0],[1,0],[12.0,0],[0,10],[10.0,2],[12,0],[0,16],[455,40],[49.0,1],[0,39],[39,0],[39.0,11],[0,1],[1,0],[0,0],[0,0],[1,49],[0,49],[0,49],[0,50],[0,0],[0,0],[10,2],[10,2],[0,0],[0,0],[0,0],[0,84],[10.0,74],[84.0,0],[12.0,0],[12.0,0],[12.0,0],[12.0,0],[12.0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,1,1,1,1,1,1,50,12,12,12,12,12,12,12,12,12,12,12,12,12,10,10,12,16,12,12,495,455,455,40,40,12,12,12,12,12,50,50,50,50,50,50,50,0,50,50,50,39,0,39,0,0,50,1,0,1,0,0,0,0,0,0,0,50,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,12,12,12,0,12,0,12,12,62,84,12,12,62,84,12,84,84,84,0,0,0,0,0,0,0,0,0,0,0,0,84,84,84,84,84,84,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12],"time":[1,0,8,1,0,21,1,1,33,1,1,54,1,0,44,1,3,1,91,687,2,4,null,113,null,null,null,null,null,null,1,0,412,1,1,61,33,6,11,12,5,7,15,15,20,23,15,9,3,41,8,11,22,49,14,27,265,180,2059,22,1600,8,7,19,8,9,25,27,27,40,32,34,76,null,36,22,30,22,null,46,null,null,38,3,null,2,null,null,null,null,null,null,null,36,null,null,44,null,null,null,null,null,null,null,null,null,null,null,null,8,11,19,null,20,null,21,17,38,63,16,15,40,46,21,6978,37,63,null,null,null,null,null,null,null,null,null,null,null,null,90,82,49,100,48,91,9,18,8,6,7,18,5,23,6,15,7,19,4,14,26],"condition":[[0,0,1],[12,0,0],[12,0,0],[0,12.0],[0,12.0],[10,0],[49,1.0],[0,0],[11,1.0]]},"lib/Getopt/Yath/Option/Bool.pm":{"time":[2,0,9,1,0,22,1,1,3,26,0,3,null,1,10,3,3,17,3,3,7,7,10,null,null,1,1,4,5],"subroutine":[1,1,1,1,0,1,7,2,2,25,2,5,8,0,2,5,0],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,0,1,7,2,2,25,2,5,5,8,8,0,0,2,2,2,5,0,0,0,0,0],"branch":[[3,2],[0,2],[0,2],[0,0],[0,0],[0,0]]},"lib/Getopt/Yath/Option/BoolMap.pm":{"time":[2,1,12,2,0,26,1,1,28,1,0,3,15,1,2,1,null,null,null,4,5,3,1,6,2,3,3,2,0,14,0,3,2,4,null,null,null,null,null,null,null,null,null,null,null,null,2,1,4,3,2,3,4],"subroutine":[1,1,1,1,1,2,0,0,0,4,3,1,4,1,2,2,0,0,0,2],"branch":[[1,0],[0,4],[0,0],[0,0],[0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,0,0,0,4,3,1,4,4,4,4,1,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2]},"lib/Getopt/Yath/Instance.pm":{"condition":[[0,31.0],[0,31.0],[0,31.0],[0,31.0],[3,0],[0,3.0],[1,0],[0,0,0],[40,0],[5,2.0],[2,1,3],[4,2,1],[0,0,6],[1,5,0],[0,6.0],[1,5.0],[0,0,6],[6,0],[1,5.0],[1,5.0],[1,5.0],[0,6,0],[0,0,0],[0,0,0],[3,0,0],[3,0,0],[0,3,0],[2,0,1],[2,0,1],[2,0,1],[0,6,0],[6,0,0],[2,0,0],[0,6.0],[0,0],[2,13,0],[15,0],[15,0],[14,1,3],[0,10.0],[0,10.0],[0,5,1],[5,0,1],[0,1,3],[1,1,2],[1,2.0],[1,2.0],[7,1,2],[8,2,0]],"time":[1,1,6,1,0,19,1,1,13,1,1,1,150,1,8,85,1,8,1,1,2,12,1,1,15,45,38,32,46,18,121,18,16,448,4,2,3,2,4,1,10,5,3,2,2,2,6,4,3,1,1,2,1,3,null,null,null,null,null,0,4,2,3,1,1,2,3,24,25,32,53,16,42,5,10,4,8,6,4,4,6,9,5,2,4,3,3,5,1,449,3,5,4,0,5,7,4,7,4,7,15,6,8,9,2,6,6,9,10,13,null,10,9,18,4,null,16,6,5,220,5,11,4,19,10,6,12,null,3,8,11,6,28,7,11,14,3,9,10,5,5,4,null,null,10,5,9,13,null,2,12,1,1,1,2,3,2,null,3,null,7,3,4,5,null,null,4,null,null,6,null,null,null,null,null,null,null,2,6,null,null,null,null,null,null,null,null,6,4,4,null,null,null,null,null,null,4,3,null,null,null,null,null,null,null,5,6,6,4,4,5,3,4,null,null,null,null,3,5,2,1,4,1,2,6,7,1,2,5,null,null,null,null,2,3,4,null,null,null,null,null,7,4,3,null,null,2,4,6,6,5,5,10,5,3,7,2,null,7,2,2,6,2,5,10,6,5,10,null,null,12,5,9,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,13,12,16,29,5,11,25,18,15,13,14,12,8,13,9,null,11,13,4,5,12,19,38,50,27,14,11,50,30,19,7,9,14,9,7,11,9,5,9,8,16,9,12],"branch":[[0,3],[0,3],[0,3],[3.0,0],[0,0],[0,3],[0,40],[4.0,3],[2.0,1],[3.0,3],[1,6],[1.0,3],[1.0,6],[4,7],[0,12],[1.0,0],[1.0,22],[4.0,5],[0,6],[6.0,0],[0,0],[5,0],[0,0],[5.0,2],[1.0,2],[0,2],[0,3],[0,3],[0,0],[0,0],[0,3],[0,0],[0,0],[0,0],[0,0],[0,3],[0,0],[0,0],[0,3],[0,3],[0,0],[0,0],[0,3],[0,3],[0,3],[0,0],[0,3],[0,3],[0,1],[1.0,2],[1.0,0],[1.0,2],[1.0,0],[0,0],[0,2],[0,2],[0,0],[0,0],[0,2],[0,0],[0,2],[0,0],[4.0,2],[0,2],[5.0,0],[0,0],[0,6],[6.0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[18.0,0],[0,15],[0,15],[1.0,14],[0,14],[0,14],[15.0,3],[6,4]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,31,31,31,31,31,31,12,12,12,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,3,0,0,0,0,0,3,3,3,3,1,1,1,3,40,40,40,40,40,40,7,7,7,7,7,7,7,7,7,3,3,3,3,3,3,1,7,7,7,7,1,6,6,4,6,4,3,11,11,11,11,4,7,7,10,10,12,0,12,12,23,1,0,22,9,5,6,6,6,6,6,6,6,6,0,6,7,6,6,6,6,7,7,7,7,5,5,5,5,0,0,5,5,7,6,0,6,6,1,1,1,3,3,2,0,2,0,6,3,3,3,0,0,3,0,0,3,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,3,3,3,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,0,0,0,0,3,3,1,1,3,1,1,3,1,2,2,2,0,0,0,0,2,2,2,0,0,0,0,0,2,2,2,0,0,2,5,6,6,6,6,6,6,2,5,5,0,5,2,2,2,2,5,6,6,6,6,0,0,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,15,15,15,15,15,18,15,15,15,15,15,15,14,14,0,14,14,4,14,14,18,15,15,18,18,14,14,14,10,10,10,10,10,10,10,6,6,4,4,10,10,10],"subroutine":[1,1,1,1,1,1,1,1,31,12,2,3,3,40,7,7,3,7,11,6,0,1,15,10]},"lib/Getopt/Yath/Option/Scalar.pm":{"branch":[[1,0],[0,2],[1,1]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,6,6,0,8,1,1,1,1,2,2,2,2,2],"subroutine":[1,1,1,1,1,6,6,0,8,1,1,2,2],"time":[54,1,5,1,0,12,1,1,1,14,0,2,2,5,7,null,7,1,1,1,1,3,4,2,1,5]},"lib/Getopt/Yath/Option/PathList.pm":{"subroutine":[1,1,1,1,0,2,2],"branch":[[0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2],"time":[1,1,7,1,1,22,1,1,2,12,1,1,null,null,null,null,null,null,null,null,1,2,3,2,3,1,1,3,2,3]},"lib/Getopt/Yath/Option/Auto.pm":{"time":[1,1,7,1,0,21,1,0,2,9,1,1,null,1,1,3,5,null,6,2,6,3],"subroutine":[1,1,1,1,0,1,1,2,2,0,3],"branch":[[1.0,2],[1,1]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,2,2,0,3,3,3,2]},"lib/Getopt/Yath/Term.pm":{"condition":[[0,21,0],[21,51,0]],"time":[1,1,5,1,0,21,1,0,2,19,1,50,0,187,2973,2,119,null,null,null,22,9,14,13,21,62,23,10,13,11,44,52,null,null,41,14,12,33,34],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,21,21,21,21,21,21,21,21,21,21,72,72,0,0,72,21,21,21,21],"branch":[[1,0],[21.0,0],[21.0,0],[0,21],[51,21],[0,72],[21.0,0],[21.0,0]],"subroutine":[1,1,1,1,1,21]},"lib/Getopt/Yath/Option/AutoPathList.pm":{"subroutine":[1,1,1,1,1,1,1,1],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],"time":[2,1,8,2,0,26,1,0,10,1,1,2,10,1,1,53,1,0,3,2,2,1,0,2,1,1]},"lib/Getopt/Yath/Option/AutoList.pm":{"time":[61,1,4,1,1,13,1,0,1,16,0,2,4,1,1,1,1,1],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,3,2,1,1,1,1],"subroutine":[1,1,1,1,3,2,1,1,1,1]}},"start":1775441774.92226,"vec":{"lib/Getopt/Yath/Option/Scalar.pm":{"statement":{"vec":"ÿÿ\u0003","size":26},"branch":{"size":6,"vec":"1"},"subroutine":{"size":13,"vec":"\u001f"}},"lib/Getopt/Yath/Term.pm":{"condition":{"vec":"\u001a","size":6},"branch":{"size":16,"vec":"•S"},"statement":{"size":39,"vec":"ÿÿñÿ|"},"subroutine":{"size":6,"vec":"?"}},"lib/Getopt/Yath/Option/AutoList.pm":{"statement":{"vec":"ÿÿ\u0003","size":18},"subroutine":{"vec":"ÿ\u0003","size":10}},"lib/Getopt/Yath/Option/AutoPathList.pm":{"statement":{"vec":"ÿÿÿ\u0003","size":26},"subroutine":{"vec":"ÿ","size":8}},"lib/Getopt/Yath/Option/PathList.pm":{"branch":{"vec":"\u0000","size":2},"statement":{"vec":"ÿ\u000fð?","size":30},"subroutine":{"vec":"o","size":7}},"lib/Getopt/Yath/Option/Auto.pm":{"subroutine":{"size":11,"vec":"ï\u0005"},"branch":{"vec":"\r","size":4},"statement":{"size":22,"vec":"ÿï="}},"lib/Getopt/Yath/Option/Map.pm":{"condition":{"vec":"P\u0000","size":12},"statement":{"size":89,"vec":"ÿð߇Ã÷\u0001\u0000\u0000\u0000\u0000"},"branch":{"size":22,"vec":"\u0010\n\u0000"},"subroutine":{"size":21,"vec":"\u001f¼\u0006"}},"lib/Getopt/Yath.pm":{"subroutine":{"vec":"ÿ;","size":15},"branch":{"vec":"\u0006\u0018\u0010","size":22},"statement":{"size":71,"vec":"ÿÿÿÿ\u000füîÿ~"},"condition":{"size":16,"vec":"\nB"}},"lib/Getopt/Yath/Settings.pm":{"branch":{"size":16,"vec":"À\u0001"},"statement":{"vec":"ÿÿ\u000fxÀ\u0003\u0000","size":54},"subroutine":{"vec":"?\t","size":15},"condition":{"size":5,"vec":"\u0000"}},"lib/Getopt/Yath/Util.pm":{"statement":{"vec":"ÿÿƒ\u0003\u0000ü?ð\u000e\u0000","size":73},"branch":{"vec":"€¦ \t","size":28},"subroutine":{"size":12,"vec":"¿\f"},"condition":{"vec":"0","size":8}},"lib/Getopt/Yath/Option.pm":{"condition":{"size":96,"vec":"\u0010\"\u0005R‘D\u0001`)€²ò"},"statement":{"size":278,"vec":"ÿÿ\u001fPþ?\u0018\u000eßûÿÿñ?\u0000Àÿ÷ÿþ_ÿùÿþ¿¿úÿÿÿ?"},"branch":{"size":152,"vec":"\u001a\u0000@\u0001(ªV¨j\u0000\u0000\u0000ªG\u00070\u0000u?"},"subroutine":{"size":44,"vec":"@ùUÿ\u000f"}},"lib/Getopt/Yath/Settings/Group.pm":{"condition":{"size":3,"vec":"\u0000"},"statement":{"vec":"ÿ\u000f\u0000\u001ex\u0000","size":43},"branch":{"vec":"\u0003\u0000","size":16},"subroutine":{"vec":"\u000f\t","size":13}},"lib/Getopt/Yath/Option/List.pm":{"condition":{"vec":"U","size":7},"subroutine":{"size":21,"vec":"ÿì\u001e"},"statement":{"size":75,"vec":"ÿÿ3üý\u0003\u0000€ÿ\u0007"},"branch":{"size":18,"vec":"„\u000e\u0000"}},"lib/Getopt/Yath/Option/Count.pm":{"statement":{"vec":"ÿ\bÁï\u0001","size":41},"branch":{"size":6,"vec":"0"},"subroutine":{"vec":"\u001f\"\n","size":20},"condition":{"size":5,"vec":"\u000e"}},"lib/Getopt/Yath/Option/BoolMap.pm":{"branch":{"size":10,"vec":"\u0001\u0000"},"statement":{"vec":"ÿÿøÿ\u0003À\u001f","size":53},"subroutine":{"vec":"?þ\b","size":20}},"lib/Getopt/Yath/Instance.pm":{"statement":{"size":331,"vec":"ÿÿÿÿÿÿ?øÿÿÿÿÿ¿÷ÿ?ï_O\u0002\u000680à\u001fþ\u001f\u000eÎÿýÏ\u0001\u0000ÿÿÿÿ\u0007"},"branch":{"size":166,"vec":"jˆÞI\tD¡ €  ¢V\u0001\u0000\u0000\u0001\u0000\u0000\u001a\f"},"subroutine":{"size":24,"vec":"ÿÿï"},"condition":{"vec":"ª\u0019ÈÄ\u0018ü\u0000\u0012‘\u0004\u0000*ƒëÕ\u0000","size":124}},"lib/Getopt/Yath/HashBase.pm":{"condition":{"size":21,"vec":"\u0004€\u0019"},"subroutine":{"size":24,"vec":"ÿ\u000fä"},"statement":{"vec":"ÿÿ¿Àÿÿÿÿÿ½, \u0001àú\u0000øÿÿ","size":160},"branch":{"vec":"\u0005@Û\u0006+\u0000\u0000\u0000\u0000","size":70}},"lib/Getopt/Yath/Option/Bool.pm":{"statement":{"size":34,"vec":"ÿï\u001e\u0000"},"branch":{"size":12,"vec":"\u0001\u0000"},"subroutine":{"vec":"ïß\u0000","size":17}}},"name":"/home/exodist/projects/Test2/Getopt-Yath","run":"t/coverage.t","OS":"linux","perl":"5.42.2","digests":{"lib/Getopt/Yath/Option/Scalar.pm":"77cca76ea82c90e86e9c2d1d1fe60337","lib/Getopt/Yath/Option/AutoList.pm":"a6b7b00c9e2237d585b5223604d20bb3","lib/Getopt/Yath/Option/AutoPathList.pm":"3502465c9985752ba64a6402725cd6e0","lib/Getopt/Yath/Term.pm":"f3a721bedf2a61b478c4702a40da962c","lib/Getopt/Yath/Option/Auto.pm":"416b69c8408206cdd3a54ba7fb914057","lib/Getopt/Yath/Option/PathList.pm":"fa9c9542d07de5fed488a0ccd13644ce","t/coverage.t":"0cfde98f905d7f5b67558df6ed6f862a","lib/Getopt/Yath/Util.pm":"a20e1ed3446db7439850620b7acfc96c","lib/Getopt/Yath.pm":"f32ba23251c7beef0a4fe0eaa54fe555","lib/Getopt/Yath/Settings.pm":"5935a1c1dc8a7b5d8a398c10d88be35b","lib/Getopt/Yath/Option/Map.pm":"6a827e48e74afc25312686ca19d59be8","lib/Getopt/Yath/Settings/Group.pm":"074198fa9d9f930e73513c89f513402e","lib/Getopt/Yath/Option/List.pm":"123a2812c394bf08bb84455b37b6292d","lib/Getopt/Yath/Option/Count.pm":"eb8bc1a2c2dfe8bb39eb83c8ede73cba","lib/Getopt/Yath/Option.pm":"c966eed5df47d66977103c0068d2ccc5","lib/Getopt/Yath/Instance.pm":"9b30e2fc1222fa186afd5bf5a7376d18","lib/Getopt/Yath/Option/BoolMap.pm":"d3e7a78339f259ed5077b808dc815c12","lib/Getopt/Yath/Option/Bool.pm":"e169eb9cf9ee8f25fe6c90a46c963bb0","lib/Getopt/Yath/HashBase.pm":"7d23b0bf85ec79b212a8f76564523107"}},"1775441776.2234084.40588":{"dir":"/home/exodist/projects/Test2/Getopt-Yath","count":{"lib/Getopt/Yath/Term.pm":{"time":[1,2,7,1,0,32,1,1,2,17,1,44,1,175,2795,1,92],"condition":[[0,0,0],[0,0,0]],"subroutine":[1,1,1,1,1,0],"branch":[[1,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"lib/Getopt/Yath/Option/Bool.pm":{"time":[1,1,7,1,1,31,1,1,4,24,1,2,null,5,null,null,null,14,null,null,null,null,null,3,2,3,2,2],"subroutine":[1,1,1,1,0,2,0,0,0,16,0,0,0,1,1,0,0],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,0,2,0,0,0,16,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0],"branch":[[0,0],[0,1],[1,0],[0,0],[0,0],[0,0]]},"lib/Getopt/Yath/Option/Auto.pm":{"time":[2,1,13,1,1,23,1,1,2,18,2,2,1,null,null,1,2],"branch":[[0,0],[0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,0,0,0,0,0],"subroutine":[1,1,1,1,1,0,0,1,1,0,0]},"lib/Getopt/Yath/HashBase.pm":{"time":[1,1,6,1,0,20,1,1,29,4,0,52,4,2,45,1,3,1,101,691,2,4,null,109,null,null,null,null,null,null,1,1,411,1,1,65,26,4,5,8,4,5,10,12,10,13,9,5,3,23,5,9,10,27,8,15,139,101,938,20,746,4,5,9,7,5,16,22,14,22,23,24,58,null,19,17,22,24,null,35,null,null,24,null,null,null,null,null,null,null,null,null,null,26,null,null,24,null,null,null,null,null,null,null,null,null,null,null,null,4,7,11,null,8,null,11,10,28,30,10,8,16,25,12,26,18,31,null,null,null,null,null,null,null,null,null,null,null,null,43,44,26,51,22,33,4,9,4,1,5,12,2,13,2,11,4,7,3,7,15],"condition":[[0,0,1],[6,0,0],[6,0,0],[0,6.0],[0,6.0],[5,0],[35,0],[0,0],[5,1.0]],"subroutine":[1,1,1,1,1,1,1,1,35,6,6,6,0,0,0,0,0,0,6,0,0,44,32,43],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,1,1,1,1,1,1,35,6,6,6,6,6,6,6,6,6,6,6,6,6,5,5,6,6,6,6,266,235,235,31,31,6,6,6,6,6,35,35,35,35,35,35,35,0,35,35,35,31,0,31,0,0,35,0,0,0,0,0,0,0,0,0,0,35,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,0,6,0,6,6,44,43,6,6,32,31,6,43,43,43,0,0,0,0,0,0,0,0,0,0,0,0,43,43,43,43,31,31,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6],"branch":[[1,0],[1,0],[6.0,0],[0,5],[5.0,1],[6,0],[0,6],[235,31],[35.0,0],[0,31],[31,0],[31.0,4],[0,0],[0,0],[0,0],[0,0],[0,35],[0,35],[0,35],[0,35],[0,0],[0,0],[5,1],[5,1],[0,0],[0,0],[0,0],[0,43],[5.0,38],[43.0,0],[6.0,0],[6.0,0],[6.0,0],[6.0,0],[6.0,0]]},"lib/Getopt/Yath/Util.pm":{"branch":[[0,0],[0,0],[0,0],[0,43],[0,43],[43.0,0],[0,43],[0,43],[0,0],[0,0],[0,43],[0,43],[43.0,0],[0,43]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,43,43,43,43,43,43,43,43,43,43,43,0,0,0,0,0,0,43,43,43,43,0,43,43,43,0,0,0,0,0],"subroutine":[1,1,1,1,1,1,0,0,0,0,43,43],"condition":[[0,0,0],[0,0,0],[43,0,0]],"time":[1,1,4,1,0,13,0,1,11,2,1,5,137,1671,3,344,6175,276,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,28,24,19,48,21,517,29,25,39,26,36,29,null,null,null,null,null,null,25,26,64,29,null,21,24,63]},"lib/Getopt/Yath/Option.pm":{"condition":[[3,0,0],[1,41,1],[1,0,1],[40,2,0],[39,0,1],[33,5,1],[35,2,1],[1,0,0],[1,35,0],[1,35,0],[4,32.0],[32,3,1],[34,1,0],[33,1,1],[0,1,1],[3,1.0],[0,32.0],[1,31.0],[0,2.0],[0,0],[9,0,0],[9,0,0],[1,3.0],[1,3.0],[1,3.0],[1,3.0],[0,0],[10,0],[10,0],[1,0],[0,0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0,0],[0,0]],"time":[42756,3,5,1,0,12,1,1,19,60,1,3,86,0,4,141,0,3,2,0,572,null,null,null,null,null,73,null,1,2,6,null,null,1,9,56008,56,84,137,37,23,62,17,5,2,5,3,3,3,6,5,5,null,null,null,1,3,4,3,1,5,2,3,4,2,3,2,3,1,2,null,null,null,5,2,3,1,3,1,5,6,4,3,1,2,null,1,2,1,1,null,1,2,18,36,93,120,72,30,71,81,23,26,44,31,24,18,40,17,36,6,53,35,33,30,24,78,4,49,17,64,6,3,44,47,38,62,274,25,666,5,7,7,10,5,3,5,2,12,14,4,3,2,6,8,8,null,9,16,9,12,4,4,5,8,3,2,3,5,2,2,5,3,2,8,4,4,6,3,1,3,2,null,null,null,null,null,null,2,1,2,1,2,null,2,1,1,2,2,null,null,null,4,1,1,2,2,2,2,1,2,2,2,2,3,1,3,3,6,10,4,7,9,1,2,1,1,2,2],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,0,1,1,2,0,0,1,2,45,45,45,44,43,43,43,4,4,4,4,5,5,5,5,4,2,0,0,0,3,3,3,3,3,3,1,1,2,2,2,1,1,1,1,0,0,0,2,2,2,1,1,1,1,2,2,1,1,1,0,1,1,1,1,0,1,1,43,43,43,42,41,40,39,38,37,37,36,36,37,37,37,36,36,5,1,36,35,35,34,100,4,2,33,97,4,4,1,32,32,32,270,31,9,9,9,8,8,7,7,7,9,9,2,2,5,5,11,11,9,0,9,5,7,5,5,4,4,4,4,4,1,4,4,1,4,4,1,4,4,4,4,4,2,2,2,0,0,0,0,0,0,1,1,1,1,1,0,1,1,1,1,1,0,0,0,1,1,1,1,1,1,2,1,1,1,2,1,1,1,3,1,10,10,10,10,10,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"branch":[[1.0,44],[1.0,43],[0,4],[1.0,4],[2.0,2],[1,1],[0,3],[0,3],[2.0,1],[0,1],[1.0,1],[0,1],[1.0,1],[0,1],[1.0,1],[0,1],[0,1],[0,43],[1.0,41],[1.0,1],[1.0,40],[1.0,39],[1.0,38],[1.0,37],[1.0,36],[36.0,1],[4.0,1],[36.0,1],[0,1],[1.0,35],[0,35],[1.0,34],[96.0,4],[2.0,2],[1.0,1],[93.0,4],[3.0,1],[1.0,269],[1.0,8],[0,8],[1.0,7],[0,11],[2.0,9],[0,0],[2,7],[2,5],[5,0],[4.0,5],[1.0,4],[1.0,3],[1.0,3],[2.0,0],[0,1],[1.0,0],[0,1],[1.0,0],[1.0,0],[0,0],[0,1],[0,1],[1.0,0],[0,3],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"subroutine":[1,1,1,1,1,1,1,0,0,0,0,0,1,0,1,1,2,0,0,1,2,0,0,45,4,0,3,2,1,0,2,1,2,1,1,43,9,5,2,1,1,1,0,0]},"lib/Getopt/Yath/Option/Count.pm":{"subroutine":[1,1,1,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"branch":[[0,0],[0,0],[0,0]],"time":[1,1,7,1,1,16,1,0,35,1,1,2,17,1,2,null,null,null,62],"condition":[[0,0],[0,0,0]]},"lib/Getopt/Yath/Option/List.pm":{"branch":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"subroutine":[1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"condition":[[0,0],[0,0],[0,0,0]],"time":[1,0,8,1,1,25,1,1,3,10,1,2,20,1,2]},"lib/Getopt/Yath/Option/Scalar.pm":{"time":[2,0,7,1,1,24,1,1,2,25,0,2,null,5,2,58,13],"branch":[[0,0],[0,0],[0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,0,3,2,1,18,0,0,0,0,0,0,0,0,0],"subroutine":[1,1,1,1,0,3,2,1,18,0,0,0,0]}},"start":1775441776.10613,"name":"/home/exodist/projects/Test2/Getopt-Yath","vec":{"lib/Getopt/Yath/Option/Bool.pm":{"subroutine":{"size":17,"vec":"/b\u0000"},"statement":{"size":34,"vec":"ÿ/‚\u000f\u0000"},"branch":{"size":12,"vec":"\u0018\u0000"}},"lib/Getopt/Yath/Option/Auto.pm":{"subroutine":{"vec":"Ÿ\u0001","size":11},"branch":{"vec":"\u0000","size":4},"statement":{"vec":"ÿŸ\u0001","size":22}},"lib/Getopt/Yath/HashBase.pm":{"condition":{"size":21,"vec":"\u0004 \u0018"},"statement":{"vec":"ÿÿ¿Àÿÿÿÿÿ½\u0004 \u0001àú\u0000øÿÿ","size":160},"branch":{"vec":"…ÃY\u0000ªð€\u0005\u0000","size":70},"subroutine":{"vec":"ÿ\u000fä","size":24}},"lib/Getopt/Yath/Term.pm":{"condition":{"vec":"\u0000","size":6},"statement":{"vec":"ÿÿ\u0001\u0000\u0000","size":39},"branch":{"size":16,"vec":"\u0001\u0000"},"subroutine":{"size":6,"vec":"\u001f"}},"lib/Getopt/Yath/Option/List.pm":{"subroutine":{"vec":"\u001f\u0000\u0000","size":21},"branch":{"size":18,"vec":"\u0000\u0000\u0000"},"statement":{"size":75,"vec":"ÿ\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"},"condition":{"size":7,"vec":"\u0000"}},"lib/Getopt/Yath/Option/Count.pm":{"statement":{"size":41,"vec":"ÿ\u0004\u0000\u0000\u0000"},"branch":{"size":6,"vec":"\u0000"},"subroutine":{"size":20,"vec":"\u001f\u0001\u0000"},"condition":{"vec":"\u0000","size":5}},"lib/Getopt/Yath/Option/Scalar.pm":{"subroutine":{"vec":"ï\u0001","size":13},"branch":{"size":6,"vec":"\u0000"},"statement":{"vec":"ÿï\u0001\u0000","size":26}},"lib/Getopt/Yath/Option.pm":{"condition":{"vec":"yÑ7\u001bÖ=Cò\u000f\u0004\u0000\u0000","size":96},"branch":{"vec":"M¬º»úÝ©np\u001f+š=f¡\t\u0000\u0000\u0000","size":152},"statement":{"vec":"ÿÿ\u001ftþÿÿ?þßûÿÿÿÿÿÿûÿÿ\u000f|\u001fÿÿÿ\u0007\u0000\u0000\u0000\u0000\u0000\u0000\u0000","size":278},"subroutine":{"vec":"ЙÝÿ\u0003","size":44}},"lib/Getopt/Yath/Util.pm":{"subroutine":{"size":12,"vec":"?\f"},"branch":{"vec":"€¦ \t","size":28},"statement":{"size":73,"vec":"ÿÿ\u0003\u0000\u0000ü?ð\u000e\u0000"},"condition":{"size":9,"vec":"@\u0000"}}},"run":"t/option.t","perl":"5.42.2","OS":"linux","digests":{"lib/Getopt/Yath/Option/List.pm":"123a2812c394bf08bb84455b37b6292d","lib/Getopt/Yath/Option/Count.pm":"eb8bc1a2c2dfe8bb39eb83c8ede73cba","lib/Getopt/Yath/Option/Scalar.pm":"77cca76ea82c90e86e9c2d1d1fe60337","lib/Getopt/Yath/Option.pm":"c966eed5df47d66977103c0068d2ccc5","lib/Getopt/Yath/Util.pm":"a20e1ed3446db7439850620b7acfc96c","lib/Getopt/Yath/Option/Bool.pm":"e169eb9cf9ee8f25fe6c90a46c963bb0","lib/Getopt/Yath/Option/Auto.pm":"416b69c8408206cdd3a54ba7fb914057","lib/Getopt/Yath/HashBase.pm":"7d23b0bf85ec79b212a8f76564523107","lib/Getopt/Yath/Term.pm":"f3a721bedf2a61b478c4702a40da962c","t/option.t":"3b98756c7348e06d4019c234300ed541"},"version":"unknown","finish":1775441776.14093,"collected":["branch","condition","statement","subroutine","time"]},"1775441777.2234094.40588":{"start":1775441777.11752,"name":"/home/exodist/projects/Test2/Getopt-Yath","vec":{"lib/Getopt/Yath/Option/Scalar.pm":{"statement":{"vec":"ÿ?\u0000","size":26},"branch":{"size":6,"vec":"\u0001"},"subroutine":{"size":13,"vec":"\u000f"}},"lib/Getopt/Yath/Term.pm":{"condition":{"vec":"\u001a","size":6},"branch":{"vec":"•S","size":16},"statement":{"vec":"ÿÿñÿ|","size":39},"subroutine":{"size":6,"vec":"?"}},"lib/Getopt/Yath/Util.pm":{"condition":{"vec":"@\u0000","size":9},"subroutine":{"vec":"?\f","size":12},"statement":{"size":73,"vec":"ÿÿ\u0003\u0000\u0000ü?ð\u000e\u0000"},"branch":{"size":28,"vec":"€¦ \t"}},"lib/Getopt/Yath.pm":{"condition":{"size":16,"vec":"¦‚"},"statement":{"vec":"ÿÿÿÿÿÿÿÿ","size":71},"branch":{"size":22,"vec":"\u0006ë/"},"subroutine":{"vec":"ÿ","size":15}},"lib/Getopt/Yath/Settings.pm":{"subroutine":{"vec":"?\t","size":15},"statement":{"size":54,"vec":"ÿÿ\u000fxÀ\u0003\u0000"},"branch":{"vec":"\u0000\u0000","size":16},"condition":{"size":5,"vec":"\u0000"}},"lib/Getopt/Yath/Option/List.pm":{"subroutine":{"vec":"¿Ô\u0001","size":21},"statement":{"vec":"ÿÿÒóý\u001f€q\u0000\u0000","size":75},"branch":{"vec":"„\n\u0000","size":18},"condition":{"vec":"\u0018","size":7}},"lib/Getopt/Yath/Settings/Group.pm":{"condition":{"vec":"\u0000","size":3},"statement":{"vec":"ÿ\u000f\u0000\u001ex\u0000","size":43},"branch":{"size":16,"vec":"\u0000\u0000"},"subroutine":{"size":13,"vec":"\u000f\t"}},"lib/Getopt/Yath/Option.pm":{"condition":{"vec":"\t’\u0004’JP\u00010\u0000\u0018 \u0004","size":96},"statement":{"vec":"ÿÿ\u001f\u0004ü?ð‡û\u000fØàÿ?¿÷?\u0000Àßö\u0001\u001c\u0000ÿ‰àþ\u0001¿º'\u0001\u0000\u0000","size":278},"branch":{"size":152,"vec":"\n`\u0010€\bªF¨†\t\u0000\u0000=\u0001`¢j \u0000"},"subroutine":{"size":44,"vec":"\u0010ðº\u0006"}},"lib/Getopt/Yath/Instance.pm":{"subroutine":{"size":24,"vec":"ÿyü"},"statement":{"vec":"ÿÿÿ?øÿãü\u001f\u0000\u0000ð¹³ÿÿÿÿÿÿ~üðÿÿÿ}\u000eÎÿýÏ\u0001\u0000ÿÿÿÿÏ\u0007","size":331},"branch":{"size":166,"vec":"\u0002-\u0000\u0004\u0014YܑÚ\u0000ÌÖ]¸\u0000x\u0003\u0000@Á$"},"condition":{"size":124,"vec":"ª\u0001\u0003\u0010\u0006\u0000CV\u0015ð\u000e*\u0015@\u0002"}},"lib/Getopt/Yath/HashBase.pm":{"condition":{"vec":"L4\u0011","size":21},"branch":{"vec":"•%Z\u0006P\u0000P\u0015","size":70},"statement":{"size":160,"vec":"ÿÿ¿Àÿÿÿÿÿ½, \u0001àú\u0000øÿÿ"},"subroutine":{"size":24,"vec":"ÿ\u000fä"}},"lib/Getopt/Yath/Option/Bool.pm":{"statement":{"vec":"ÿß\u001e\u0000","size":34},"branch":{"vec":"*\u0000","size":12},"subroutine":{"size":17,"vec":"ßß\u0000"}}},"dir":"/home/exodist/projects/Test2/Getopt-Yath","count":{"lib/Getopt/Yath/Term.pm":{"time":[1,0,4,1,0,16,4,0,3,15,0,42,0,180,2681,1,87,null,null,null,3,3,3,4,3,13,5,2,1,3,6,6,null,null,3,3,4,6,4],"condition":[[0,3,0],[3,3,0]],"subroutine":[1,1,1,1,1,3],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,3,3,3,3,3,3,3,3,3,3,6,6,0,0,6,3,3,3,3],"branch":[[1,0],[3.0,0],[3.0,0],[0,3],[3,3],[0,6],[3.0,0],[3.0,0]]},"lib/Getopt/Yath/Option/Scalar.pm":{"time":[1,1,9,1,0,23,1,1,26,18,1,1,3,2,6,null,7,2,7,8,13,6],"branch":[[5,0],[0,0],[0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,3,2,6,0,7,5,5,14,14,7,0,0,0,0],"subroutine":[1,1,1,1,3,2,6,0,7,5,14,7,0]},"lib/Getopt/Yath/Option/Bool.pm":{"subroutine":[1,1,1,1,1,0,4,11,11,21,11,13,31,0,3,13,0],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,0,4,11,11,21,11,13,13,31,31,0,0,3,3,3,13,0,0,0,0,0],"branch":[[10,3],[0,3],[0,3],[0,0],[0,0],[0,0]],"time":[1,1,10,1,1,27,1,1,2,27,1,1,3,null,11,17,9,20,10,4,18,13,33,null,null,3,3,5,10]},"lib/Getopt/Yath/HashBase.pm":{"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,1,1,1,1,1,1,45,5,5,5,5,5,5,5,5,5,5,5,5,5,3,3,5,3,5,5,210,172,172,38,38,5,5,5,5,5,45,45,45,45,45,45,45,0,45,45,45,37,0,37,0,0,45,1,0,1,0,0,0,0,0,0,0,45,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,5,0,5,5,31,60,5,5,31,60,5,60,60,60,0,0,0,0,0,0,0,0,0,0,0,0,60,60,60,60,60,60,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],"branch":[[1,0],[1,0],[5.0,0],[0,3],[3.0,2],[5,0],[0,3],[172,38],[44.0,1],[0,37],[37,0],[37.0,8],[0,1],[1,0],[0,0],[0,0],[1,44],[0,44],[0,44],[0,45],[0,0],[0,0],[3,2],[3,2],[0,0],[0,0],[0,0],[0,60],[4.0,56],[60.0,0],[5.0,0],[5.0,0],[5.0,0],[5.0,0],[5.0,0]],"subroutine":[1,1,1,1,1,1,1,1,45,5,5,5,0,0,0,0,0,0,5,0,0,60,31,60],"condition":[[0,0,1],[5,0,0],[5,0,0],[0,5.0],[0,5.0],[3,0],[44,1.0],[0,0],[4,1.0]],"time":[2,0,6,1,0,20,2,0,36,2,1,55,1,0,42,0,4,1,88,633,2,3,null,109,null,null,null,null,null,null,1,0,394,1,1,56,35,3,4,6,2,2,6,8,8,10,6,3,2,25,3,4,9,18,5,13,107,72,682,27,2240,1,5,6,5,2,21,26,17,34,19,33,70,null,21,30,19,32,null,39,null,null,24,2,null,1,null,null,null,null,null,null,null,43,null,null,23,null,null,null,null,null,null,null,null,null,null,null,null,4,5,8,null,4,null,12,8,21,46,6,17,21,39,11,34,27,42,null,null,null,null,null,null,null,null,null,null,null,null,70,54,37,66,45,53,6,6,3,3,4,11,3,10,3,6,3,6,2,5,14]},"lib/Getopt/Yath/Instance.pm":{"condition":[[0,29.0],[0,29.0],[0,29.0],[0,29.0],[3,0],[0,2.0],[0,0],[2,0,1],[35,0],[0,0],[0,0,0],[0,0,0],[0,1,26],[0,26,0],[1,25.0],[4,22.0],[0,0,26],[26,0],[0,26.0],[0,26.0],[0,26.0],[1,25,0],[0,0,0],[1,0,0],[27,3,0],[21,2,1],[0,23,0],[11,2,7],[16,0,2],[16,2,0],[0,19,3],[19,1,2],[1,1,1],[0,22.0],[0,0],[0,3,0],[3,0],[3,0],[2,1,0],[1,0],[1,0],[0,0,0],[0,0,0],[1,0,0],[1,0,0],[0,0],[0,0],[1,0,0],[1,0,0]],"time":[4,1,5,1,0,19,1,1,14,1,0,2,96,1,8,84,1,7,2,0,1,11,0,2,16,38,33,31,39,16,null,null,null,null,null,2,2,2,4,2,9,1,3,2,3,1,6,2,1,2,null,null,null,2,1,3,1,15,2,0,2,2,5,null,null,null,2,20,17,35,45,13,42,1,2,2,3,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,20,13,22,16,20,null,null,22,22,36,null,17,28,39,null,null,61,29,null,14,24,132,18,41,25,24,40,3,15,25,26,16,62,20,31,25,15,22,24,14,20,14,3,null,34,32,30,31,7,18,30,2,4,4,6,13,7,11,11,6,22,20,16,37,1,2,21,1,2,23,1,1,1,2,1,2,null,22,29,1,2,2,1,null,null,null,1,28,23,25,5,5,null,null,null,null,16,24,3,2,2,6,1,1,3,13,20,22,16,17,14,19,17,5,2,5,5,14,14,10,4,14,8,2,12,null,14,4,17,2,9,null,null,6,8,14,null,null,null,null,null,23,19,12,null,null,11,14,9,17,13,15,28,16,4,9,12,null,18,1,1,6,2,13,18,22,10,26,null,null,23,19,19,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,41,2,4,8,2,3,7,5,3,93,2,3,2,2,4,3,2,4,3,3,1,5,9,3,5,4,3,8,5,1,1,1,2,2,1,4,null,null,1,1,2,1,1],"branch":[[0,3],[0,2],[0,2],[2.0,0],[1.0,2],[1,1],[0,35],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[35,0],[0,40],[0,0],[0,82],[35.0,0],[1.0,26],[26.0,0],[3,0],[26,3],[3,0],[29.0,0],[4.0,12],[1.0,11],[1.0,34],[1.0,33],[1.0,2],[2.0,0],[3.0,30],[0,1],[0,1],[0,1],[1.0,0],[1,29],[0,0],[6.0,0],[6.0,24],[0,30],[2.0,4],[1.0,3],[6.0,24],[1.0,23],[0,23],[3.0,0],[3.0,20],[1.0,19],[1.0,6],[7.0,13],[3.0,4],[7.0,12],[0,2],[2,5],[7,11],[0,11],[0,0],[0,0],[0,18],[0,0],[0,18],[2.0,1],[17.0,3],[1.0,2],[19.0,1],[0,0],[2.0,20],[20.0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[5.0,0],[1.0,2],[0,2],[0,2],[1.0,1],[0,2],[3.0,0],[0,1]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,29,29,29,29,29,29,0,0,0,0,0,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,0,0,0,2,1,2,1,3,1,1,1,2,2,0,0,0,2,35,35,35,35,35,35,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,35,35,35,35,0,0,35,35,40,0,40,40,82,0,0,82,35,0,27,27,27,26,26,26,26,26,2,26,29,26,26,26,26,29,29,29,29,29,29,29,26,3,0,29,29,29,26,2,26,26,5,5,5,16,16,12,1,12,1,26,35,35,35,1,1,34,1,1,33,3,1,1,2,2,2,0,30,30,1,1,1,1,0,0,0,1,29,29,30,6,6,0,0,0,0,30,30,6,2,2,4,1,1,3,24,23,23,23,23,23,23,23,3,3,3,3,20,20,7,6,19,7,3,18,0,18,18,18,7,7,0,0,11,11,18,0,0,0,0,0,18,18,18,0,0,18,20,22,22,22,22,22,20,3,20,19,0,19,2,2,3,2,20,22,22,22,22,0,0,22,22,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,3,3,3,3,3,5,3,3,3,2,2,2,2,2,2,2,2,1,2,2,3,3,3,3,3,2,2,2,1,1,1,1,1,1,1,0,0,1,1,1,1,1],"subroutine":[1,1,1,1,1,1,1,1,29,0,0,3,2,35,2,0,0,0,35,27,2,5,3,1]},"lib/Getopt/Yath/Option.pm":{"time":[1,1,5,1,1,11,1,0,16,1,1,1,55,1,3,225,1,2,2,0,562,null,null,null,null,null,3,null,null,null,null,null,null,null,3,18,40,24,29,26,11,46,11,19,14,27,null,null,null,null,null,null,25,3,4,18,24,28,45,null,null,null,null,9,3,17,null,23,42,3,1,3,3,14,25,37,null,null,null,null,null,null,null,2,3,null,1,5,null,null,null,null,null,12,32,41,29,16,28,31,20,23,24,45,33,30,25,33,16,34,null,null,38,28,22,21,78,4,null,17,64,2,1,null,26,17,63,232,21,8,13,7,17,20,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,36,62,16,17,26,14,12,null,24,11,null,22,10,null,24,18,22,18,22,null,null,null,null,null,null,null,null,null,2,3,3,null,null,null,null,null,null,null,null,null,null,null,2,2,3,3,3,3,4,2,6,null,null,3,null,null,null,3,null,null,null,null,null,2,2,3,null,4,5,3,2,4,4,1,4,null,null,null,null,null,null,null,2,4,2,5,5,4,null,3,null,3,null,6,2,1,null,4,4,5,15,null,null,8,null,null,5],"condition":[[35,0,0],[1,30,0],[0,0,0],[31,0,0],[31,0,0],[31,0,0],[31,0,0],[0,0,0],[0,31,0],[0,31,0],[0,31.0],[28,3,0],[31,0,0],[31,0,0],[0,0,0],[1,0],[31,0],[31,0],[0,0],[0,0],[0,0,0],[0,0,0],[1,21.0],[0,22.0],[0,22.0],[0,22.0],[0,0],[0,0],[0,0],[0,3.0],[3,0,0],[0,0],[0,0],[0,0],[3,0],[3,0],[0,3.0],[0,0,6],[0,6.0]],"subroutine":[1,1,1,1,1,1,1,0,0,0,0,0,2,0,0,0,0,0,0,0,3,29,22,31,26,3,35,11,50,3,34,0,0,3,0,31,18,63,0,3,0,3,3,0],"branch":[[0,31],[0,31],[26.0,0],[0,0],[0,0],[0,0],[0,35],[35.0,0],[0,0],[0,0],[11.0,0],[46.0,4],[34.0,0],[0,0],[0,0],[0,3],[0,0],[0,31],[0,30],[0,0],[0,31],[0,31],[0,31],[0,31],[0,31],[31.0,0],[0,0],[31.0,0],[0,0],[0,31],[0,31],[0,31],[90.0,3],[3.0,0],[0,0],[92.0,1],[1.0,0],[0,255],[0,18],[0,18],[18.0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[41.0,22],[1.0,21],[1.0,21],[0,0],[3.0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,3],[3.0,0],[0,3],[0,0],[0,3],[0,3],[0,3],[0,3],[0,3],[3.0,0],[0,0],[0,0],[0,3],[0,3],[0,0],[0,0],[0,0],[0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,2,0,0,0,0,0,0,0,3,31,31,31,31,31,31,31,26,26,26,26,0,0,0,0,0,0,26,3,3,35,35,35,35,0,0,0,0,11,11,11,0,50,50,4,3,3,3,34,34,34,0,0,0,0,0,0,0,3,3,0,3,3,0,0,0,0,0,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,0,0,31,31,31,31,93,3,0,31,93,1,1,0,31,31,31,255,31,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63,63,22,22,22,22,22,0,22,22,0,22,22,0,22,22,22,22,22,0,0,0,0,0,0,0,0,0,3,3,3,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,0,0,3,0,0,0,3,0,0,0,0,0,3,3,3,0,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,3,3,3,3,3,3,0,3,0,3,0,3,3,3,0,3,3,6,6,0,0,3,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"lib/Getopt/Yath/Option/List.pm":{"time":[1,1,7,1,0,24,1,1,2,10,0,2,21,0,2,2,null,5,null,null,4,null,0,0,4,3,null,null,3,0,4,1,4,null,2,2,4,3,3,4,4,9,1,2,2,null,null,null,null,null,null,null,null,null,null,0,3,null,null,null,1,5,3],"condition":[[0,0],[0,3.0],[5,0,0]],"subroutine":[1,1,1,1,1,2,0,3,0,0,3,0,2,0,3,5,2,0,0,0,0],"branch":[[2.0,0],[3.0,0],[0,0],[0,3],[0,3],[0,5],[0,0],[0,2],[0,2]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,0,3,0,0,3,0,2,2,2,2,0,0,3,3,3,3,3,0,3,3,3,5,5,5,5,5,2,2,2,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,2,6,2,0,0,0,0,0,0,0,0,0,0,0,0]},"lib/Getopt/Yath/Settings/Group.pm":{"subroutine":[1,1,1,26,0,0,0,0,96,0,0,26,0],"branch":[[26,0],[0,0],[0,0],[0,0],[0,0],[0,0],[26.0,0],[0,0]],"statement":[1,1,1,1,1,1,1,1,1,26,26,26,0,0,0,0,0,0,0,0,0,0,0,0,0,96,96,96,96,0,0,0,0,0,0,26,26,26,26,0,0,0,0],"time":[1,0,4,1,1,10,1,0,138,13,19,36,null,null,null,null,null,null,null,null,null,null,null,null,null,45,63,59,67,null,null,null,null,null,null,10,16,26,43],"condition":[[96,0,0]]},"lib/Getopt/Yath/Settings.pm":{"subroutine":[1,1,1,1,1,26,0,0,96,0,0,26,0,0,0],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,26,26,26,26,26,0,0,0,0,0,0,0,96,96,96,26,0,0,0,0,0,0,0,26,26,26,26,0,0,0,0,0,0,0,0,0,0,0,0],"branch":[[26,0],[0,0],[0,0],[70.0,26],[26.0,0],[0,0],[26.0,0],[0,0]],"time":[1,0,6,1,0,18,2,1,5,57,1,9,1,1,1,12,21,11,21,23,null,null,null,null,null,null,null,46,51,82,30,null,null,null,null,null,null,null,4731,15,37,54],"condition":[[0,0,0],[0,0]]},"lib/Getopt/Yath.pm":{"branch":[[0,29],[31,0],[0,2],[0,2],[1,1],[0,3],[0,3],[1,29],[1.0,29],[1.0,29],[0,203]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,29,29,29,29,29,29,29,29,5,29,31,31,31,31,29,2,2,2,2,2,2,29,3,3,3,3,3,3,29,30,30,1,30,30,30,30,29,30,30,30,29,27,29,1,29,203,203,203,203,29],"subroutine":[1,1,1,1,1,1,1,29,5,31,2,3,30,27,1],"condition":[[0,29.0],[29,0,0],[1,0,1],[2,1.0],[0,0,0],[0,0,3]],"time":[41379,2,5,1,1,13,1,1,12,63,1,2,118,3,29,5,1,201,2,0,51,100,13,16,31,22,21,14,24,19,36,64,36,40,35,29,6,2,3,7,4,3,32,10,3,1,4,5,4,33,15267,40,2,27,26,17,24,19,16,20,34,27,764,29,547,22,84,230,91,176,31454]},"lib/Getopt/Yath/Util.pm":{"branch":[[0,0],[0,0],[0,0],[0,33],[0,31],[31.0,0],[0,31],[0,31],[0,0],[0,0],[0,31],[0,31],[31.0,0],[0,31]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,33,33,33,33,33,31,31,31,31,31,31,0,0,0,0,0,0,31,31,31,31,0,31,31,31,0,0,0,0,0],"subroutine":[1,1,1,1,1,1,0,0,0,0,33,31],"condition":[[0,0,0],[0,0,0],[31,0,0]],"time":[1,1,4,1,1,8,1,0,13,1,1,6,123,1591,2,322,5882,280,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,22,19,17,35,21,363,17,23,43,17,27,26,null,null,null,null,null,null,27,20,52,21,null,14,24,48]}},"digests":{"lib/Getopt/Yath/Term.pm":"f3a721bedf2a61b478c4702a40da962c","lib/Getopt/Yath/Option/Scalar.pm":"77cca76ea82c90e86e9c2d1d1fe60337","t/parsing.t":"af64c1d57d2ecefa76d347c7c2cce86f","lib/Getopt/Yath/Instance.pm":"9b30e2fc1222fa186afd5bf5a7376d18","lib/Getopt/Yath/HashBase.pm":"7d23b0bf85ec79b212a8f76564523107","lib/Getopt/Yath/Option/Bool.pm":"e169eb9cf9ee8f25fe6c90a46c963bb0","lib/Getopt/Yath/Util.pm":"a20e1ed3446db7439850620b7acfc96c","lib/Getopt/Yath/Settings.pm":"5935a1c1dc8a7b5d8a398c10d88be35b","lib/Getopt/Yath.pm":"f32ba23251c7beef0a4fe0eaa54fe555","lib/Getopt/Yath/Settings/Group.pm":"074198fa9d9f930e73513c89f513402e","lib/Getopt/Yath/Option/List.pm":"123a2812c394bf08bb84455b37b6292d","lib/Getopt/Yath/Option.pm":"c966eed5df47d66977103c0068d2ccc5"},"run":"t/parsing.t","OS":"linux","perl":"5.42.2","version":"unknown","collected":["branch","condition","statement","subroutine","time"],"finish":1775441777.14901},"1775441776.2234088.24323":{"name":"/home/exodist/projects/Test2/Getopt-Yath","vec":{"lib/Getopt/Yath/Option/Scalar.pm":{"subroutine":{"vec":"O\u001f","size":13},"statement":{"size":26,"vec":"ÿOÿ\u0001"},"branch":{"vec":"\u0004","size":6}},"lib/Getopt/Yath/Option/PathList.pm":{"subroutine":{"vec":"\u001f","size":7},"branch":{"size":2,"vec":"\u0002"},"statement":{"size":30,"vec":"ÿÿ\u000f\u0000"}},"lib/Getopt/Yath/Term.pm":{"subroutine":{"vec":"\u001f","size":6},"branch":{"size":16,"vec":"\u0001\u0000"},"statement":{"size":39,"vec":"ÿÿ\u0001\u0000\u0000"},"condition":{"vec":"\u0000","size":6}},"lib/Getopt/Yath/Option.pm":{"subroutine":{"vec":"\u0010ð}8\u0000","size":44},"branch":{"vec":"\u0000\u001c\u0010\u0001\u0000\u0000\u0000\u0000\u0000 \u0019À\u0001\u0000\u0000\u0000\u0000\u0000\u0000","size":152},"statement":{"size":278,"vec":"ÿÿ\u001f\u0004üÿŸŸß\u000f\u0000àÿ?Ÿ÷ÿçûßö\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"},"condition":{"vec":"\u0004\u0000\u0000\u0000\u0000À\u000b\u0000\u0000\u0000\u0000\u0000","size":96}},"lib/Getopt/Yath/Option/List.pm":{"condition":{"vec":"\u0010","size":7},"subroutine":{"size":21,"vec":"ŸÔ\u0001"},"branch":{"vec":"Î9\u0003","size":18},"statement":{"size":75,"vec":"ÿÒóÿÿÿ\u0000\u0000"}},"lib/Getopt/Yath/Option/Count.pm":{"condition":{"size":5,"vec":"\u0004"},"subroutine":{"vec":"ÿ\u000f\u000e","size":20},"branch":{"vec":"\u0003","size":6},"statement":{"vec":"ÿÿ?Àÿ\u0000","size":41}},"lib/Getopt/Yath/Settings/Group.pm":{"subroutine":{"vec":"\u000f\t","size":13},"statement":{"vec":"ÿ\u000f\u0000\u001ex\u0000","size":43},"branch":{"vec":"\u0000\u0000","size":16},"condition":{"size":3,"vec":"\u0000"}},"lib/Getopt/Yath.pm":{"statement":{"vec":"ÿÿÿÿ\u000f\u0004îÿ~","size":71},"branch":{"vec":"\u0006\u0000 ","size":22},"subroutine":{"size":15,"vec":"ÿ3"},"condition":{"vec":"\u0006\u0000","size":16}},"lib/Getopt/Yath/Settings.pm":{"condition":{"vec":"\u0000","size":5},"subroutine":{"vec":"?\t","size":15},"statement":{"size":54,"vec":"ÿÿ\u000fxÀ\u0003\u0000"},"branch":{"vec":"\u0000\u0000","size":16}},"lib/Getopt/Yath/Util.pm":{"subroutine":{"size":12,"vec":"\f"},"statement":{"size":73,"vec":"ÿÿ\u0000\u0000ü?ð\u000e\u0000"},"branch":{"vec":"\u0000\u0000\u0000\u0000","size":28},"condition":{"vec":"\u0000","size":8}},"lib/Getopt/Yath/Option/Map.pm":{"condition":{"size":12,"vec":"¤\u0001"},"subroutine":{"size":21,"vec":"\u001f…\u001f"},"branch":{"size":22,"vec":"h=3"},"statement":{"vec":"ÿ\u0014\u0000€ÿÿÿÿÿÿ\u0001","size":89}},"lib/Getopt/Yath/Option/Bool.pm":{"subroutine":{"vec":"ÿ\u0001","size":17},"branch":{"vec":"Ç\f","size":12},"statement":{"size":34,"vec":"ÿÿ÷\u0003"}},"lib/Getopt/Yath/HashBase.pm":{"condition":{"vec":"L´\u0011","size":21},"subroutine":{"size":24,"vec":"ÿ\u000fä"},"statement":{"vec":"ÿÿ¿Àÿÿÿÿÿ½, \u0001àú\u0000øÿÿ","size":160},"branch":{"size":70,"vec":"•%Û\u0006+P€V\u0015"}},"lib/Getopt/Yath/Instance.pm":{"subroutine":{"size":24,"vec":"ÿ!\f"},"branch":{"vec":"\u0000 \u0000$\u0004Y  Œ– ¢†\u0016`\u0001±ª(\u0000\u0000","size":166},"statement":{"vec":"ÿÿÿ?\u0000\u0000\u0000\u0000ø\u0001\u0000\u0000ðù³ÿÿo\u0000O\u0002~þ?àÿ}\u000eþÿ…Ïÿñ\u0001\u0000\u0000\u0000\u0000\u0000","size":331},"condition":{"size":124,"vec":"ª\u0000\u0002\u0000\u0000\u0000\u0000’\u0002\u0000\u0000\u0000\u0000\u0000\u0000"}},"lib/Getopt/Yath/Option/BoolMap.pm":{"branch":{"vec":"¢\u0001","size":10},"statement":{"size":53,"vec":"ÿÿê;À?\u0000"},"subroutine":{"size":20,"vec":"¿Z\u0006"}}},"start":1775441776.53461,"dir":"/home/exodist/projects/Test2/Getopt-Yath","count":{"lib/Getopt/Yath/Option/Count.pm":{"condition":[[0,0],[5,0,0]],"time":[1,1,7,1,0,16,1,1,26,1,1,2,17,0,2,11,3,7,7,4,3,4,null,null,null,null,null,null,null,null,4,9,14,4,3,11,3,3,2,3],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,1,6,5,3,3,5,0,0,0,0,0,0,0,0,8,8,8,5,5,5,3,2,2,2,0],"branch":[[3.0,5],[2.0,0],[0,0]],"subroutine":[1,1,1,1,1,6,1,6,5,3,3,5,0,0,0,0,0,8,3,2]},"lib/Getopt/Yath/Option/List.pm":{"condition":[[0,0],[0,6.0],[13,0,2]],"time":[66,0,5,1,0,13,2,0,2,33,1,1,34,1,1,null,null,9,null,null,6,null,2,1,11,8,null,null,4,3,9,3,9,3,7,7,8,7,12,15,8,20,3,4,8,1,1,1,3,4,3,3,16,6,1,2,6,1,2,4,2,2,4],"branch":[[6,1],[7.0,1],[2.0,0],[1.0,7],[1.0,6],[2.0,13],[1.0,1],[2.0,4],[1,3]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,6,0,0,7,0,7,6,6,7,0,0,8,8,8,8,8,2,8,7,6,15,15,15,13,13,6,6,6,2,2,2,2,2,1,1,1,1,1,4,4,1,3,1,3,3,4,0,0,0,0,0,0,0,0,0,0,0,0],"subroutine":[1,1,1,1,1,0,0,6,0,0,7,0,7,0,8,15,6,0,0,0,0]},"lib/Getopt/Yath/Settings/Group.pm":{"subroutine":[1,1,1,30,0,0,0,0,118,0,0,30,0],"statement":[1,1,1,1,1,1,1,1,1,30,30,30,0,0,0,0,0,0,0,0,0,0,0,0,0,118,118,118,118,0,0,0,0,0,0,30,30,30,30,0,0,0,0],"branch":[[30,0],[0,0],[0,0],[0,0],[0,0],[0,0],[30.0,0],[0,0]],"time":[1,0,4,1,1,14,2,0,149,16,34,37,null,null,null,null,null,null,null,null,null,null,null,null,null,63,56,72,99,null,null,null,null,null,null,20,19,35,57],"condition":[[118,0,0]]},"lib/Getopt/Yath/Option.pm":{"condition":[[26,2,1],[0,28,0],[0,0,0],[28,0,0],[24,4,0],[28,0,0],[28,0,0],[0,0,0],[0,28,0],[0,28,0],[0,28.0],[28,0,0],[28,0,0],[28,0,0],[0,0,0],[2,0],[25,3.0],[25,3.0],[0,1.0],[0,0],[4,0,0],[4,0,0],[0,18.0],[0,18.0],[0,18.0],[0,18.0],[0,0],[0,0],[0,0],[0,0],[0,0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0,0],[0,0]],"time":[1,1,4,1,1,10,1,0,19,1,1,1,70,1,3,137,1,2,3,1,652,null,null,null,null,null,15,null,null,null,null,null,null,null,6,3755,52,26,24,34,24,50,10,11,9,15,2,3,1,2,2,3,21,null,null,12,23,27,43,2,5,null,null,14,12,35,3,33,46,null,1,1,2,19,17,45,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,18,28,45,25,19,25,25,26,16,20,42,36,20,25,39,19,35,null,null,30,34,30,25,78,null,null,19,66,3,3,null,23,26,72,248,25,15,13,20,19,37,1,2,2,2,4,null,null,1,2,2,5,7,null,2,2,2,25,76,19,11,38,17,8,null,23,13,null,20,9,null,21,21,21,15,19],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,15,0,0,0,0,0,0,0,3,28,28,28,28,28,28,28,14,14,14,14,2,2,2,2,2,2,12,0,0,29,29,29,28,2,2,0,0,21,21,21,2,60,60,0,1,1,1,31,31,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,84,0,0,28,84,2,2,0,28,28,28,248,28,27,27,27,27,27,2,2,2,2,2,0,0,2,2,5,5,4,0,2,1,2,57,57,18,18,18,18,18,0,18,18,0,18,18,0,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"branch":[[0,28],[0,28],[12.0,2],[0,2],[0,2],[1,1],[1.0,28],[26.0,2],[2.0,0],[0,0],[19.0,2],[60.0,0],[31.0,0],[0,0],[0,0],[0,0],[0,0],[0,28],[0,28],[0,0],[0,28],[0,28],[0,28],[0,28],[0,28],[28.0,0],[0,0],[28.0,0],[0,0],[0,28],[0,28],[0,28],[84.0,0],[0,0],[0,0],[82.0,2],[2.0,0],[0,248],[0,27],[0,27],[25.0,2],[0,5],[1.0,4],[0,0],[0,2],[0,2],[2,0],[1.0,1],[39.0,18],[2.0,16],[0,18],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"subroutine":[1,1,1,1,1,1,1,0,0,0,0,0,15,0,0,0,0,0,0,0,3,31,28,28,14,0,29,21,60,1,31,0,0,0,0,28,27,57,0,0,0,0,0,0]},"lib/Getopt/Yath/Util.pm":{"subroutine":[1,1,1,1,1,1,4,0,0,0,28,28],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,28,28,28,28,0,28,28,28,0,0,0,0,0],"branch":[[0,0],[0,0],[0,0],[0,28],[0,28],[28.0,0],[0,28],[0,28],[0,0],[0,0],[0,28],[0,28],[28.0,0],[0,28]],"time":[1,0,5,1,1,10,1,0,11,2,0,7,138,1656,2,20,0,270,2,3,332,2,1,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,21,21,13,43,13,511,22,39,36,26,34,31,null,null,null,null,null,null,15,21,59,21,null,12,20,54],"condition":[[2,2.0],[0,0,0],[28,0,0]]},"lib/Getopt/Yath.pm":{"time":[49237,2,5,1,1,18,1,1,21,69,1,2,121,1,8,2,1,161,1,1,46,38,10,10,21,16,14,12,18,3,27,66,41,44,37,25,null,null,null,null,null,null,28,null,null,null,null,null,null,23,14604,41,null,33,15,18,22,14,22,16,37,18,1935,20,null,15,69,160,74,136,32930],"condition":[[0,25.0],[25,0,0],[0,0,0],[0,0],[0,0,0],[0,0,0]],"subroutine":[1,1,1,1,1,1,1,25,1,25,0,0,24,30,0],"branch":[[0,25],[25,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,24],[0,24],[0,24],[0,175]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,25,25,25,25,25,25,25,25,1,25,25,25,25,25,25,0,0,0,0,0,0,25,0,0,0,0,0,0,25,24,24,0,24,24,24,24,24,24,24,24,25,30,25,0,25,175,175,175,175,25]},"lib/Getopt/Yath/Settings.pm":{"subroutine":[1,1,1,1,1,30,0,0,118,0,0,30,0,0,0],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,30,30,30,30,30,0,0,0,0,0,0,0,118,118,118,30,0,0,0,0,0,0,0,30,30,30,30,0,0,0,0,0,0,0,0,0,0,0,0],"branch":[[30,0],[0,0],[0,0],[88.0,30],[30.0,0],[0,0],[30.0,0],[0,0]],"time":[2,0,6,7,1,18,2,0,6,67,1,10,1,0,2,22,25,19,26,28,null,null,null,null,null,null,null,56,62,106,42,null,null,null,null,null,null,null,4445,14,48,58],"condition":[[0,0,0],[0,0]]},"lib/Getopt/Yath/Option/Map.pm":{"time":[73,0,5,1,0,13,1,1,2,7,1,2,18,1,2,null,null,null,4,null,8,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,6,9,11,4,3,12,6,1,8,6,6,9,2,9,3,10,0,2,7,14,13,12,3,27,8,6,10,11,7,1,1,2,2,3,2,2,10,4,2,0,5,1,2,9,1,12,2,12,3,3],"condition":[[0,0],[1,8.0],[0,7.0],[0,1.0],[3,6.0],[2,0]],"subroutine":[1,1,1,1,1,0,0,0,4,0,7,0,0,0,0,9,7,9,1,18,10],"branch":[[0,0],[6.0,1],[8.0,1],[1.0,0],[1.0,8],[1.0,7],[9.0,9],[6.0,4],[1.0,1],[2.0,2],[1,1]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,4,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,9,7,6,6,7,9,9,9,9,9,1,9,8,7,1,1,18,18,18,9,9,9,9,10,10,10,4,2,2,2,2,2,1,1,1,1,1,2,2,1,2,1,1,2,2,3,3,2]},"lib/Getopt/Yath/Option/Bool.pm":{"time":[2,1,8,1,1,23,1,1,8,19,1,1,null,null,null,3,2,4,0,6,10,6,13,1,1,0,2,null,10,8,5,5,12,4],"branch":[[9,1],[1.0,0],[0,0],[5,3],[6.0,2],[1,1]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,3,3,5,3,10,10,11,11,1,1,1,1,0,9,8,8,8,8,2],"subroutine":[1,1,1,1,0,0,0,3,3,5,3,10,11,1,1,9,8]},"lib/Getopt/Yath/HashBase.pm":{"subroutine":[1,1,1,1,1,1,1,1,50,9,9,9,0,0,0,0,0,0,9,0,0,53,32,53],"branch":[[1,0],[1,0],[9.0,0],[0,7],[7.0,2],[9,0],[0,9],[336,40],[49.0,1],[0,39],[39,0],[39.0,11],[0,1],[1,0],[0,0],[0,0],[1,49],[0,49],[0,49],[0,50],[0,0],[0,0],[7,2],[7,2],[0,0],[0,0],[0,0],[0,53],[8.0,45],[53.0,0],[9.0,0],[9.0,0],[9.0,0],[9.0,0],[9.0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,1,1,1,1,1,1,50,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,9,9,9,9,376,336,336,40,40,9,9,9,9,9,50,50,50,50,50,50,50,0,50,50,50,39,0,39,0,0,50,1,0,1,0,0,0,0,0,0,0,50,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,9,9,9,0,9,0,9,9,32,53,9,9,32,53,9,53,53,53,0,0,0,0,0,0,0,0,0,0,0,0,53,53,53,53,53,53,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9],"time":[2,0,7,1,1,19,1,1,28,1,0,52,1,1,39,1,3,1,85,702,2,4,null,109,null,null,null,null,null,null,1,1,397,1,1,74,35,7,6,10,5,3,12,16,12,19,10,7,3,201,8,10,18,35,9,20,197,131,1578,26,1778,4,7,11,3,8,24,21,27,33,34,29,84,null,29,28,28,23,null,42,null,null,39,1,null,2,null,null,null,null,null,null,null,43,null,null,34,null,null,null,null,null,null,null,null,null,null,null,null,5,9,15,null,13,null,16,10,27,40,12,10,21,40,18,33,26,38,null,null,null,null,null,null,null,null,null,null,null,null,51,47,41,73,37,51,6,9,5,9,4,17,2,19,5,12,6,10,2,12,22],"condition":[[0,0,1],[9,0,0],[9,0,0],[0,9.0],[0,9.0],[7,0],[49,1.0],[0,0],[8,1.0]]},"lib/Getopt/Yath/Instance.pm":{"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,25,25,25,25,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,25,25,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,31,31,31,31,0,0,31,31,31,6,31,31,68,0,0,68,31,0,30,30,30,30,30,30,30,30,0,30,31,30,30,30,30,31,31,31,31,31,31,31,12,15,4,31,31,31,30,0,30,30,0,0,0,0,0,0,0,0,0,30,31,31,31,0,0,31,0,0,31,0,0,0,0,0,0,0,31,31,6,6,6,6,0,0,1,5,25,25,31,5,5,5,5,5,5,31,31,0,0,0,0,0,0,0,31,31,31,31,31,31,31,31,2,2,2,2,29,29,15,15,29,20,0,29,0,29,29,29,21,21,0,0,8,8,27,0,0,0,0,0,27,27,27,1,1,26,27,28,28,28,28,28,26,4,27,27,0,27,0,0,0,0,27,28,28,28,28,0,0,28,28,13,7,7,7,7,7,7,7,7,0,0,0,7,7,7,7,27,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"branch":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,25],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[31,0],[6.0,25],[0,0],[0,68],[31.0,0],[0,30],[30.0,0],[7,8],[12,19],[15,4],[31.0,0],[0,0],[0,0],[0,31],[0,31],[0,0],[0,0],[0,31],[2.0,3],[0,6],[1,5],[6.0,0],[6,25],[0,5],[5.0,0],[5.0,26],[0,31],[0,0],[0,0],[0,31],[0,31],[0,31],[2.0,0],[2.0,29],[0,29],[0,15],[15.0,14],[0,20],[20.0,9],[0,5],[5,16],[21,8],[0,8],[0,0],[0,0],[0,27],[1,0],[1.0,26],[2.0,0],[22.0,4],[0,0],[27.0,0],[0,0],[15.0,13],[6.0,7],[0,7],[0,7],[0,7],[0,7],[2,2],[4.0,3],[6.0,1],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"subroutine":[1,1,1,1,1,1,1,1,25,0,0,0,0,25,0,0,0,0,31,30,0,0,0,0],"condition":[[0,25.0],[0,25.0],[0,25.0],[0,25.0],[0,0],[0,0],[0,0],[0,0,0],[25,0],[0,0],[0,0,0],[0,0,0],[0,0,30],[0,30,0],[0,30.0],[0,30.0],[0,0,30],[30,0],[0,30.0],[0,30.0],[0,30.0],[0,30,0],[0,0,0],[6,0,0],[25,6,0],[25,6,0],[5,26,0],[14,0,15],[24,0,5],[24,5,0],[0,26,2],[26,0,2],[0,0,0],[0,28.0],[0,0],[0,0,0],[0,0],[0,0],[0,0,0],[0,0],[0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]],"time":[1,1,6,1,1,19,1,0,13,1,0,2,101,1,8,100,0,8,1,0,2,11,1,1,11,30,24,24,29,18,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,14,16,31,44,15,31,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,19,20,18,21,17,null,null,24,23,41,5,18,30,54,null,null,46,31,null,17,17,42,29,45,38,29,40,null,18,35,29,21,87,26,36,36,13,23,35,24,27,6,14,3,44,30,32,45,null,13,46,null,null,null,null,null,null,null,null,null,26,27,20,24,null,null,22,null,null,33,null,null,null,null,null,null,null,16,38,5,13,7,6,null,null,3,5,29,14,26,5,4,5,20,4,2,29,18,null,null,null,null,null,null,null,31,34,24,27,15,24,22,27,7,3,3,5,18,28,13,8,21,19,null,27,null,17,12,27,11,26,null,null,6,10,34,null,null,null,null,null,34,32,16,2,7,26,19,17,17,20,17,36,28,9,22,14,null,30,null,null,null,null,17,21,23,11,35,null,null,35,20,15,6,4,3,7,4,7,4,8,null,null,null,7,5,5,22,59]},"lib/Getopt/Yath/Option/BoolMap.pm":{"time":[1,0,7,1,0,22,1,1,19,1,1,2,15,1,1,4,null,5,null,2,null,5,1,3,3,1,null,2,4,33,null,null,null,null,null,null,null,null,4,6,9,5,7,7,3,5],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,0,5,0,2,0,5,2,2,2,2,0,6,6,6,0,0,0,0,0,0,0,0,6,6,6,5,5,3,3,3,0,0,0,0,0,0,0],"branch":[[0,5],[0,2],[2.0,3],[0,3],[1,2]],"subroutine":[1,1,1,1,1,5,0,5,0,2,0,5,2,0,6,0,0,6,5,0]},"lib/Getopt/Yath/Option/Scalar.pm":{"subroutine":[1,1,1,1,0,0,5,0,4,6,9,5,3],"branch":[[6,0],[3.0,0],[0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,0,0,5,0,4,6,6,9,9,5,3,3,3,0],"time":[1,1,6,1,1,19,1,1,1,16,1,2,null,null,5,null,4,2,7,5,11,3,3,3,5]},"lib/Getopt/Yath/Option/PathList.pm":{"statement":[1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,2,1,3,0,0,0,0,0,0,0,0,0,0],"branch":[[2,1]],"subroutine":[1,1,1,1,3,0,0],"time":[1,1,8,1,0,24,1,1,1,13,0,1,2,3,1,2,4,65,2,4]},"lib/Getopt/Yath/Term.pm":{"time":[1,1,5,1,0,25,1,1,1,15,0,43,1,172,2719,1,90],"condition":[[0,0,0],[0,0,0]],"subroutine":[1,1,1,1,1,0],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"branch":[[1,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]}},"digests":{"lib/Getopt/Yath/Term.pm":"f3a721bedf2a61b478c4702a40da962c","t/option_types.t":"7e4ce6d17246531ef9e4c0e24004f501","lib/Getopt/Yath/Option/PathList.pm":"fa9c9542d07de5fed488a0ccd13644ce","lib/Getopt/Yath/Option/Scalar.pm":"77cca76ea82c90e86e9c2d1d1fe60337","lib/Getopt/Yath/Instance.pm":"9b30e2fc1222fa186afd5bf5a7376d18","lib/Getopt/Yath/Option/BoolMap.pm":"d3e7a78339f259ed5077b808dc815c12","lib/Getopt/Yath/Option/Bool.pm":"e169eb9cf9ee8f25fe6c90a46c963bb0","lib/Getopt/Yath/HashBase.pm":"7d23b0bf85ec79b212a8f76564523107","lib/Getopt/Yath/Util.pm":"a20e1ed3446db7439850620b7acfc96c","lib/Getopt/Yath/Settings.pm":"5935a1c1dc8a7b5d8a398c10d88be35b","lib/Getopt/Yath.pm":"f32ba23251c7beef0a4fe0eaa54fe555","lib/Getopt/Yath/Option/Map.pm":"6a827e48e74afc25312686ca19d59be8","lib/Getopt/Yath/Settings/Group.pm":"074198fa9d9f930e73513c89f513402e","lib/Getopt/Yath/Option/Count.pm":"eb8bc1a2c2dfe8bb39eb83c8ede73cba","lib/Getopt/Yath/Option/List.pm":"123a2812c394bf08bb84455b37b6292d","lib/Getopt/Yath/Option.pm":"c966eed5df47d66977103c0068d2ccc5"},"run":"t/option_types.t","perl":"5.42.2","OS":"linux","version":"unknown","collected":["branch","condition","statement","subroutine","time"],"finish":1775441776.57365},"1775441774.2233968.37880":{"finish":1775441773.99576,"perl":"5.42.2","OS":"linux","run":"t/HashBase.t","collected":["branch","condition","statement","subroutine","time"],"digests":{"t/HashBase.t":"4963e95a0aedbf96c1b4c1710906e4e9","lib/Getopt/Yath/HashBase.pm":"7d23b0bf85ec79b212a8f76564523107"},"count":{"lib/Getopt/Yath/HashBase.pm":{"subroutine":[1,1,1,1,1,1,1,1,26,11,11,11,0,0,0,1,1,3,10,3,4,5,12,13],"branch":[[1,0],[1,0],[11.0,0],[1.0,3],[4.0,7],[10,1],[0,3],[86,46],[5.0,21],[0,24],[24,0],[24.0,2],[0,22],[22,0],[0,1],[0,1],[22,4],[1,3],[1.0,2],[0,26],[6,0],[0,6],[3,7],[3,7],[0,2],[1.0,8],[1,2],[3,10],[7.0,5],[4.0,8],[10.0,0],[10.0,0],[10.0,0],[10.0,0],[10.0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,1,1,1,1,1,1,26,11,11,11,11,11,11,11,11,11,11,11,11,11,4,4,11,3,11,11,132,86,86,46,46,11,11,11,11,11,26,26,26,26,26,26,26,0,26,26,26,24,0,24,0,0,26,22,0,22,0,0,1,1,1,1,1,26,0,0,11,3,3,3,3,15,6,6,0,6,6,6,3,10,10,10,3,10,4,10,10,5,12,10,10,5,12,10,13,13,13,3,3,3,1,2,2,2,2,9,9,8,1,10,12,12,12,12,12,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10],"time":[37241,2,10,2,1,29,3,1,39,2,2,73,1,1,61,1,4,1,133,1012,3,6,null,157,null,null,null,null,null,null,2,1,608,3,3,92,41,4851,11,16,6,9,12,18,20,19,14,9,9,35,5,6,18,11,14,24,99,62,362,52,347,7,9,18,7,11,24,15,31,29,25,25,73,null,28,15,26,22,null,36,null,null,27,22,null,36,null,null,2,2611,3,406,6,40,null,null,32,519,4,3,5,16,2,15,null,8,7,9,8,8,10,18,33144,16,1681,18,17,8,15,20,13,6,13,29,5343,10,17,4,3,3,3,3,1,2,3,7,66,9,2,16,30,28,27,15,26,11,13,9,6,7,19,8,22,8,18,6,12,7,13,28],"condition":[[0,0,1],[11,0,0],[11,0,0],[0,11.0],[0,11.0],[4,0],[5,21.0],[6,0],[9,1.0]]}},"version":"unknown","dir":"/home/exodist/projects/Test2/Getopt-Yath","start":1775441773.98297,"vec":{"lib/Getopt/Yath/HashBase.pm":{"statement":{"vec":"ÿÿ¿Àÿÿÿÿÿ½,?ÿþÿÿÿÿÿÿ","size":160},"branch":{"vec":"Õ*\u0003 \u001cðT\u0003\u0000","size":70},"subroutine":{"size":24,"vec":"ÿÿ"},"condition":{"vec":"L”\u0019","size":21}}},"name":"/home/exodist/projects/Test2/Getopt-Yath"},"1775441778.2234151.46415":{"digests":{"lib/Getopt/Yath/Option/Bool.pm":"e169eb9cf9ee8f25fe6c90a46c963bb0","lib/Getopt/Yath/Option.pm":"c966eed5df47d66977103c0068d2ccc5","lib/Getopt/Yath/HashBase.pm":"7d23b0bf85ec79b212a8f76564523107","lib/Getopt/Yath/Option/Scalar.pm":"77cca76ea82c90e86e9c2d1d1fe60337","lib/Getopt/Yath/Term.pm":"f3a721bedf2a61b478c4702a40da962c","lib/Getopt/Yath/Util.pm":"a20e1ed3446db7439850620b7acfc96c","t/util.t":"832f3e774858031b59f1f13bb50e6e5d"},"run":"t/util.t","OS":"linux","perl":"5.42.2","vec":{"lib/Getopt/Yath/Util.pm":{"subroutine":{"vec":"ÿ\u000f","size":12},"statement":{"vec":"ÿÿÿÿÿÿÿÿÿ\u0001","size":73},"branch":{"vec":"x}ý\r","size":28},"condition":{"size":7,"vec":"F"}},"lib/Getopt/Yath/Term.pm":{"condition":{"size":6,"vec":"\u0000"},"subroutine":{"vec":"\u001f","size":6},"branch":{"vec":"\u0001\u0000","size":16},"statement":{"size":39,"vec":"ÿÿ\u0001\u0000\u0000"}},"lib/Getopt/Yath/Option/Bool.pm":{"branch":{"size":12,"vec":"\u0000\u0000"},"statement":{"size":34,"vec":"ÿ\u000f\u0000\u0000\u0000"},"subroutine":{"vec":"\u000f\u0000\u0000","size":17}},"lib/Getopt/Yath/Option/Scalar.pm":{"statement":{"size":26,"vec":"ÿ\u000f\u0000\u0000"},"branch":{"size":6,"vec":"\u0000"},"subroutine":{"size":13,"vec":"\u000f\u0000"}},"lib/Getopt/Yath/HashBase.pm":{"subroutine":{"vec":"ÿ\u000f\u0004","size":24},"branch":{"size":70,"vec":"\u0015F\u0000\u0000\u0000 \u0000P\u0015"},"statement":{"size":160,"vec":"ÿÿ¿Àÿÿÿÿÿ½\u0004 \u0001àš\t\u0000\u0000þÿ"},"condition":{"size":21,"vec":"L\u0014\u0010"}},"lib/Getopt/Yath/Option.pm":{"branch":{"vec":"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000","size":152},"statement":{"size":278,"vec":"ÿÿ\u001f\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"},"subroutine":{"vec":"\u0000\u0000\u0000\u0000\u0000","size":44},"condition":{"size":96,"vec":"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"}}},"name":"/home/exodist/projects/Test2/Getopt-Yath","start":1775441778.11236,"dir":"/home/exodist/projects/Test2/Getopt-Yath","count":{"lib/Getopt/Yath/HashBase.pm":{"time":[1,1,7,1,0,21,1,1,33,1,0,51,1,0,46,1,3,0,85,693,3,3,null,112,null,null,null,null,null,null,1,1,413,2,0,69,23,1,3,4,1,2,4,5,4,7,3,2,2,11,2,3,5,10,4,8,60,56,309,16,573,2,2,5,1,4,13,19,15,19,22,21,49,null,20,18,22,14,null,35,null,null,28,null,null,null,null,null,null,null,null,null,null,25,null,null,14,null,null,null,null,null,null,null,null,null,null,null,null,2,3,5,null,2,null,6,4,null,null,5,3,null,null,4,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,11,4,7,28,3,5,2,6,3,4,1,4,2,4,8],"condition":[[0,0,1],[3,0,0],[3,0,0],[0,3.0],[0,3.0],[2,0],[34,0],[0,0],[2,1.0]],"subroutine":[1,1,1,1,1,1,1,1,34,3,3,3,0,0,0,0,0,0,3,0,0,0,0,0],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,1,1,1,1,1,1,34,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,3,2,3,3,147,117,117,30,30,3,3,3,3,3,34,34,34,34,34,34,34,0,34,34,34,30,0,30,0,0,34,0,0,0,0,0,0,0,0,0,0,34,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,0,3,0,3,3,0,0,3,3,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3],"branch":[[1,0],[1,0],[3.0,0],[0,2],[2.0,1],[3,0],[0,2],[117,30],[34.0,0],[0,30],[30,0],[30.0,4],[0,0],[0,0],[0,0],[0,0],[0,34],[0,34],[0,34],[0,34],[0,0],[0,0],[2,1],[2,1],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[3.0,0],[3.0,0],[3.0,0],[3.0,0],[3.0,0]]},"lib/Getopt/Yath/Option/Bool.pm":{"time":[1,1,8,2,0,25,1,0,3,16,0,2],"subroutine":[1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0],"branch":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"lib/Getopt/Yath/Term.pm":{"time":[2,0,8,2,1,21,1,0,2,21,2,47,0,179,2793,1,96],"condition":[[0,0,0],[0,0,0]],"subroutine":[1,1,1,1,1,0],"branch":[[1,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"lib/Getopt/Yath/Option/Scalar.pm":{"time":[1,0,8,1,1,22,1,0,2,18,1,1],"subroutine":[1,1,1,1,0,0,0,0,0,0,0,0,0],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"branch":[[0,0],[0,0],[0,0]]},"lib/Getopt/Yath/Option.pm":{"branch":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"subroutine":[1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"condition":[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0,0],[0,0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0,0],[0,0]],"time":[102,1,4,1,1,10,1,0,27,1,1,2,76,1,4,145,1,3,2,1,563]},"lib/Getopt/Yath/Util.pm":{"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,7,7,7,6,6,7,7,7,7,7,2,2,2,2,2,2,2,2,2,2,2,2,1,2,11,11,10,10,10,10,11,11,10,10,9,8,3,3,2,2,1,1,5,5,6,6,1,5,5,3,2,2,1,1,1],"branch":[[0,2],[0,1],[1.0,1],[1.0,10],[1.0,10],[7.0,3],[1.0,9],[1.0,8],[1.0,2],[1.0,1],[3.0,5],[1,5],[3.0,2],[1,5]],"subroutine":[1,1,1,1,1,1,7,7,2,2,11,11],"condition":[[6,1.0],[7,0],[6,2,1]],"time":[43485,2,5,1,2,12,1,1,16,2,1,5,138,1593,3,334,5418,298,1175,1,175,5,24,1671,3,22,6,6,1493,2,7,360,21,4,100,10,0,3,9,3,11,2,30467,158,4,15,6,254,6658,71,12,39,44,9,3,5,2,1,3,94,2,6,29,7,2,3,4,8,5,6,1,3,5]}},"collected":["branch","condition","statement","subroutine","time"],"finish":1775441778.13717,"version":"unknown"},"1775441777.2234143.25733":{"finish":1775441777.66479,"collected":["branch","condition","statement","subroutine","time"],"version":"unknown","perl":"5.42.2","OS":"linux","run":"t/settings.t","digests":{"lib/Getopt/Yath/Settings/Group.pm":"074198fa9d9f930e73513c89f513402e","lib/Getopt/Yath/Util.pm":"a20e1ed3446db7439850620b7acfc96c","t/settings.t":"e348ca3fad48cf1b7389307c638e88a9","lib/Getopt/Yath/Settings.pm":"5935a1c1dc8a7b5d8a398c10d88be35b"},"count":{"lib/Getopt/Yath/Settings/Group.pm":{"statement":[1,1,1,1,1,1,1,1,1,30,30,30,1,1,7,26,26,26,25,23,23,1,1,1,1,3,3,3,2,1,1,1,1,1,1,47,47,47,47,17,16,1,1],"branch":[[15,15],[3,4],[1.0,25],[2.0,23],[2.0,21],[1.0,1],[30.0,17],[1.0,16]],"subroutine":[1,1,1,30,1,7,26,1,3,1,1,47,1],"condition":[[1,1,1]],"time":[2,0,4,1,1,10,1,0,155,35400,33,24,1,3,17,155,14,107,275,13,39,3,3,2,2,144,8,123,4,1,2,1,1,1,1,3103,20,52,72,119,10,18,2]},"lib/Getopt/Yath/Util.pm":{"subroutine":[1,1,1,1,1,1,2,1,1,1,0,0],"branch":[[0,1],[0,0],[0,1],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"time":[1,0,5,1,0,11,1,0,14,1,1,5,473,1577,2,335,5346,303,1,2,12,2,3,1,0,8,1,1,421,2,5,256,16,2,1,6,1,2,6,1,null,2],"condition":[[2,0],[1,0],[0,0,0]]},"lib/Getopt/Yath/Settings.pm":{"time":[43074,2,5,1,1,15,1,0,4,56,1,9,58,1,2,5041,13,6,17,12,4,2,5,5,3,3,18,144,7,15,3,96,4,3,4,2,1,1,2442,9,23,28,103,6,3,1,2,2,373,1,3,2,2,2],"condition":[[1,1,0],[4,3.0]],"subroutine":[1,1,1,1,1,13,4,7,10,2,1,21,1,1,1],"statement":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,13,13,13,13,13,4,4,4,3,3,2,7,10,10,10,2,1,2,2,2,1,1,1,21,21,21,21,8,7,1,1,1,1,1,1,1,1,1,1],"branch":[[12,1],[1.0,3],[1.0,2],[8.0,2],[1.0,1],[1,1],[13.0,8],[1.0,7]]}},"dir":"/home/exodist/projects/Test2/Getopt-Yath","start":1775441777.64049,"vec":{"lib/Getopt/Yath/Util.pm":{"condition":{"size":7,"vec":"\u0004"},"subroutine":{"size":12,"vec":"ÿ\u0003"},"statement":{"vec":"ÿÿÿÿÿ\u0002\u0000\u0000\u0000\u0000","size":73},"branch":{"size":28,"vec":"\"\u0000\u0000\u0000"}},"lib/Getopt/Yath/Settings.pm":{"condition":{"size":5,"vec":"\u0013"},"branch":{"vec":"\u001eß","size":16},"statement":{"vec":"ÿÿÿÿÿÿ?","size":54},"subroutine":{"vec":"ÿ","size":15}},"lib/Getopt/Yath/Settings/Group.pm":{"condition":{"size":3,"vec":"\u0007"},"statement":{"vec":"ÿÿÿÿÿ\u0007","size":43},"branch":{"vec":"·n","size":16},"subroutine":{"size":13,"vec":"ÿ\u001f"}}},"name":"/home/exodist/projects/Test2/Getopt-Yath"}}}Getopt000755001750001750 015165554207 16366 5ustar00exodistexodist000000000000Getopt-Yath-2.000011/libYath.pm100644001750001750 6000215165554207 20007 0ustar00exodistexodist000000000000Getopt-Yath-2.000011/lib/Getoptpackage Getopt::Yath; use strict; use warnings; our $VERSION = '2.000011'; use Carp qw/croak/; use Getopt::Yath::Util qw/mod2file/; use Getopt::Yath::Instance; use Getopt::Yath::Option; sub import { my $class = shift; my %params = @_; my $caller = caller(); my $inst_class = $params{inst_class} // 'Getopt::Yath::Instance'; my $instance = $inst_class->new(class => $class); $instance->include($class->options) if $params{inherit} && $class->can('options'); my %export; my @common; $export{options} = sub { $instance }; $export{option} = sub { my $title = shift; my $option = Getopt::Yath::Option->create(trace => [caller()], title => $title, @common ? (%{$common[-1]}) : (), @_); $instance->_option($option); }; $export{include_options} = sub { while (my $module = shift @_) { my $file = mod2file($module); require $file unless $INC{$file}; croak "Module '$module' does not have an 'options' method" unless $module->can('options'); my $list = @_ && ref($_[0]) eq 'ARRAY' ? shift(@_) : undef; $instance->include($module->options, $list); } }; $export{option_post_process} = sub { my $cb = pop; my $weight = shift // 0; my ($applicable) = @_; $applicable //= $common[-1]->{applicable} if @common; croak "You must provide a callback coderef" unless $cb && ref($cb) eq 'CODE'; $instance->_post([caller()], $weight, $applicable, $cb); }; $export{option_group} = sub { my ($set, $sub) = @_; my $common = {@common ? (%{$common[-1]}) : (), %$set}; $common->{module} = caller unless $common->{no_module}; push @common => $common; my $ok = eval { $sub->(); 1 }; my $err = $@; pop @common; die $err unless $ok; }; $export{parse_options} = sub { $instance->process_args(@_) }; $export{category_sort_map} = sub { $instance->set_category_sort_map(@_) }; for my $name (keys %export) { no strict 'refs'; croak "$caller already has an '$name' method" if defined(&{"${caller}\::${name}"}); *{"${caller}\::${name}"} = $export{$name}; } return 1; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Getopt::Yath - Option processing yath style. =head1 DESCRIPTION This is the getopt processor yath uses. It should work perfectly fine outside of yath as well. =head1 SYNOPSIS =head2 DEFINING OPTIONS package My::Package; use Getopt::Yath; # Include options from other modules that use Getopt::Yath include_options( 'Some::Options::Package', ..., ); # an option group is basically a way to specify common parameters for all # options defined in the codeblock. option_group {category => 'Human readable category', group => 'settings_group'} => sub { # In addition to the fields specified here, all the fields from the # 'option_group' above are included: option verbose => ( type => 'Bool', # This is a boolean type, it does not take an argument # Optional fields short => 'v', # Allow -v in addition to --verbose default => 0, # What value to use if none is specified (booleans default to 0 anyway) from_env_vars => ['VERBOSE'], # If the $VERBOSE environment variable is set, this will be set to true. set_env_vars => ['VERBOSE'], # If this is set to true it will also set the $VERBOSE environment variable description => "This turns on verbose output", ); option username => ( type => 'Scalar', # Scalar type, requires an argument # Optional short => 'U', # Allow: -U Bob alt => ['user', 'uname'], # Allow: --user Bob, --uname Bob from_env_vars => ['USER'], # Get the value from the $USER env var if it is not provided. default => sub { "bob" . rand(100) }, # If none is specified, and the env var is empty, generate a default. description => "This sets your username", ); # Other options ... }; =head2 PARSING OPTIONS my $parsed = parse_options( ['-v', '--user', 'fred', 'not_an_opt', '--', '--will-not-process'], # Normally you might pass in \@ARGV skip_non_opts => 1, # Skip non-opts, that is any argument that does not start with a '-' it will just skip. stops => ['--'], # Stop processing no_set_env => 1, # Do not actually change %ENV groups => { ':{' => '}:' }, # Arguments between the :{ and }: will be captured into an arrayref, they can be used as option values, or stand-alone ); C<$parsed> is a L object: $parsed->cleared; # {} - Options that were cleared with --no-opt $parsed->skipped; # ['not_an_opt'] - Skipped non options $parsed->settings; # Blessed as Getopt::Yath::Settings # ->settings_group (Blessed as Getopt::Yath::Settings::Group) # ->verbose == 1 # ->username == 'fred' $parsed->stop; # '--' - We stopped at '--', if there was no '--' this would be undef $parsed->remains; # ['--will-not-process'] - Stuff after the '--' that we did not process $parsed->modules; # {'My::Package' => 2} - Any module that provided options that were seen $parsed->env; # {'VERBOSE' => 1} - Environment variables that would have been set =head2 GENERATING COMMAND LINE HELP OUTPUT: sub help { print options()->docs('cli'); } help(); Produces: Human readable category --username ARG, --username=ARG, --user ARG, --user=ARG, --uname ARG --uname=ARG, -U ARG, -U=ARG, --no-username This sets your username Can also be set with the following environment variables: USER --verbose, -v, --no-verbose This turns on verbose output Can also be set with the following environment variables: VERBOSE The following environment variables will be set after arguments are processed: VERBOSE =head2 GENERATING POD: sub pod { print options()->docs('pod', head => 2); # The '2' specifies what heading level to use } pod(); Produces: =head2 Human readable category =over 4 =item --username ARG =item --username=ARG =item --user ARG =item --user=ARG =item --uname ARG =item --uname=ARG =item -U ARG =item -U=ARG =item --no-username This sets your username Can also be set with the following environment variables: C =item --verbose =item -v =item --no-verbose This turns on verbose output Can also be set with the following environment variables: C The following environment variables will be set after arguments are processed: C =back =head1 EXPORTS =over 4 =item $opts = options() This will return an L object. This object holds all the defined options, and does all the real work under the hood. =item $parsed = parse_options(\@ARGV) =item $parsed = parse_options(\@ARGV, %PARAMS) This processes an arrayref of command line arguments and returns a L object. If there is a problem parsing, such as invalid options in the array, exceptions will be thrown. See L for the full list of accessors on the returned object. Available parameters that affect parsing are: =over 4 =item stops => \@STOP_LIST =item stops => ['--'] This is a list of string that if encountered should stop the parsing process. The string encountered will be available via C<< $parsed->stop >>. Any unparsed arguments after the stop will be available via C<< $parsed->remains >>. This is mostly useful for supporting the C<--> option. =item groups => \%GROUP_BORDERS =item groups => { ':{' => '}:' } Arguments between the specified start and end tokens will be grouped together into an arrayref. =item stop_at_non_opts => BOOL This will cause parsing to stop at any non-option. A non-option in this case is any argument that does not start with a C<->. The item stopped at will be available via C<< $parsed->stop >> with the remaining arguments available via C<< $parsed->remains >>. =item skip_non_opts => BOOL This will skip any non-option encountered. A non-option is any argument that does not start with C<->. All skipped items will be available via C<< $parsed->skipped >>. =item skip_invalid_opts => BOOL This will skip any invalid option encountered. This includes any argument that starts with C<-> but is not a valid option. All skipped items will be available via C<< $parsed->skipped >>. =item stop_at_invalid_opts => BOOL This will cause parsing to stop at any invalid option. This includes any argument that starts with C<-> but is not a valid option. The item stopped at will be available via C<< $parsed->stop >> with the remaining arguments available via C<< $parsed->remains >>. =item no_set_env => BOOL Set this to true to prevent any modifications to C<%ENV>. C<< $parsed->env >> will contain the environment variable changes that would have been made. B The env accessor is always populated even if C<%ENV> is modified directly. =back =item include_options('Options::Module::A', 'Options::Module::B', ...) This allows you to build libraries of C options and include them as needed. Options from the specified libraries will be merged into the current packages options. =item option_group \%fields => sub { ... } =item option_group {group => 'my_group'} => sub { option ...; ... } Create a group of options with common parameters. =item option TITLE => \%SPECIFICATION =item option TITLE => (type => '+My::Type', ...) =item option TITLE => (type => 'Getopt::Yath::Option::Type', ...) =item option TITLE => (type => 'Type', ...) This is used to define a single option. You must specify an option NAME and 'type', which must be a valid L subclass. The TITLE is used to produce default values for the 'field' and 'name' fields, both of which can be specified directly if the automatic values are not sufficient. 'field' gets the value of title with dashes replaced by underscores. 'name' gets the value of title with underscores replaced with dashes. Most of the time you can just list the type as the part after the last C<::> in C. You can also specify C or C directly. However if you need to use a module that is not in the C namespace you will need to prefix the module with a C<+> to indicate that. =item option_post_process sub { ... } =item option_post_process $weight, sub { ... } =item option_post_process $weight, $applicable, sub { ... } Register a callback to run after all options have been parsed. The callback receives the L object and the parse state hashref as arguments. C<$weight> controls execution order (lower weights run first, default is 0). C<$applicable> is an optional coderef that determines whether this post-processor should run; if provided it receives the post-process entry, the instance, and the settings object. If used inside an C block, the group's C is inherited when none is specified. option_post_process 100 => sub { my ($instance, $state) = @_; # Do something after all options are parsed }; =item category_sort_map(%map) Set the sort order for option categories in documentation output. Categories with lower values are listed first. By default, "NO CATEGORY - FIX ME" is sorted to 99999 (last). category_sort_map( 'Display Options' => 1, 'Runner Options' => 2, 'Logging Options' => 3, ); =back =head1 OPTION TYPES AND SPECIFICATIONS =head2 REQUIRED WITH NO DEFAULTS =over 4 =item title This is the first argument to C. It is used to build the default values for both C and C. =item group => "group_name" Name of the field to use in the options hash under which the option will be listed: C<< $parsed->{options}->{$group}->{$field_name} = $val >> =item type => 'TypeName' =item type => 'Getopt::Yath::Option::TypeName' =item type => '+My::Custom::Type' This must be a valid L subclass: =over 4 =item Scalar Takes a scalar value. A value is required. Can be used as C<--opt VAL> or C<--opt=val>. C<--no-opt> can be used to clear the value. =item Bool Is either on or off. C<--opt> will turn it on. C<--no-opt> will turn it off. Default is off unless the C is parameter is provided. =item Count Is an integer value, default is to start at C<0>. C<--opt> increments the counter. C<--no-opt> resets the counter. C<--opt=VAL> can be used to specify a desired count. =item List Can take multiple values. C<--opt VAL> appends a value to the list. C<--no-opt> will empty the list. If a C parameter is provided then a single use can set multiple values. For example if C is set to C<,> then C<--opt foo,bar> is provided, then C and C will both be added to the list. =item Map Expects all values to be C pairs and produces a hashref. C<--opt foo=bar> will set C<$h{foo} = 'bar'>. If a C parameter is provided then a single use can set multiple values. For example if C is set to C<,> then C<--opt foo=bar,baz=bat> is provided, then the result will have C<$h{foo} = 'bar'; $h{baz} = 'bat'>. =item Auto This type has an 'autofill' value that is used if no argument is provided to the parameter, IE C<--opt>. But can also be given a specific value using C<--opt=val>. It B support C<--opt VAL> which will most likely result in an exception. =item AutoList This is a combination of 'Auto' and 'List' types. The no-arg form C<--opt> will add the default values(s) to the list. The C<--opt=VAL> form will add additional values. =item AutoMap This is a combination of 'Auto' and 'Map' types. The no-arg form C<--opt> will add the default key+value pairs to the hash. The C<--opt=KEY=VAL> form will add additional values. =item PathList Like L, but values are treated as file paths and may contain shell-style wildcards (globs) which are expanded. For example, C<--opt 'lib/*.pm'> will expand to all matching files. =item AutoPathList Like L with autofill support. The no-arg form C<--opt> adds the autofill paths, while C<--opt=path> adds a specific path. =item BoolMap Match several C<--OPTION-XXX> and C<--no-OPTION-XXX> options based on a regex pattern, populating a hashref where each matched key is given a true or false value depending on the C<--no-> prefix. Requires a C attribute. =back =back =head2 REQUIRED WITH SANE DEFAULTS =over 4 =item field => "field_name" Name of the field to use in the group hash for the result of parsing arguments. C<< $parsed->{options}->{$group}->{$field_name} = $val >> Default is to take the C value and replace any dashes with underscores. =item name => "option-name" Primary name for the option C<--option-name>. Default is to take the C<title> value and replace any underscores with dashes. =item trace => [$caller, $file, $line] This normally resolves to the place C<option()> was called. You can manually override it with a custom value, but you should rarely ever need to. =item category => "Human Readable documentation category" When producing POD or command line documentation, options are put into "categories" which should be the human readable version of the C<group> field. Default is "NO CATEGORY - FIX ME". =item description => "Explanation of what the option controls" Document what the option controls or does. Default is 'NO DESCRIPTION - FIX ME'. =back =head2 OPTIONAL =over 4 =item short => 's' Specify a short flag to use. This is how you provide single-dash single-letter options. =over =item C<-s> If no argument is required this form is available. =item C<-s=VAL> If an argument is allowed this form is available =item C<-sVAL> If an argument is allowed, and this form is not directly disabled by the type (Types can override C<allows_shortval()> to return false to forbid this form. Currently L<Getopt::Yath::Option::Bool> and L<Getopt::Yath::Option::Count> disable this form. =item C<-sss> So far only the L<Getopt::Yath::Option::Count> type makes use of this. It allows you to add the flag multiple times after a single dash to increment the count. =back =item alt => \@LIST =item alt => ['alt1', 'alt2'] Specify alternate or alias names that can be used to set or toggle a field. C<--alt1> C<--alt2 foo> =item prefix => "a-prefix" Specify a prefix to attach to the name, and to any alternate names. This is mainly useful when specifying an option group: option_group {prefix => 'foo'} => sub { option bar => ( type => "Bool", ); }; This would then be used as C<--foo-bar> =item module => 'My::Module' Specify the module the argument should be associated with. This defaults to the caller, so usually you do not need to specify it. This is mainly used in the case of plugins we only want to load if the option is used. =item no_module => BOOL Default is 0. When this is set to true the module name is not used. =item applicable => sub { my $options = shift; ... ? 1 : 0 } This can be used to dynamically show/hide options. When this returns false the option will not be available. =item initialize => $scalar =item initialize => sub { ... } Initialize the value to this before any arguments are parsed. This is mainly used so that L<Getopt::Yath::Option::Map> can start with an empty hash, and L<Getopt::Yath::Option::List> can be initialized to an empty arrayref. This can be a simple scalar (string or number, not a reference), or it may be a codeblock that returns anything you want. Only 1 item should be returned, extra values will result in undefined behavior. For a map this should return an empty hashref, for a list it should return an empty arrayref. =item clear => $scalar =item clear => sub { ... } Similar to C<initialize>, but this is used when clearing the value. For things like 'Map' this should return a hashref, etc. =item default => $scalar =item default => sub { ... } Set a default to use if no value is provided at the command line. This can be a simple scalar (string or number, not a reference), or it may be a codeblock that returns anything you want. Most options will only accept a single default value. L<Getopt::Yath::Option::Map> and L<Getopt::Yath::Option::List> support a list of defaults for setting key/value pairs, or adding items to an array. These are valid for anything: default => 'foo', default => 123, default => sub { "hi" } This is valid for an L<Getopt::Yath::Option::Map>: default => sub { return ('foo' => 'bar') } This is valid for a L<Getopt::Yath::Option::List>: default => sub { return (1, 2, 3, 4) } =item autofill => $scalar =item autofill => sub { ... } This is used for L<Getopt::Yath::Option::Auto> and similar. This is the value used if the command line option is provided, but no value is provided with it. This can be a simple scalar (string or number, not a reference), or it may be a codeblock that returns anything you want. Most options will only accept a single autofill value. L<Getopt::Yath::Option::Map> and L<Getopt::Yath::Option::List> support a list of autofill data for setting key/value pairs, or adding items to an array. These are valid for anything: autofill => 'foo', autofill => 123, autofill => sub { "hi" } This is valid for an L<Getopt::Yath::Option::Map>: autofill => sub { return ('foo' => 'bar') } This is valid for a L<Getopt::Yath::Option::List>: autofill => sub { return (1, 2, 3, 4) } =item normalize => sub { my ($input) = @_; ...; return $output } If you wish to normalize or transform a value then you use this hook. The sub will get the option and the input value as its arguments. You should return the new value to set, or the input value if it does not need to change. =item trigger => sub { my ($opt, %params) = @_; ... } This will be called any time the option is parsed from the command line, or whenever the command line clears the option. B<NOTE:> It will not run when initial, autofill, or default values are set. The C<%params> passed into the sub look like this: ( # If this trigger is called because the value is cleared via --no-OPT: action => 'clear', val => undef, # If a value is set because of --opt being parsed: action => 'set', val => [...], ref => $ref, state => $state, options => $self, settings => $settings, group => $group, ); Note that val is always passed in as an arrayref. For simple scalar type options this will only ever have 1 value. For list or map types it may have multiple values, also note that for such types the trigger will only see the newly added values in the 'val' arrayref, not the values already included, which is important as list and map types can be built over several assignments. =item from_env_vars => \@LIST A list of environment variables that will be used to populate the option's initial value. These will be checked in order, the first one that is set is the one that will be used, others will not be checked once a value is found. This will prevent the default value from being used, but using the option on the command line will override it. B<Note:> that an environment variable can be prefixed with a C<!> to indicate the value should be boolean-inverted. This means that an option like C<quiet> can have C<< from_env_vars => ['!VERBOSE'] >> to be set to true when the VERBOSE env var is false. This also works when setting a variable, so you could have C<< set_env_vars => ['!VERBOSE'] >>. =item clear_env_vars => \@LIST A list of environment variables to clear after the options are all populated. This is useful if you want to use an env var to set an option, but want to make sure no child processes see the environment variable. =item set_env_vars => \@LIST A list of environment variables that will be set to the value of this option (if it is set) when argument processing is complete. B<Note:> This is only supported in types that have a single value, maps and lists are not supported. B<Note:> that an environment variable can be prefixed with a C<!> to indicate the value should be boolean-inverted. This means that an option like C<quiet> can have C<< from_env_vars => ['!VERBOSE'] >> to be set to true when the VERBOSE env var is false. This also works when setting a variable, so you could have C<< set_env_vars => ['!VERBOSE'] >>. =item short_examples => \@LIST =item short_examples => ['', 'ARG', '=ARG'] =item short_examples => [' ARG', '=ARG'] Override the default list of arguments when generating docs. This is used for the short form (single dash followed by a single letter and then a value C<-Ilib>, C<-I lib>, C<-I=lib>, C<-v>, C<-vv>, C<-vvv...>) documentation. =item long_examples => \@LIST =item long_examples => ['', '=ARG'] =item long_examples => [' ARG', '=ARG'] Override the default list of arguments when generating docs. This is used for the long form (double-dash and option name and then a value C<--include>, C<--include=lib>, C<--include lib>) documentation. =back =head1 SOURCE The source code repository for Getopt-Yath can be found at L<http://github.com/Test-More/Getopt-Yath/>. =head1 MAINTAINERS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 AUTHORS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 COPYRIGHT Copyright Chad Granum E<lt>exodist7@gmail.comE<gt>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L<http://dev.perl.org/licenses/> =cut ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������author����������������������������������������������������������������������������������������������000755��001750��001750�� 0�15165554207� 16313� 5����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/xt������������������������������������������������������������������������������������������������������������������������������������������������pod-syntax.t����������������������������������������������������������������������������������������100644��001750��001750�� 251�15165554207� 20724� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/xt/author�����������������������������������������������������������������������������������������������������������������������������������������#!perl # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Yath������������������������������������������������������������������������������������������������000755��001750��001750�� 0�15165554207� 17273� 5����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt����������������������������������������������������������������������������������������������������������������������������������������Term.pm���������������������������������������������������������������������������������������������100644��001750��001750�� 5310�15165554207� 20677� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt/Yath�����������������������������������������������������������������������������������������������������������������������������������package Getopt::Yath::Term; use strict; use warnings; our $VERSION = '2.000011'; our @EXPORT = qw/color USE_COLOR term_size fit_to_width/; use Importer Importer => 'import'; use Term::Table::Util qw/term_size/; BEGIN { if (eval { require Term::ANSIColor; 1 }) { *USE_COLOR = sub() { 1 }; *color = \&Term::ANSIColor::color; } else { *USE_COLOR = sub() { 0 }; *color = sub { '' }; } } sub fit_to_width { my ($join, $text, %params) = @_; my $prefix = $params{prefix}; my $width = $params{width}; unless (defined $width) { $width = term_size() - 20; $width = 80 unless $width && $width >= 80; } my @parts = ref($text) ? @$text : split /\s+/, $text; my @out; my $line = ""; for my $part (@parts) { my $new = $line ? "$line$join$part" : $part; if ($line && length($new) > $width) { push @out => $line; $line = $part; } else { $line = $new; } } push @out => $line if $line; if(defined $prefix) { $_ =~ s/^/$prefix/gm for @out; } return join "\n" => @out; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Getopt::Yath::Term - Terminal utility methods =head1 DESCRIPTION Functions for manipulating text intended for the terminal. =head1 SYNOPSIS use Getopt::Yath::Term qw{ USE_COLOR color fit_to_width term_size }; =head1 EXPORTS =over 4 =item $bool = USE_COLOR() True if color can/should be used. =item $ansi_escape = color($color_name) Get the ANSI escape sequence for the specified color, or return an empty string if color cannot be used. =item $new_text = fit_to_width($join, $text, %params) Wrap text to fit nicely in the terminal. C<$join> is the string used to join words (typically C<" ">). C<$text> is a string (split on whitespace) or an arrayref of parts. Supported params: =over 4 =item prefix => $string A string to prepend to each output line (e.g., C<" "> for indentation). =item width => $columns Target width in columns. Defaults to the terminal width minus 20, with a minimum of 80. =back =item $cols = term_size() Get the width of the terminal in columns. =back =head1 SOURCE The source code repository for Getopt-Yath can be found at L<http://github.com/Test-More/Getopt-Yath/>. =head1 MAINTAINERS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 AUTHORS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 COPYRIGHT Copyright Chad Granum E<lt>exodist7@gmail.comE<gt>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L<http://dev.perl.org/licenses/> =cut ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Util.pm���������������������������������������������������������������������������������������������100644��001750��001750�� 11036�15165554207� 20727� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt/Yath�����������������������������������������������������������������������������������������������������������������������������������package Getopt::Yath::Util; use strict; use warnings; use Carp qw/confess longmess croak/; use Cpanel::JSON::XS(); use Importer Importer => 'import'; use File::Temp qw/ tempfile /; our $VERSION = '2.000011'; our @EXPORT_OK = qw{ decode_json encode_json encode_json_file decode_json_file fqmod mod2file }; my $json = Cpanel::JSON::XS->new->utf8(1)->convert_blessed(1)->allow_nonref(1); my $ascii = Cpanel::JSON::XS->new->ascii(1)->convert_blessed(1)->allow_nonref(1); sub decode_json { my $out; eval { $out = $json->decode(@_); 1} // confess($@); $out } sub encode_json { my $out; eval { $out = $ascii->encode(@_); 1} // confess($@); $out } sub encode_json_file { my ($data) = @_; my $json = encode_json($data); my ($fh, $file) = tempfile("$$-XXXXXX", TMPDIR => 1, SUFFIX => '.json', UNLINK => 0); print $fh $json; close($fh); return $file; } sub decode_json_file { my ($file, %params) = @_; open(my $fh, '<', $file) or die "Could not open '$file': $!"; my $json = do { local $/; <$fh> }; close($fh); if ($params{unlink}) { unlink($file) or warn "Could not unlink '$file': $!"; } return decode_json($json); } sub mod2file { my ($mod) = @_; confess "No module name provided" unless $mod; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; return $file; } sub fqmod { my ($input, $prefixes, %options) = @_; croak "At least 1 prefix is required" unless $prefixes; $prefixes = [$prefixes] unless ref($prefixes) eq 'ARRAY'; croak "At least 1 prefix is required" unless @$prefixes; croak "Cannot use no_require when providing multiple prefixes" if $options{no_require} && @$prefixes > 1; if ($input =~ m/^\+(.*)$/) { my $mod = $1; return $mod if $options{no_require}; return $mod if eval { require(mod2file($mod)); 1 }; confess($@); } my %tried; for my $pre (@$prefixes) { my $mod = $input =~ m/^\Q$pre\E/ ? $input : "$pre\::$input"; if ($options{no_require}) { return $mod; } else { return $mod if eval { require(mod2file($mod)); 1 }; ($tried{$mod}) = split /\n/, $@; $tried{$mod} =~ s{^(Can't locate \S+ in \@INC).*$}{$1.}; } } my @caller = caller; die "Could not locate a module matching '$input' at $caller[1] line $caller[2], the following were checked:\n" . join("\n", map { " * $_: $tried{$_}" } sort keys %tried) . "\n"; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Getopt::Yath::Util - Utility functions for L<Getopt::Yath> =head1 DESCRIPTION Collection of utility functions for Getopt::Yath. =head1 SYNOPSIS use Getopt::Yath::Util qw{ fqmod mod2file decode_json encode_json encode_json_file decode_json_file }; =head1 EXPORTS =over 4 =item $module = fqmod($name, $prefix) =item $module = fqmod($name, $prefix, no_require => $BOOL) =item $module = fqmod($name, \@prefixes) =item $module = fqmod($name, \@prefixes, no_require => $BOOL) Look for a module named "${prefix}::${name}" for each provided prefix. Will returns the first one it finds that can be loaded. If C<< no_require => 1 >> is provided it will not attempt to load any and will usually just return using the first prefix. If $name starts with a '+' then it is assumed to already be a fully qualified module name and the module name will be returned with the '+' removed. If $name starts with one of the prefixes, no prefix will be added and the original $name will be returned. This function will throw an exception if it cannot find a valid module. =item $file = mod2file($module) Convert a module name to a filename. =item $data = decode_json($json) Decode a json string to perl data. =item $json = encode_json($data) Encode perl data into a json string using only ascii characters. =item $file = encode_json_file($data) Encode the data to a json file. A new tempfile filename is returned. =item $data = decode_json_file($path) Decode json from specified filename. =back =head1 SOURCE The source code repository for Getopt-Yath can be found at L<http://github.com/Test-More/Getopt-Yath/>. =head1 MAINTAINERS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 AUTHORS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 COPYRIGHT Copyright Chad Granum E<lt>exodist7@gmail.comE<gt>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L<http://dev.perl.org/licenses/> =cut ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������State.pm��������������������������������������������������������������������������������������������100644��001750��001750�� 6210�15165554207� 21050� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt/Yath�����������������������������������������������������������������������������������������������������������������������������������package Getopt::Yath::State; use strict; use warnings; our $VERSION = '2.000011'; use Getopt::Yath::HashBase qw{ <settings <skipped <remains <env <cleared <modules ~stop }; sub TO_JSON { my $self = shift; return {%$self}; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Getopt::Yath::State - Representation of the result of parsing command-line options. =head1 DESCRIPTION This object is returned by L<Getopt::Yath/parse_options> (and L<Getopt::Yath::Instance/process_args>). It holds the parsed settings, any skipped or remaining arguments, the stop token (if any), environment variable changes, cleared options, and the modules whose options were used. This object is a blessed hash, so hash-key access (e.g., C<< $state->{settings} >>) continues to work for backwards compatibility. However, accessor methods are preferred. =head1 SYNOPSIS my $state = parse_options(\@ARGV, stops => ['--']); my $settings = $state->settings; # Getopt::Yath::Settings object my $remains = $state->remains; # args after a stop token my $skipped = $state->skipped; # skipped non-options my $stop = $state->stop; # what token stopped parsing my $env = $state->env; # env vars that were/would be set my $cleared = $state->cleared; # options cleared via --no-opt my $modules = $state->modules; # modules whose options were used =head1 METHODS =over 4 =item $settings = $state->settings Returns the L<Getopt::Yath::Settings> object containing all parsed option values organized by group. =item $arrayref = $state->skipped Returns an arrayref of arguments that were skipped during parsing (when C<skip_non_opts> or C<skip_invalid_opts> is enabled). =item $arrayref = $state->remains Returns an arrayref of arguments that were not processed, typically those appearing after a stop token such as C<-->. =item $string = $state->stop =item $state->set_stop($token) Returns the token that caused parsing to stop (e.g., C<-->, C<::>), or C<undef> if parsing completed normally. C<set_stop> is used internally during parsing. =item $hashref = $state->env Returns a hashref of environment variable changes. Keys are variable names, values are what was (or would have been, with C<no_set_env>) set. A value of C<undef> means the variable was cleared. =item $hashref = $state->cleared Returns a hashref tracking which options were explicitly cleared via C<--no-opt>. Structure is C<< { group_name => { field_name => 1 } } >>. =item $hashref = $state->modules Returns a hashref of modules whose options were used during parsing. Keys are module names, values are usage counts. =back =head1 SOURCE The source code repository for Getopt-Yath can be found at L<http://github.com/Test-More/Getopt-Yath/>. =head1 MAINTAINERS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 AUTHORS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 COPYRIGHT Copyright Chad Granum E<lt>exodist7@gmail.comE<gt>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L<http://dev.perl.org/licenses/> =cut ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Option.pm�������������������������������������������������������������������������������������������100644��001750��001750�� 54327�15165554207� 21274� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt/Yath�����������������������������������������������������������������������������������������������������������������������������������package Getopt::Yath::Option; use strict; use warnings; use Carp qw/croak/; our @CARP_NOT = ( __PACKAGE__, 'Getopt::Yath', 'Getopt::Yath::Instance', ); use Getopt::Yath::Util qw/mod2file fqmod/; use Getopt::Yath::Term qw/USE_COLOR color/; our $VERSION = '2.000011'; use Getopt::Yath::HashBase qw{ <title <field <name <short <alt <alt_no <allow_underscore_in_alt <group <prefix <trace <module <no_module <maybe <applicable <default <autofill <initialize <clear <default_text <autofill_text <normalize +trigger <allowed_values <allowed_values_text <from_env_vars <clear_env_vars <set_env_vars <category <description +short_examples +long_examples +forms <mod_adds_options <notes }; sub requires_arg { croak "'$_[0]' does not define requires_arg()" } sub add_value { croak "'$_[0]' does not define add_value()" } sub is_populated { croak "'$_[0]' does not define is_populated()" } sub no_arg_value { croak "'$_[0]' does not define no_arg_value()" } sub get_env_value { croak "'$_[0]' does not define get_env_value()" } sub can_set_env { 0 } sub requires_autofill { 0 } sub allows_shortval { $_[0]->allows_arg } sub allows_default { 0 } sub allows_list { 0 } sub allows_arg { $_[0]->requires_arg } sub allows_autofill { $_[0]->requires_autofill } sub get_autofill_value { shift->_get___value(AUTOFILL(), @_) } sub get_default_value { shift->_get___value(DEFAULT(), @_) } sub init_settings { } sub finalize_settings { } sub create { my $class = shift; my %params = @_; croak "create() cannot be called on an option subclass" unless $class eq __PACKAGE__; my $type = delete $params{type} or croak "No 'type' specified"; my $new_class = fqmod($type, __PACKAGE__); local $Carp::CarpLevel = $Carp::CarpLevel = 1; return $new_class->new(%params); } sub get_initial_value { my $self = shift; my $env = $self->from_env_vars; for my $name (@{$env || []}) { my $env = "$name"; $env =~ s/^(!)//; my $neg = $1; next unless exists $ENV{$env}; return $ENV{$env} unless $neg; return $ENV{$env} ? 0 : 1; } return $self->_get___value(INITIALIZE(), @_); } sub get_clear_value { my $self = shift; return $self->_get___value(CLEAR(), @_); } sub _get___value { my $self = shift; my ($field, @args) = @_; return undef if $self->{+MAYBE} && $field eq INITIALIZE(); return unless exists $self->{$field}; my $val = $self->{$field}; # May be undef, that is fine if specified. return $val unless ref($val); croak "'$field' values must either be simple scalars (not references) or a code ref that returns the '$field' value" unless ref($val) eq 'CODE'; return $self->$val(@args); } sub normalize_value { my $self = shift; my (@input) = @_; my $cb = $self->{+NORMALIZE} or return @input; return $cb->(@input); } sub trigger { my $self = shift; my $cb = $self->{+TRIGGER} or return; $self->$cb(@_); } sub clear_field { my $self = shift; my ($ref) = @_; return $$ref = $self->get_clear_value(); } sub is_applicable { my $self = shift; my ($options, $settings) = @_; my $cb = $self->{+APPLICABLE} or return 1; return $self->$cb($options, $settings); } sub long_args { my $self = shift; return ($self->{+NAME}, @{$self->{+ALT} || []}); } sub trace_string { my $self = shift; my $trace = $self->{+TRACE} or return "[UNKNOWN]"; return "$trace->[1] line $trace->[2]"; } sub long_examples { my $self = shift; return @{$self->{+LONG_EXAMPLES}} if $self->{+LONG_EXAMPLES}; return @{$self->default_long_examples(@_)}; } sub short_examples { my $self = shift; return @{$self->{+SHORT_EXAMPLES}} if $self->{+SHORT_EXAMPLES}; return @{$self->default_short_examples(@_)}; } sub init { my $self = shift; croak "A trace is required" unless $self->{+TRACE}; croak "You must provide either 'module' (a module name for dynamic loading) or set 'no_module'" unless $self->{+MODULE} || $self->{+NO_MODULE}; croak "You must specify 'title' or both 'field' and 'name'" unless $self->{+TITLE} || ($self->{+FIELD} && $self->{+NAME}); croak "The 'group' attribute is required" unless $self->{+GROUP}; croak "'set_env_vars' is not supported for this option type" if $self->{+SET_ENV_VARS} && !$self->can_set_env; croak "The 'alt' attribute must be an array-ref" if $self->{+ALT} && ref($self->{+ALT}) ne 'ARRAY'; croak "The 'alt_no' attribute must be an array-ref" if $self->{+ALT_NO} && ref($self->{+ALT_NO}) ne 'ARRAY'; $self->{+MODULE} //= $self->{+TRACE}->[0] unless $self->{+NO_MODULE}; if (my $title = $self->{+TITLE}) { $self->{+FIELD} //= $title; $self->{+NAME} //= $title; } $self->{+FIELD} =~ s/-/_/g; $self->{+NAME} =~ s/_/-/g; unless ($self->allow_underscore_in_alt) { for my $alt (@{$self->{+ALT} // []}) { next unless $alt =~ m/_/; croak "alt option form '$alt' contains an underscore, replace it with a '-' or set 'allow_underscore_in_alt' to true"; } } croak "'default' is not allowed (did you mean 'initialize'" . ($self->allows_autofill ? " or 'autofill'" : "") . "?)" if $self->{+DEFAULT} && !$self->allows_default; croak "'autofill' is required" if $self->requires_autofill && !$self->{+AUTOFILL}; croak "'autofill' is not allowed" if $self->{+AUTOFILL} && !$self->allows_autofill; for my $field (DEFAULT(), AUTOFILL(), INITIALIZE()) { my $val = $self->{$field} or next; my $ref = ref($val) or next; croak "'$field' must be a simple scalar, or a coderef, got a '$ref'" if $ref && $ref ne 'CODE'; } for my $field (NORMALIZE(), APPLICABLE(), TRIGGER()) { my $val = $self->{$field} or next; my $ref = ref($val) || 'not a ref'; next if $ref eq 'CODE'; croak "'$field' must be undef, or a coderef, got '$ref'"; } $self->{+CATEGORY} //= 'NO CATEGORY - FIX ME'; $self->{+DESCRIPTION} //= 'NO DESCRIPTION - FIX ME'; for my $key (sort keys %$self) { croak "'$key' is not a valid option attribute" unless $self->can(uc($key)); } return $self; } sub check_value { my $self = shift; my ($val) = @_; return unless defined $val; $val = [$val] unless ref($val) eq 'ARRAY'; my $av = $self->allowed_values or return; my $r = ref($av); my @bad; for my $v (@$val) { my $ok = 1; if ($r eq 'CODE') { $ok = $self->$av($v); } elsif ($r =~ /Regex/i) { $ok = $v =~ $av; } elsif($r eq 'ARRAY') { $ok = 0; for my $c (@$av) { next unless defined $c; no warnings; $ok = 1 and last if $c eq $v; $ok = 1 and last if 0+$c && 0+$v && $c == $v; } } else { die "Invalid value check '$av' ($r) defined at " . $self->trace_string . ".\n"; } next if $ok; push @bad => $v; } return @bad; } sub forms { my $self = shift; return $self->{+FORMS} if $self->{+FORMS}; my $forms = $self->{+FORMS} = {}; $forms->{'-' . $self->{+SHORT}} = 1 if $self->{+SHORT}; my $prefix = $self->prefix // ''; $prefix .= '-' if length $prefix; $forms->{$_} = 1 for map { "--${prefix}$_" } @{$self->{+ALT} // []}; $forms->{$_} = -1 for map { "--no-${prefix}$_" } @{$self->{+ALT} // []}; $forms->{$_} = -1 for map { "--${prefix}$_" } @{$self->{+ALT_NO} // []}; my $name = $self->name; $forms->{"--${prefix}${name}"} = 1; $forms->{"--no-${prefix}${name}"} = -1; return $forms; } sub _example_append { my $self = shift; my ($params, @prefixes) = @_; return unless $self->allows_list; my $groups = $params->{groups} // {}; my @out; for my $prefix (@prefixes) { for my $group (sort keys %$groups) { push @out => "${prefix}${group} ARG1 ARG2 ... $groups->{$group}"; } } return @out; } sub default_long_examples { my $self = shift; my %params = @_; return [''] unless $self->allows_arg; if ($self->requires_arg) { return [' ARG', '=ARG', $self->_example_append(\%params, ' ', '=')]; } return ['', '=ARG', $self->_example_append(\%params, '=')]; } sub default_short_examples { my $self = shift; my %params = @_; return [''] unless $self->allows_arg; if ($self->requires_arg) { return ['ARG', ' ARG', '=ARG', $self->_example_append(\%params, '', ' ', '=')] if $self->allows_shortval; return [' ARG', '=ARG', $self->_example_append(\%params, ' ', '=')]; } return ['', 'ARG', '=ARG', $self->_example_append(\%params, '', '=')] if $self->allows_shortval; return ['', '=ARG', $self->_example_append(\%params, '=')]; } sub doc_forms { my $self = shift; my %params = @_; my $name = $self->{+NAME}; my $prefix = $self->{+PREFIX} ? "$self->{+PREFIX}-" : ""; my @long_examples = $self->long_examples(%params); my @forms = (map { "--${prefix}${name}${_}" } @long_examples ); for my $alt (@{$self->{+ALT} || []}) { push @forms => (map { "--${prefix}${alt}${_}" } @long_examples); } if (my $short = $self->{+SHORT}) { my @short_examples = $self->short_examples(%params); push @forms => map { "-${short}${_}" } @short_examples; } @forms = sort { $a =~ m/^(-+)/; my $al = length($1 // ''); $b =~ m/^(-+)/; my $bl = length($1 // ''); $al <=> $bl || length($a) <=> length($b); } @forms; my @no_forms; push @no_forms => "--no-${prefix}${name}"; push @no_forms => map { "--$_" } @{$self->{+ALT_NO} // []}; return \@forms, \@no_forms; } sub cli_docs { my $self = shift; my %params = @_; $params{color} //= USE_COLOR && -t STDOUT; my ($forms, $no_forms, $other_forms) = $self->doc_forms(%params); my @out; if ($params{color}) { @out = ( color('underline white') . $self->{+NAME} . color('reset'), (map { color('green') . $_ . color('reset') } @{$forms // []}), (map { color('yellow') . $_ . color('reset') } @{$no_forms // []}), (map { color('cyan') . $_ . color('reset') } @{$other_forms // []}), ); } else { @out = ( "[$self->{+NAME}]", @{$forms // []}, @{$no_forms // []}, @{$other_forms // []}, ); } push @out => Getopt::Yath::Term::fit_to_width(" ", $self->{+DESCRIPTION}, prefix => " "); push @out => "\n" . Getopt::Yath::Term::fit_to_width(" ", "Can also be set with the following environment variables: " . join(", ", @{$self->{+FROM_ENV_VARS}}), prefix => " ") if $self->{+FROM_ENV_VARS}; push @out => "\n" . Getopt::Yath::Term::fit_to_width(" ", "The following environment variables will be cleared after arguments are processed: " . join(", ", @{$self->{+CLEAR_ENV_VARS}}), prefix => " ") if $self->{+CLEAR_ENV_VARS}; push @out => "\n" . Getopt::Yath::Term::fit_to_width(" ", "The following environment variables will be set after arguments are processed: " . join(", ", @{$self->{+SET_ENV_VARS}}), prefix => " ") if $self->{+SET_ENV_VARS}; if (my @notes = $self->notes) { my %seen; push @out => map { "\n" . Getopt::Yath::Term::fit_to_width(" ", "Note: $_", prefix => " ") } grep { $_ && !$seen{$_}++ } @notes; } for my $field (qw/default autofill/) { my $t = "${field}_text"; my $val = $self->$t || $self->$field // next; next if ref($val); push @out => "\n" . Getopt::Yath::Term::fit_to_width(" ", "$field: $val", prefix => " "); } if (my $avt = $self->allowed_values_text) { push @out => "\n" . Getopt::Yath::Term::fit_to_width(" ", "Allowed Values: $avt", prefix => " "); } elsif (my $vals = $self->allowed_values) { push @out => "\n" . Getopt::Yath::Term::fit_to_width(" ", "Allowed Values: " . join(", " => @$vals), prefix => " ") if @$vals; } return join "\n" => @out; } sub pod_docs { my $self = shift; my %params = @_; my ($forms, $no_forms, $other_forms) = $self->doc_forms(%params); my @out = map { "=item $_" } grep { $_ } @$forms, @$no_forms, @$other_forms; push @out => $self->description; push @out => "Can also be set with the following environment variables: " . join(", ", map { "C<$_>" } @{$self->{+FROM_ENV_VARS}}) if $self->{+FROM_ENV_VARS}; push @out => "The following environment variables will be cleared after arguments are processed: " . join(", ", map { "C<$_>" } @{$self->{+CLEAR_ENV_VARS}}) if $self->{+CLEAR_ENV_VARS}; push @out => "The following environment variables will be set after arguments are processed: " . join(", ", map { "C<$_>" } @{$self->{+SET_ENV_VARS}}) if $self->{+SET_ENV_VARS}; my %seen; push @out => map { "Note: $_" } grep { $_ && !$seen{$_}++ } $self->notes; return join("\n\n" => @out) . "\n"; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Getopt::Yath::Option - Base class for options. =head1 DESCRIPTION This is the base class for option types used in L<Getopt::Yath>. =head1 SYNOPSIS To create a new type you want to start with this template: package Getopt::Yath::Option::MyType; use strict; use warnings; # Become a subclass use parent 'Getopt::Yath::Option'; # Bring in some useful constants; use Getopt::Yath::HashBase; # Must define these: ####### # True if an arg is required # True means you can do '--flag value' # Without this you must do '--flag=value' to set a value, otherwise it can # act like a bool or a counter and not need a value. sub requires_arg { ... } sub add_value { my $self = shift; my ($ref, $val) = @_; # $ref contains a scalar ref to where the value is stored # $val is the value being assigned to the option # Most types can get away with this: ${$ref} = $val; } sub is_populated { my $self = shift; my ($ref) = @_; # $$ref contains the slot where the value would be stored if it was set. # Most types can get away with this: return defined(${$ref}) ? 1 : 0; } sub no_arg_value { my $self = shift; # This only happens if you do not require an arg, and do not require an # autofill. Only bool nd count types currently do this. # This is the value that will be used in such cases. # If you do not meet the conditions for this to be called you can simply remove this method. ...; } # May want to define these, otherwise remove them from this file ####### sub notes { ... } # Return a list of notes to include in documentation sub allows_arg { ... } # True if an arg is allowed. sub allows_autofill { ... } # True if autofill is allowed sub allows_default { ... } # True if defaults are allowed sub requires_autofill { ... } # True if an auto-fill is allowed # Change this to true if this option type can set an environment variable sub can_set_env { 0 } # You only need this if you can set an environment variable get_env_value { my $self = shift; my ($envname, $ref) = @_; # For simple scalar values this is usually good enough # This should be the value to assign to environment variables that are # set by this option. return $$ref; } sub default_long_examples { my $self = shift; ...; return [' ARG', '=ARG']; # If you require an argument return ['']; # If do not allow arguments return ['', '=ARG']; # If arguments are optional } sub default_short_examples { my $self = shift; ...; return [' ARG', '=ARG']; # If you require an argument return ['']; # If do not allow arguments return ['', '=ARG']; # If arguments are optional } # Run right after the initial value for this option is set. Other options # may not have their initial values yet. sub init_settings { my $self = shift; my ($state, $settings, $group, $ref) = @_; ... } # Run after all the options have been set, parsed, and post-blocks have # been run. # This is run before the environment variable for this option has been set, # but other options may have had theirs set. sub finalize_settings { my $self = shift; my ($state, $settings, $group, $ref) = @_; ... } # Probably should not define these, but here for reference. # Remove these if you do not plan to override them # The base class implementations work for most types. ####### sub clear_field { ... } # Used to clear the field sub get_autofill_value { ... } # Used to get the autofill value sub get_default_value { ... } # Used to get the default value 1; =head1 METHODS =head2 CONSTRUCTION =over 4 =item $option = Getopt::Yath::Option->create(type => $type, %spec) Factory method that creates an option of the appropriate subclass. C<$type> can be a short name like C<'Bool'> (resolved to C<Getopt::Yath::Option::Bool>), a fully qualified class name, or a C<+>-prefixed class name for types outside the C<Getopt::Yath::Option::> namespace. =back =head2 INTROSPECTION =over 4 =item $string = $option->trace_string() Returns a human-readable string like C<"Foo.pm line 42"> for error messages. =item $forms = $option->forms() Returns a hashref mapping all recognized command-line forms to their delta values. Positive delta (1) means the option sets a value, negative (-1) means it clears (the C<--no-> prefix forms). =item @args = $option->long_args() Returns the primary name and all alternate names for this option. =item $bool = $option->is_applicable($instance, $settings) Returns true if this option should be active given the current state. Calls the C<applicable> coderef if one was provided, otherwise returns true. =back =head2 VALUE HANDLING These methods are typically overridden by subclasses: =over 4 =item $bool = $option->requires_arg() Must return true if the option requires an argument (e.g., C<--opt VALUE>). =item $option->add_value($ref, @values) Store the given values into the scalar reference C<$ref>. How values are stored depends on the option type. =item $bool = $option->is_populated($ref) Return true if C<$$ref> contains a meaningful value (i.e., the option has been set). =item @val = $option->no_arg_value($settings) Return the value to use when the option is specified without an argument and without autofill. Only relevant for types like Bool and Count. =item @val = $option->get_env_value($env_name, $ref) Return the value to write to the named environment variable. Only needed when C<can_set_env> returns true. =item @val = $option->normalize_value(@input) Pass values through the C<normalize> callback if one was provided. =item @bad = $option->check_value(\@values) Check values against C<allowed_values> if defined. Returns a list of values that failed validation. =item $option->clear_field($ref) Reset the option to its cleared state via C<get_clear_value>. =item $option->trigger(%params) Invoke the C<trigger> callback if one was provided. =back =head2 DEFAULTS AND INITIALIZATION =over 4 =item $val = $option->get_initial_value($settings) Returns the initial value for the option, checking C<from_env_vars> first, then falling back to the C<initialize> attribute. =item @val = $option->get_default_value($settings) Returns the default value from the C<default> attribute. =item @val = $option->get_autofill_value($settings) Returns the autofill value from the C<autofill> attribute. =item $val = $option->get_clear_value() Returns the value to use when the option is cleared (via C<--no-opt>). =back =head2 DOCUMENTATION =over 4 =item ($forms, $no_forms) = $option->doc_forms(%params) Returns two arrayrefs: one of the positive forms (e.g., C<--verbose>, C<-v ARG>) and one of the negative forms (e.g., C<--no-verbose>). Used by the documentation generators. =item $text = $option->cli_docs(%params) Generate CLI help text for this option, including forms, description, environment variable notes, and allowed values. =item $text = $option->pod_docs(%params) Generate POD documentation for this option. =item @examples = $option->long_examples(%params) =item @examples = $option->short_examples(%params) Return the example suffixes used in documentation (e.g., C<' ARG'>, C<'=ARG'>). Uses custom examples if provided, otherwise falls back to C<default_long_examples> or C<default_short_examples>. =back =head2 HOOKS =over 4 =item $option->init_settings($state, $settings, $group, $ref) Called right after the initial value is set for each option. Other options may not have their initial values yet. Override in subclasses for early setup. =item $option->finalize_settings($state, $settings, $group, $ref) Called after all options have been parsed and post-processors have run, but before environment variables are set. Override in subclasses for late adjustments. =back =head1 EXAMPLES See the following modules source for examples: =over 4 =item L<Getopt::Yath::Option::Scalar> =item L<Getopt::Yath::Option::Bool> =item L<Getopt::Yath::Option::Count> =item L<Getopt::Yath::Option::List> =item L<Getopt::Yath::Option::Map> =item L<Getopt::Yath::Option::Auto> =item L<Getopt::Yath::Option::AutoList> =item L<Getopt::Yath::Option::AutoMap> =item L<Getopt::Yath::Option::BoolMap> =item L<Getopt::Yath::Option::PathList> =item L<Getopt::Yath::Option::AutoPathList> =back =head1 SOURCE The source code repository for Getopt-Yath can be found at L<http://github.com/Test-More/Getopt-Yath/>. =head1 MAINTAINERS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 AUTHORS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 COPYRIGHT Copyright Chad Granum E<lt>exodist7@gmail.comE<gt>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L<http://dev.perl.org/licenses/> =cut ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������HashBase.pm�����������������������������������������������������������������������������������������100644��001750��001750�� 45173�15165554207� 21501� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt/Yath�����������������������������������������������������������������������������������������������������������������������������������package Getopt::Yath::HashBase; use strict; use warnings; our $VERSION = '2.000011'; ################################################################# # # # This is a generated file! Do not modify this file directly! # # Use hashbase_inc.pl script to regenerate this file. # # The script is part of the Object::HashBase distribution. # # Note: You can modify the version number above this comment # # if needed, that is fine. # # # ################################################################# { no warnings 'once'; $Getopt::Yath::HashBase::HB_VERSION = '0.015'; *Getopt::Yath::HashBase::ATTR_SUBS = \%Object::HashBase::ATTR_SUBS; *Getopt::Yath::HashBase::ATTR_LIST = \%Object::HashBase::ATTR_LIST; *Getopt::Yath::HashBase::VERSION = \%Object::HashBase::VERSION; *Getopt::Yath::HashBase::CAN_CACHE = \%Object::HashBase::CAN_CACHE; } require Carp; { no warnings 'once'; $Carp::Internal{+__PACKAGE__} = 1; } BEGIN { { # Make sure none of these get messed up. local ($SIG{__DIE__}, $@, $?, $!, $^E); if (eval { require Class::XSAccessor; Class::XSAccessor->VERSION(1.19); 1 }) { *CLASS_XS_ACCESSOR = sub() { 1 } } else { *CLASS_XS_ACCESSOR = sub() { 0 } } } # these are not strictly equivalent, but for out use we don't care # about order *_isa = ($] >= 5.010 && require mro) ? \&mro::get_linear_isa : sub { no strict 'refs'; my @packages = ($_[0]); my %seen; for my $package (@packages) { push @packages, grep !$seen{$_}++, @{"$package\::ISA"}; } return \@packages; } } my %SPEC = ( '^' => {reader => 1, writer => 0, dep_writer => 1, read_only => 0, strip => 1}, '-' => {reader => 1, writer => 0, dep_writer => 0, read_only => 1, strip => 1}, '>' => {reader => 0, writer => 1, dep_writer => 0, read_only => 0, strip => 1}, '<' => {reader => 1, writer => 0, dep_writer => 0, read_only => 0, strip => 1}, '+' => {reader => 0, writer => 0, dep_writer => 0, read_only => 0, strip => 1}, '~' => {reader => 1, writer => 1, dep_writer => 0, read_only => 0, strip => 1, no_xs => 1}, ); sub spec { \%SPEC } sub import { my $class = shift; my $into = caller; $class->do_import($into, @_); } sub do_import { my $class = shift; my $into = shift; # Make sure we list the OLDEST version used to create this class. my $ver = $Getopt::Yath::HashBase::HB_VERSION || $Getopt::Yath::HashBase::VERSION; $Getopt::Yath::HashBase::VERSION{$into} = $ver if !$Getopt::Yath::HashBase::VERSION{$into} || $Getopt::Yath::HashBase::VERSION{$into} > $ver; my $isa = _isa($into); my $attr_list = $Getopt::Yath::HashBase::ATTR_LIST{$into} ||= []; my $attr_subs = $Getopt::Yath::HashBase::ATTR_SUBS{$into} ||= {}; my @pre_init; my @post_init; my $add_new = 1; if (my $have_new = $into->can('new')) { my $new_lookup = $Getopt::Yath::HashBase::NEW_LOOKUP //= {}; $add_new = 0 unless $new_lookup->{$have_new}; } my %subs = ( ($add_new ? ($class->_build_new($into, \@pre_init, \@post_init)) : ()), (map %{$Getopt::Yath::HashBase::ATTR_SUBS{$_} || {}}, @{$isa}[1 .. $#$isa]), ($class->args_to_subs($attr_list, $attr_subs, \@_, $into)), ); no strict 'refs'; while (my ($k, $v) = each %subs) { if (ref($v) eq 'CODE') { *{"$into\::$k"} = $v; } else { my ($sub, @args) = @$v; $sub->(@args); } } } sub args_to_subs { my $class = shift; my ($attr_list, $attr_subs, $args, $into) = @_; my $use_gen = $class->can('gen_accessor') ; my %out; while (@$args) { my $x = shift @$args; my $p = substr($x, 0, 1); my $spec = $class->spec->{$p} || {reader => 1, writer => 1}; substr($x, 0, 1) = '' if $spec->{strip}; push @$attr_list => $x; my ($sub, $attr) = (uc $x, $x); $attr_subs->{$sub} = sub() { $attr }; $out{$sub} = $attr_subs->{$sub}; my $copy = "$attr"; if ($spec->{reader}) { if ($use_gen) { $out{$attr} = $class->gen_accessor(reader => $copy, $spec, $args); } elsif (CLASS_XS_ACCESSOR && !$spec->{no_xs}) { $out{$attr} = [\&Class::XSAccessor::newxs_getter, "$into\::$attr", $copy]; } else { $out{$attr} = sub { $_[0]->{$attr} }; } } if ($spec->{writer}) { if ($use_gen) { $out{"set_$attr"} = $class->gen_accessor(writer => $copy, $spec, $args); } elsif(CLASS_XS_ACCESSOR && !$spec->{no_xs}) { $out{"set_$attr"} = [\&Class::XSAccessor::newxs_setter, "$into\::set_$attr", $copy, 0]; } else { $out{"set_$attr"} = sub { $_[0]->{$attr} = $_[1] }; } } elsif($spec->{read_only}) { $out{"set_$attr"} = $use_gen ? $class->gen_accessor(read_only => $copy, $spec, $args) : sub { Carp::croak("'$attr' is read-only") }; } elsif($spec->{dep_writer}) { $out{"set_$attr"} = $use_gen ? $class->gen_accessor(dep_writer => $copy, $spec, $args) : sub { Carp::carp("set_$attr() is deprecated"); $_[0]->{$attr} = $_[1] }; } if ($spec->{custom}) { my %add = $class->gen_accessor(custom => $copy, $spec, $args); $out{$_} = $add{$_} for keys %add; } } return %out; } sub attr_list { my $class = shift; my $isa = _isa($class); my %seen; my @list = grep { !$seen{$_}++ } map { my @out; if (0.004 > ($Getopt::Yath::HashBase::VERSION{$_} || 0)) { Carp::carp("$_ uses an inlined version of Getopt::Yath::HashBase too old to support attr_list()"); } else { my $list = $Getopt::Yath::HashBase::ATTR_LIST{$_}; @out = $list ? @$list : () } @out; } reverse @$isa; return @list; } sub _build_new { my $class = shift; my ($into, $pre_init, $post_init) = @_; my $add_pre_init = sub(&) { push @$pre_init => $_[-1] }; my $add_post_init = sub(&) { push @$post_init => $_[-1] }; my $__pre_init = $into->can('_pre_init'); my $_pre_init = $__pre_init ? sub { ($__pre_init->(), @$pre_init) } : sub { @$pre_init }; my $__post_init = $into->can('_post_init'); my $_post_init = $__post_init ? sub { ($__post_init->(), @$post_init) } : sub { @$post_init }; my $new = sub { my $class = shift; my $self; if (@_ == 1) { my $arg = shift; my $type = ref($arg); if ($type eq 'HASH') { $self = bless({%$arg}, $class); } else { Carp::croak("Not sure what to do with '$type' in $class constructor") unless $type eq 'ARRAY'; my %proto; my @attributes = attr_list($class); while (@$arg) { my $val = shift @$arg; my $key = shift @attributes or Carp::croak("Too many arguments for $class constructor"); $proto{$key} = $val; } $self = bless(\%proto, $class); } } else { $self = bless({@_}, $class); } $Getopt::Yath::HashBase::CAN_CACHE{$class} = $self->can('init') unless exists $Getopt::Yath::HashBase::CAN_CACHE{$class}; $self->$_() for $_pre_init->(); $self->init() if $Getopt::Yath::HashBase::CAN_CACHE{$class}; $self->$_() for reverse $_post_init->(); $self; }; my $new_lookup = $Getopt::Yath::HashBase::NEW_LOOKUP //= {}; $new_lookup->{$new} = 1; my %out; { no strict 'refs'; $out{new} = $new unless defined(&{"${into}\::new"}); $out{add_pre_init} = $add_pre_init unless defined(&{"${into}\::add_pre_init"}); $out{add_post_init} = $add_post_init unless defined(&{"${into}\::add_post_init"}); $out{_pre_init} = $_pre_init unless defined(&{"${into}\::_pre_init"}); $out{_post_init} = $_post_init unless defined(&{"${into}\::_post_init"}); } return %out; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Getopt::Yath::HashBase - Build hash based classes. =head1 SYNOPSIS A class: package My::Class; use strict; use warnings; # Generate 3 accessors use Getopt::Yath::HashBase qw/foo -bar ^baz <bat >ban +boo/; # Chance to initialize defaults sub init { my $self = shift; # No other args $self->{+FOO} ||= "foo"; $self->{+BAR} ||= "bar"; $self->{+BAZ} ||= "baz"; $self->{+BAT} ||= "bat"; $self->{+BAN} ||= "ban"; $self->{+BOO} ||= "boo"; } sub print { my $self = shift; print join ", " => map { $self->{$_} } FOO, BAR, BAZ, BAT, BAN, BOO; } Subclass it package My::Subclass; use strict; use warnings; # Note, you should subclass before loading HashBase. use base 'My::Class'; use Getopt::Yath::HashBase qw/bub/; sub init { my $self = shift; # We get the constants from the base class for free. $self->{+FOO} ||= 'SubFoo'; $self->{+BUB} ||= 'bub'; $self->SUPER::init(); } use it: package main; use strict; use warnings; use My::Class; # These are all functionally identical my $one = My::Class->new(foo => 'MyFoo', bar => 'MyBar'); my $two = My::Class->new({foo => 'MyFoo', bar => 'MyBar'}); my $three = My::Class->new(['MyFoo', 'MyBar']); # Readers! my $foo = $one->foo; # 'MyFoo' my $bar = $one->bar; # 'MyBar' my $baz = $one->baz; # Defaulted to: 'baz' my $bat = $one->bat; # Defaulted to: 'bat' # '>ban' means setter only, no reader # '+boo' means no setter or reader, just the BOO constant # Setters! $one->set_foo('A Foo'); #'-bar' means read-only, so the setter will throw an exception (but is defined). $one->set_bar('A bar'); # '^baz' means deprecated setter, this will warn about the setter being # deprecated. $one->set_baz('A Baz'); # '<bat' means no setter defined at all # '+boo' means no setter or reader, just the BOO constant $one->{+FOO} = 'xxx'; Add pre_init and post-init: B<Note:> These are not provided if you define your own new() method (via a stub at the top). B<Note:> Single inheritence should work with child classes doing the pre/post init subs during construction, so long as all classes in the chain use a generated new(). This will probably explode badly in multiple-inheritence. package My::Class; use strict; use warnings; # Generate 3 accessors use Getopt::Yath::HashBase qw/foo -bar ^baz <bat >ban +boo/; # Do more stuff before init, add as many as you like by calling this # multiple times with a different code block each time add_pre_init { ... }; # Chance to initialize defaults sub init { ... } # Do stuff after init, add as many as you want, they run in reverse order add_post_init { my $self = shift; ... }; sub print { my $self = shift; print join ", " => map { $self->{$_} } FOO, BAR, BAZ, BAT, BAN, BOO; } You can also call add_pre_init and add_post_init as class methods from anywhere to add init and post-init to the class. B<Please note:> This will apply to all future instances of the object created, but not past ones. This is a form of meta-programming and it is easy to abuse. It is also helpful for extending Getopt::Yath::HashBase. My::Class->add_pre_init(sub { ... }); My::Class->add_post_init(sub { ... }); =head1 DESCRIPTION This package is used to generate classes based on hashrefs. Using this class will give you a C<new()> method, as well as generating accessors you request. Generated accessors will be getters, C<set_ACCESSOR> setters will also be generated for you. You also get constants for each accessor (all caps) which return the key into the hash for that accessor. Single inheritance is also supported. =head1 XS ACCESSORS If L<Class::XSAccessor> is installed, it will be used to generate XS getters and setters. =head2 CAVEATS The only caveat noticed so far is that if you take a reference to an objects attribute element: C<< my $ref = \($obj->{foo}) >> then use C<< $obj->set_foo(1) >>, setting C<< $$ref = 2 >> will not longer work, and getting the value via C<< $val = $$ref >> will also not work. This is not a problem when L<Class::XSAccessor> is not used. In practice it will nbe VERY rare for this to be a problem, but it was noticed because it broke a performance optimization in L<Test2::API>. You can request an accessor NOT be xs with the '~' prefix: use Getopt::Yath::HashBase '~foo'; The sample above generates C<foo()> and C<set_foo()> and they are NOT implemented in XS. =head1 THIS IS A BUNDLED COPY OF HASHBASE This is a bundled copy of L<Object::HashBase>. This file was generated using the C</home/exodist/perl5/perlbrew/perls/main/bin/hashbase_inc.pl> script. =head1 METHODS =head2 PROVIDED BY HASH BASE =over 4 =item $it = $class->new(%PAIRS) =item $it = $class->new(\%PAIRS) =item $it = $class->new(\@ORDERED_VALUES) Create a new instance. HashBase will not export C<new()> if there is already a C<new()> method in your packages inheritance chain. B<If you do not want this method you can define your own> you just have to declare it before loading L<Getopt::Yath::HashBase>. package My::Package; # predeclare new() so that HashBase does not give us one. sub new; use Getopt::Yath::HashBase qw/foo bar baz/; # Now we define our own new method. sub new { ... } This makes it so that HashBase sees that you have your own C<new()> method. Alternatively you can define the method before loading HashBase instead of just declaring it, but that scatters your use statements. The most common way to create an object is to pass in key/value pairs where each key is an attribute and each value is what you want assigned to that attribute. No checking is done to verify the attributes or values are valid, you may do that in C<init()> if desired. If you would like, you can pass in a hashref instead of pairs. When you do so the hashref will be copied, and the copy will be returned blessed as an object. There is no way to ask HashBase to bless a specific hashref. In some cases an object may only have 1 or 2 attributes, in which case a hashref may be too verbose for your liking. In these cases you can pass in an arrayref with only values. The values will be assigned to attributes in the order the attributes were listed. When there is inheritance involved the attributes from parent classes will come before subclasses. =back =head2 HOOKS =over 4 =item $self->init() This gives you the chance to set some default values to your fields. The only argument is C<$self> with its indexes already set from the constructor. B<Note:> Getopt::Yath::HashBase checks for an init using C<< $class->can('init') >> during construction. It DOES NOT call C<can()> on the created object. Also note that the result of the check is cached, it is only ever checked once, the first time an instance of your class is created. This means that adding an C<init()> method AFTER the first construction will result in it being ignored. =back =head1 ACCESSORS =head2 READ/WRITE To generate accessors you list them when using the module: use Getopt::Yath::HashBase qw/foo/; This will generate the following subs in your namespace: =over 4 =item foo() Getter, used to get the value of the C<foo> field. =item set_foo() Setter, used to set the value of the C<foo> field. =item FOO() Constant, returns the field C<foo>'s key into the class hashref. Subclasses will also get this function as a constant, not simply a method, that means it is copied into the subclass namespace. The main reason for using these constants is to help avoid spelling mistakes and similar typos. It will not help you if you forget to prefix the '+' though. =back =head2 READ ONLY use Getopt::Yath::HashBase qw/-foo/; =over 4 =item set_foo() Throws an exception telling you the attribute is read-only. This is exported to override any active setters for the attribute in a parent class. =back =head2 DEPRECATED SETTER use Getopt::Yath::HashBase qw/^foo/; =over 4 =item set_foo() This will set the value, but it will also warn you that the method is deprecated. =back =head2 NO SETTER use Getopt::Yath::HashBase qw/<foo/; Only gives you a reader, no C<set_foo> method is defined at all. =head2 NO READER use Getopt::Yath::HashBase qw/>foo/; Only gives you a write (C<set_foo>), no C<foo> method is defined at all. =head2 CONSTANT ONLY use Getopt::Yath::HashBase qw/+foo/; This does not create any methods for you, it just adds the C<FOO> constant. =head2 NO XS use Getopt::Yath::HashBase qw/~foo/; This enforces that the getter and setter generated for C<foo> will NOT use L<Class::XSAccessor> even if it is installed. =head1 SUBCLASSING You can subclass an existing HashBase class. use base 'Another::HashBase::Class'; use Getopt::Yath::HashBase qw/foo bar baz/; The base class is added to C<@ISA> for you, and all constants from base classes are added to subclasses automatically. =head1 GETTING A LIST OF ATTRIBUTES FOR A CLASS Getopt::Yath::HashBase provides a function for retrieving a list of attributes for an Getopt::Yath::HashBase class. =over 4 =item @list = Getopt::Yath::HashBase::attr_list($class) =item @list = $class->Getopt::Yath::HashBase::attr_list() Either form above will work. This will return a list of attributes defined on the object. This list is returned in the attribute definition order, parent class attributes are listed before subclass attributes. Duplicate attributes will be removed before the list is returned. B<Note:> This list is used in the C<< $class->new(\@ARRAY) >> constructor to determine the attribute to which each value will be paired. =back =head1 SOURCE The source code repository for HashBase can be found at F<http://github.com/Test-More/HashBase/>. =head1 MAINTAINERS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 AUTHORS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 COPYRIGHT Copyright 2017 Chad Granum E<lt>exodist@cpan.orgE<gt>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See F<http://dev.perl.org/licenses/> =cut �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Settings.pm�����������������������������������������������������������������������������������������100644��001750��001750�� 7763�15165554207� 21606� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt/Yath�����������������������������������������������������������������������������������������������������������������������������������package Getopt::Yath::Settings; use strict; use warnings; our $VERSION = '2.000011'; use Carp(); use Getopt::Yath::Settings::Group; use Getopt::Yath::Util qw/decode_json decode_json_file/; sub new { my $class = shift; my $self = @_ == 1 ? $_[0] : { @_ }; bless($self, $class); Getopt::Yath::Settings::Group->new($_) for values %$self; return $self; } sub maybe { my $self = shift; my ($group, $opt, $default) = @_; return $default unless $self->check_group($group); my $g = $self->$group; return $default unless $g->check_option($opt); return $g->$opt // $default; } sub check_group { $_[0]->{$_[1]} // 0 } sub group { my $self = shift; my ($group, $vivify) = @_; return $self->{$group} if $self->{$group}; return $self->{$group} = Getopt::Yath::Settings::Group->new() if $vivify; Carp::confess("The '$group' group is not defined"); } sub create_group { my $self = shift; my ($name, @vals) = @_; return $self->{$name} = Getopt::Yath::Settings::Group->new(@vals == 1 ? $vals[0] : { @vals }); } sub delete_group { my $self = shift; my ($name) = @_; delete $self->{$name}; } our $AUTOLOAD; sub AUTOLOAD { my $this = shift; my $group = $AUTOLOAD; $group =~ s/^.*:://g; return if $group eq 'DESTROY'; Carp::confess("Method $group() must be called on a blessed instance") unless ref($this); $this->group($group); } sub FROM_JSON_FILE { my $class = shift; my ($file, %params) = @_; my $data = decode_json_file($file, %params); $class->new($data); } sub FROM_JSON { my $class = shift; my ($json) = @_; my $data = decode_json($json); $class->new($data); } sub TO_JSON { my $self = shift; return {%$self}; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Getopt::Yath::Settings - Representation of parsed command line options. =head1 DESCRIPTION When you parse command line options using L<Getopt::Yath> an instance of this data structure is included in the returned structure. =head1 SYNOPSIS my $parsed = parse_options(\@ARGV, ...); my $settings = $parsed->settings; my $value = $settings->GROUP->OPTION; # Or my $value = $settings->group('GROUP')->option('OPTION'); # Or my $value = $settings->maybe('GROUP' => 'OPTION', $default); if ($group = $settings->check_group('GROUP')) { # We have the specified group } =head1 METHODS =over 4 =item $group = $settings->GROUP If a group exists, there will be a ->GROUP method for it. =item $value = $settings->maybe($group_name, $option_name) =item $value = $settings->maybe($group_name, $option_name, $default_value) If the group and option both exist and are defined return the value, otherwise return the default. =item $group = $settings->check_group($group_name) Check if the group exists, if so return it. =item $group = $settings->group($group_name) =item $group = $settings->group($group_name, $vivify) Get the specified group. If $vivify is true it will create the group if it does not already exist. Throws an exception if the group does not exist and vivify is not specified. =item $group = $settings->create_group($group_name) =item $group = $settings->create_group($group_name, %group_construction_args) =item $group = $settings->create_group($group_name, \%group_construction_args) Create or replace the specified group. =item $group = $settings->delete_group($group_name) Delete the specified group. Also returns a reference to the now deleted group. =back =head1 SOURCE The source code repository for Getopt-Yath can be found at L<http://github.com/Test-More/Getopt-Yath/>. =head1 MAINTAINERS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 AUTHORS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 COPYRIGHT Copyright Chad Granum E<lt>exodist7@gmail.comE<gt>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L<http://dev.perl.org/licenses/> =cut �������������Instance.pm�����������������������������������������������������������������������������������������100644��001750��001750�� 46652�15165554207� 21572� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt/Yath�����������������������������������������������������������������������������������������������������������������������������������package Getopt::Yath::Instance; use strict; use warnings; our $VERSION = '2.000011'; use Carp qw/croak/; use Getopt::Yath::Util qw/mod2file/; use Getopt::Yath::Option; use Getopt::Yath::Settings; use Getopt::Yath::State; use Getopt::Yath::Term qw/USE_COLOR color/; use Getopt::Yath::HashBase qw{ <options <included <posts <stops <class +dedup +options_groups_cache +options_map_cache +cache_key category_sort_map }; sub init { my $self = shift; $self->{+OPTIONS} //= []; # List of option instances $self->{+POSTS} //= {}; # weight => {...} $self->{+INCLUDED} //= {}; # type => [$inst], $self->{+CATEGORY_SORT_MAP} //= {'NO CATEGORY - FIX ME' => 99999}; $self->{+DEDUP} = {}; } sub add_option { my $self = shift; my $option = Getopt::Yath::Option->create(trace => [caller()], @_); return $self->_option($option); } sub add_post_process { my $self = shift; return $self->_post([caller()], @_); } sub _post { my $self = shift; my ($caller, $weight, $applicable, $cb) = @_; $weight //= 0; return if $self->{+DEDUP}->{$cb}++; push @{$self->{+POSTS}->{$weight}} => {caller => $caller, weight => $weight, applicable => $applicable, callback => $cb}; } sub include { my $self = shift; my ($other, $list) = @_; return unless $other; return if $self->{+DEDUP}->{$other}++; push @{$self->included->{ref($other)} //= []} => $other; if (my $other_include = $other->included) { for my $key (keys %{$other_include}) { push @{$self->included->{$key}} => @{$other_include->{$key} // []}; } } if ($list) { my %want = map {$_ => 1} @$list; $self->_option($_) for grep { $want{$_->title} || $want{$_->field} || $want{$_->name} } @{$other->options}; } else { $self->_option($_) for @{$other->options}; } for my $set (values %{$other->posts}) { for my $post (@$set) { $self->_post(@{$post}{qw/caller weight applicable callback/}); } } $self->clear_cache; } sub _option { my $self = shift; my ($option) = @_; my $options = $self->{+OPTIONS} //= []; # List of option instances return if $self->{+DEDUP}->{$option}++; push @{$options} => $option; } sub clear_cache { my $self = shift; delete $self->{+OPTIONS_GROUPS_CACHE}; delete $self->{+OPTIONS_MAP_CACHE}; delete $self->{+CACHE_KEY}; } sub check_cache { my $self = shift; my $options = $self->options; my $new_key = @$options; my $old_key = $self->{+CACHE_KEY} //= 0; return 1 if $old_key == $new_key; $self->clear_cache(); $self->{+CACHE_KEY} = $new_key; return 0; } sub have_group { my $self = shift; my ($name) = @_; return 1 if $self->option_groups->{$name}; return 0; } sub option_groups { my $self = shift; my ($in_options) = @_; my $options; if ($in_options) { $options = $in_options; } else { $options = $self->options; return $self->{+OPTIONS_GROUPS_CACHE} if $self->{+OPTIONS_GROUPS_CACHE} && $self->check_cache(); } my $groups = { map {($_->group() => 1)} @$options }; return $groups if $in_options; return $self->{+OPTIONS_GROUPS_CACHE} = $groups; } sub option_map { my $self = shift; my ($in_options) = @_; my $options; if ($in_options) { $options = $in_options; } else { $options = $self->options; return $self->{+OPTIONS_MAP_CACHE} if $self->{+OPTIONS_MAP_CACHE} && $self->check_cache(); } my $map = { custom_match => [], # --whatever => $option }; for my $option (@$options) { push @{$map->{custom_match}} => $option->custom_matches if $option->can('custom_matches'); for my $form (keys %{$option->forms}) { if (my $existing = $map->{$form}) { croak "Option form '$form' defined twice, first in '" . $existing->trace_string . "' and again in '" . $option->trace_string . "'" if $existing ne $option; next; } $map->{$form} = $option; } } return $map if $in_options; return $self->{+OPTIONS_MAP_CACHE} = $map; } sub process_args { my $self = shift; my ($args, %params) = @_; croak "Must provide an argv arrayref" unless $args && ref($args) eq 'ARRAY'; my $argv = [@$args]; # Make a copy my $settings = $params{settings} // Getopt::Yath::Settings->new({}); my $stops = $params{stops} // []; my $groups = $params{groups} // {}; $stops = { map { ($_ => 1) } @$stops } if $stops && ref($stops) eq 'ARRAY'; my $options = [ grep { $_->is_applicable($self, $settings) } @{$self->options // []} ]; my @skip; my $state = Getopt::Yath::State->new({ settings => $settings, skipped => \@skip, remains => $argv, env => $params{env} // {}, cleared => $params{cleared} // {}, modules => $params{modules} // {}, stop => undef, }); for my $opt (@$options) { my $group = $settings->group($opt->group, 1); my $ref = $group->option_ref($opt->field, 1); unless(defined ${$ref}) { my $val = $opt->get_initial_value($settings); my $rt = ref($val); if (!defined($val)) { $val = []; } elsif ($rt) { $val = [ $rt eq 'ARRAY' ? @$val : %$val ]; } else { $val = [$val]; } $opt->trigger(action => 'initialize', ref => $ref, val => $val, state => $state, options => $self, settings => $settings, group => $group); $opt->add_value($ref, @$val); } $opt->init_settings($state, $settings, $group, $ref); } my $invalid = $params{invalid_opt_callback} // sub { die "'$_[0]' is not a valid option.\n" }; my $parse_group; $parse_group = sub { my $end = shift; my $group = []; while (@$argv) { my $arg = shift(@$argv); return $group if $arg eq $end; if (my $nest = $groups->{$arg}) { $arg = $parse_group->($nest); } push @$group => $arg; } die "Could not find end token '$end' before end of arguments.\n"; }; while (@$argv) { my $map = $self->option_map($options); my $base = shift @$argv; if (my $end = $groups->{$base}) { push @skip => $parse_group->($end); next; } if ($stops->{$base}) { $state->set_stop($base); last; } if ($base !~ m/^-/) { if ($params{stop_at_non_opts}) { $state->set_stop($base); last; } if ($params{skip_non_opts}) { push @skip => $base; next; } $invalid->($base); } my ($first, $set, $arg, $opt, $delta); if ($base =~ m/^(-[^-])(=?)(.*)$/) { my ($other, $eq); ($first, $set, $other) = ($1, $2, $3); if ($opt = $map->{$first}) { if ($opt->allows_shortval && ($set || $other)) { $set = 1; $arg = $other; } elsif ($set) { $arg = $other; } else { unshift @$argv => "-$other" if $other; } } } else { ($first, $set, $arg) = split(/(=)/, $base, 2); $opt = $map->{$first}; } unless ($opt) { if (my $list = $map->{custom_match}) { for my $match (@$list) { ($opt, $delta, $arg) = $match->($base, $state); next unless $opt; $set = 1; last; } } } die "Use of 'arg=val' form without a value is not valid in option '$base'.\n" if $set && !defined($arg); unless ($opt) { if ($params{skip_invalid_opts}) { push @skip => $base; next; } if ($params{stop_at_invalid_opts}) { $state->set_stop($base); last; } $invalid->($base); } die "Use of 'arg=val' form is not allowed in option '$base'. Arguments are not allowed for this option type.\n" if $set && !$opt->allows_arg; $delta //= $opt->forms->{$first}; $state->modules->{$opt->module}++ unless $opt->no_module; my $group_name = $opt->group; my $field_name = $opt->field; my $group = $settings->group($group_name, 1); my $ref = $group->option_ref($field_name, 1); if ($delta < 0) { $opt->clear_field($ref); $opt->trigger(action => 'clear', ref => $ref, val => undef, state => $state, options => $self, settings => $settings, group => $group); $state->cleared->{$group_name}->{$field_name} = 1; next unless $set; } delete $state->cleared->{$group_name}->{$field_name} if $state->cleared->{$group_name}; if ($opt->requires_arg && !$set) { die "No argument provided to '$first'.\n" unless @$argv; $arg = shift(@$argv); } if ($arg) { if (my $end = $groups->{$arg}) { $arg = $parse_group->($end); } } if (ref($arg) && @$arg > 1 && !$opt->allows_list) { die "Option '$first' cannot take multiple values, got: [" . join(', ' => @$arg) . "].\n"; } my $from = ''; my @val; if (defined $arg) { $from = 'arg'; @val = $opt->normalize_value(ref($arg) ? @$arg : $arg); } elsif ($opt->allows_autofill) { $from = 'autofill'; @val = $opt->get_autofill_value($settings); } else { $from = 'no_arg'; @val = $opt->no_arg_value($settings); } if ($opt->mod_adds_options) { my ($class) = @val; require(mod2file($class)); if ($class->can('options')) { if (my $add = $class->options) { $self->include($add); } } } $opt->trigger(action => 'set', ref => $ref, val => \@val, state => $state, options => $self, settings => $settings, group => $group, set_from => $from); my @bad = $opt->check_value(\@val); if (@bad) { die "Invalid value(s) for option '$first': " . join(', ' => map {defined($_) ? "'$_'" : 'undef' } @bad) . "\n"; } $opt->add_value($ref, @val); } for my $opt (@$options) { my $group_name = $opt->group; my $field_name = $opt->field; my $group = $settings->group($group_name, 1); my $ref = $group->option_ref($field_name, 1); # Do not set the default if the --no-OPT form was used. next if $state->cleared && $state->cleared->{$group_name} && $state->cleared->{$group_name}->{$field_name}; next if $opt->is_populated($ref); $opt->add_value($ref, $opt->get_default_value($settings)); } unless ($params{skip_posts}) { for my $weight (sort { $a <=> $b } keys %{$self->{+POSTS}}) { for my $set (@{$self->{+POSTS}->{$weight}}) { next if $set->{applicable} && !$set->{applicable}->($set, $self, $settings); $set->{callback}->($self, $state); } } } for my $opt (@$options) { my $group = $settings->group($opt->group, 1); my $ref = $group->option_ref($opt->field, 1); for my $env (@{$opt->clear_env_vars // []}) { $state->env->{$env} = undef; delete $ENV{$env} unless $params{no_set_env}; } $opt->finalize_settings($state, $settings, $group, $ref); next unless $opt->can_set_env; my $to_set = $opt->set_env_vars or next; next unless @$to_set; next unless $opt->is_populated($ref); for my $name (@$to_set) { my $env = "$name"; $env =~ s/^(!)//; my $neg = $1; my @val = $opt->get_env_value($env => $ref) or next; if (@val > 1) { my $title = $opt->title; my $trace = $opt->trace // ['', 'unknown', 'n/a']; die "Option '$title' defined in $trace->[1] line $trace->[2] returned more than one value when get_env_value($env) was called.\n"; } my $setval = $val[0]; $setval = $setval ? 0 : 1 if $neg; $state->env->{$env} = $setval; $ENV{$env} = $setval unless $params{no_set_env}; } } return $state; } my %DOC_FORMATS = ( 'cli' => [ 'cli_docs', # Method to call on opt "\n", # how to join lines sub { $_[4] ? "\n" . color('bold underline white') . $_[1] . color('reset') . " ($_[3])" : "\n$_[1] ($_[3])" }, # how to render the category sub { $_[0] =~ s/^/ /mg; "$_[0]\n" }, # transform the value from the opt sub { }, # add this at the end ], 'pod' => [ 'pod_docs', # Method to call on opt "\n\n", # how to join lines sub { ($_[0] ? ("=back") : (), "=head$_[2] $_[1]", "=over 4") }, # how to render the category sub { $_[0] }, # transform the value from the opt sub { $_[0] ? ("=back\n") : () }, # add this at the end ], ); sub docs { my $self = shift; my ($format, %params) = @_; $params{color} //= USE_COLOR() && -t STDOUT; my $settings = $params{settings}; my $opts = [ grep { $params{applicable} || $_->is_applicable($self, $settings) } @{$self->options // []} ]; $format //= "UNDEFINED"; my $fset = $DOC_FORMATS{$format} or croak "Invalid documentation format '$format'"; my ($fmeth, $join, $fcat, $ftrans, $fend) = @$fset; return unless $opts; return unless @$opts; my @render = @$opts; @render = grep { $_->group eq $params{group} } @render if $params{group}; return "\n\n!! Invalid option group: $params{group} !!" unless @render; @render = sort { $self->doc_sort_ops($a, $b) } @render; my @out; my $cat; for my $opt (@render) { if (!$cat || $opt->category ne $cat) { push @out => $fcat->($cat, $opt->category, $params{head}, $opt->group, $params{color}); $cat = $opt->category; } my $help = $opt->$fmeth(%params); push @out => $ftrans->($help); } push @out => $fend->($cat); s/[ \t]+$//gm for @out; return join $join => @out; } sub doc_sort_ops { my $self = shift; my ($a, $b, %params) = @_; my $map = $self->{+CATEGORY_SORT_MAP}; my $aw = $map->{$a->category} || 0; my $bw = $map->{$b->category} || 0; my $ret = $aw <=> $bw; if ($params{group_first}) { $ret ||= $a->group cmp $b->group; $ret ||= $a->category cmp $b->category; } else { $ret ||= $a->category cmp $b->category; $ret ||= $a->group cmp $b->group; } $ret ||= ($a->prefix || '') cmp ($b->prefix || ''); $ret ||= $a->name cmp $b->name; return $ret; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Getopt::Yath::Instance - An instance of options. =head1 DESCRIPTION This does the real work for L<Getopt::Yath> under the hood. It is probably better not to use this directly. =head1 SYNOPSIS Do not use this directly. The user interface you should be looking at is L<Getopt::Yath>. =head1 METHODS =over 4 =item $state = $instance->process_args(\@argv, %params) Parse the given argument list according to the defined options. Returns a L<Getopt::Yath::State> object containing C<settings>, C<skipped>, C<remains>, C<stop>, C<cleared>, C<modules>, and C<env> accessors. See L<Getopt::Yath> for the full list of parameters and L<Getopt::Yath::State> for the returned object. =item $option = $instance->add_option(%option_spec) Add a new option to this instance. The C<%option_spec> is passed directly to L<Getopt::Yath::Option/create>. =item $instance->add_post_process($weight, $applicable, $callback) Register a post-processing callback. C<$weight> controls ordering (lower runs first), C<$applicable> is an optional coderef filter, and C<$callback> is the coderef to run after parsing. =item $instance->include($other_instance) =item $instance->include($other_instance, \@list) Merge options and post-processors from another instance into this one. If C<\@list> is provided, only options whose title, field, or name appears in the list are included. =item $text = $instance->docs($format, %params) Generate documentation for all applicable options. C<$format> must be C<'cli'> or C<'pod'>. Params may include: =over 4 =item head => $level Heading level for POD output (e.g., 2 for C<=head2>). =item group => $group_name Only show options from the specified group. =item settings => $settings An L<Getopt::Yath::Settings> object used to evaluate option applicability. =item applicable => $bool If true, include all options regardless of their applicability filter. =item color => $bool Enable or disable ANSI color in CLI output. Defaults to true if color is available and STDOUT is a terminal. =back =item $map = $instance->option_map() =item $map = $instance->option_map(\@options) Returns a hashref mapping all option forms (e.g., C<--verbose>, C<-v>, C<--no-verbose>) to their L<Getopt::Yath::Option> objects. Also includes a C<custom_match> key with an arrayref of custom match coderefs. Results are cached unless an explicit option list is provided. =item $groups = $instance->option_groups() Returns a hashref of group names defined by the current options. Results are cached. =item $bool = $instance->have_group($name) Returns true if any option defines the given group name. =item $instance->set_category_sort_map(%map) Set the sort ordering for documentation categories. See L<Getopt::Yath/category_sort_map>. =item $options = $instance->options() Returns the arrayref of L<Getopt::Yath::Option> objects registered in this instance. =back =head1 SOURCE The source code repository for Getopt-Yath can be found at L<http://github.com/Test-More/Getopt-Yath/>. =head1 MAINTAINERS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 AUTHORS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 COPYRIGHT Copyright Chad Granum E<lt>exodist7@gmail.comE<gt>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L<http://dev.perl.org/licenses/> =cut ��������������������������������������������������������������������������������������Tutorial.pm�����������������������������������������������������������������������������������������100644��001750��001750�� 74601�15165554207� 21624� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt/Yath�����������������������������������������������������������������������������������������������������������������������������������package Getopt::Yath::Tutorial; use strict; use warnings; our $VERSION = '2.000011'; 1; __END__ =pod =encoding UTF-8 =head1 NAME Getopt::Yath::Tutorial - A step-by-step guide to using Getopt::Yath =head1 DESCRIPTION This tutorial walks you through using L<Getopt::Yath> to handle command-line options in your Perl scripts and modules. It starts with simple examples and builds up to advanced features. =head1 YOUR FIRST SCRIPT Here is the simplest useful script with Getopt::Yath: #!/usr/bin/perl use strict; use warnings; use Getopt::Yath; option_group {group => 'my', category => 'My Options'} => sub { option name => ( type => 'Scalar', description => 'Your name', ); }; my $state = parse_options(\@ARGV); my $settings = $state->settings; print "Hello, " . ($settings->my->name // 'World') . "!\n"; Run it: $ perl hello.pl --name Bob Hello, Bob! $ perl hello.pl Hello, World! =head2 What just happened? C<use Getopt::Yath> exports several functions into your package: =over 4 =item L<option|Getopt::Yath/option TITLE> Define a single command-line option with a name and specification. =item L<option_group|Getopt::Yath/option_group> Set shared attributes (group, category, prefix, etc.) for a block of options. =item L<parse_options|Getopt::Yath/parse_options> Process an arrayref of command-line arguments and return a state hashref with settings, remaining args, skipped items, and more. =item L<include_options|Getopt::Yath/include_options> Import option definitions from another module that also uses Getopt::Yath. =item L<option_post_process|Getopt::Yath/option_post_process> Register a callback to run after all options have been parsed, for cross-option validation or fixups. =item L<options|Getopt::Yath/options> Return the L<Getopt::Yath::Instance> object that holds all defined options. Used for generating help and documentation output. =item L<category_sort_map|Getopt::Yath/category_sort_map> Control the display order of option categories in help output. =back Every option needs a B<group> (the key under which it appears in settings) and a B<type> (how it parses arguments). The B<category> is a human-readable label used for help output. =head1 OPTION GROUPS C<option_group> lets you set shared attributes for a block of options so you don't have to repeat yourself: option_group {group => 'server', category => 'Server Options'} => sub { option host => ( type => 'Scalar', default => 'localhost', description => 'Hostname to bind to', ); option port => ( type => 'Scalar', short => 'p', default => 8080, description => 'Port to listen on', ); option verbose => ( type => 'Bool', short => 'v', description => 'Enable verbose output', ); }; my $state = parse_options(\@ARGV); my $settings = $state->settings; printf "Starting server on %s:%s\n", $settings->server->host, $settings->server->port; Every option declared inside this block inherits C<< group => 'server' >> and C<< category => 'Server Options' >>. The parsed values are accessed via C<< $settings->server->host >>, C<< $settings->server->port >>, etc. =head1 OPTION TYPES Getopt::Yath provides a rich set of option types. Here they are from simplest to most specialized. =head2 Bool A simple on/off flag. No argument needed. option verbose => ( type => 'Bool', short => 'v', default => 0, description => 'Enable verbose output', ); Usage: --verbose # turns it on (1) -v # same thing --no-verbose # turns it off (0) =head2 Scalar Takes exactly one value. option output => ( type => 'Scalar', short => 'o', description => 'Output file path', ); Usage: --output results.txt --output=results.txt -o results.txt -o=results.txt -oresults.txt # short form allows value directly after flag --no-output # clears the value (sets to undef) =head2 Count An incrementing counter. Each use bumps the value by one. option verbosity => ( type => 'Count', short => 'v', initialize => 0, description => 'Increase verbosity level', ); Usage: -v # 1 -vvv # 3 (short flags can be stacked) --verbosity # 1 -v -v -v # 3 -v=5 # explicitly set to 5 --no-verbosity # reset to 0 =head2 List Collects multiple values into an arrayref. Can be specified multiple times. option include => ( type => 'List', short => 'I', description => 'Add a directory to the include path', ); Usage: -I lib -I blib/lib --include lib --include blib/lib --no-include # empties the list Lists also accept JSON arrays: --include '["lib","blib/lib"]' =head3 Splitting values Use C<split_on> to allow comma-separated (or other delimiter) values: option tags => ( type => 'List', split_on => ',', description => 'Comma-separated list of tags', ); # --tags foo,bar,baz => ['foo', 'bar', 'baz'] =head2 Map Collects key=value pairs into a hashref. Can be specified multiple times. option env_var => ( type => 'Map', short => 'E', alt => ['env-var'], description => 'Set an environment variable', ); Usage: -E HOME=/tmp -E USER=test --env-var HOME=/tmp --env-var '{"HOME":"/tmp","USER":"test"}' # JSON also works --no-env-var # empties the hash Like List, Map supports C<split_on> for multiple pairs in one argument, and C<key_on> to change the key/value delimiter (default is C<=>). =head2 Auto A scalar option with an autofill value. C<--opt> uses the autofill value, C<--opt=val> uses the provided value. B<Does not> support C<--opt val> (the space-separated form), because without a required argument the next token is ambiguous. option coverage => ( type => 'Auto', autofill => '-silent,1', description => 'Enable coverage; optionally provide Devel::Cover args', long_examples => ['', '=-silent,1'], ); Usage: --coverage # uses autofill: "-silent,1" --coverage=-db,cov # uses the provided value --no-coverage # clears =head2 AutoList Combines Auto and List. C<--opt> adds the autofill values to the list. C<--opt=val> adds a specific value. option plugins => ( type => 'AutoList', autofill => sub { qw/Foo Bar/ }, description => 'Plugins to load (defaults to Foo and Bar)', ); Usage: --plugins # adds 'Foo' and 'Bar' --plugins=Baz # adds 'Baz' --no-plugins # empties the list =head2 AutoMap Combines Auto and Map. C<--opt> adds the autofill key/value pairs. C<--opt=key=val> adds a specific pair. option defaults => ( type => 'AutoMap', autofill => sub { timeout => 30, retries => 3 }, description => 'Default settings', ); Usage: --defaults # adds {timeout => 30, retries => 3} --defaults=color=red # adds {color => 'red'} --no-defaults # empties the hash =head2 PathList Like List, but values containing wildcards are expanded using glob(). option test_files => ( type => 'PathList', split_on => ',', description => 'Test files to run (globs allowed)', ); Usage: --test-files 't/*.t' --test-files t/foo.t,t/bar.t --test-files 'lib/**/*.pm' =head2 AutoPathList Combines AutoList and PathList. C<--opt> adds autofill paths, C<--opt=glob> expands the glob. option dev_libs => ( type => 'AutoPathList', short => 'D', name => 'dev-lib', autofill => sub { 'lib', 'blib/lib', 'blib/arch' }, description => 'Add dev library paths (default: lib, blib/lib, blib/arch)', ); Usage: -D # adds lib, blib/lib, blib/arch -D=lib # adds just lib -D='lib/*' # adds all matches =head2 BoolMap Matches a pattern of options dynamically, building a hash of boolean values. Requires a C<pattern> attribute with a capture group. option features => ( type => 'BoolMap', pattern => qr/feature-(.+)/, description => 'Toggle features on or off', ); Usage: --feature-color # {color => 1} --feature-unicode # {unicode => 1} --no-feature-color # {color => 0} The pattern is embedded into C<< qr/^--(no-)?$pattern$/ >> automatically. Each captured key gets a true or false value depending on the C<--no-> prefix. =head1 COMMON OPTION ATTRIBUTES These attributes work across all option types. =head2 short A single-character alias for the option: option jobs => ( type => 'Scalar', short => 'j', ... ); # -j4 --jobs 4 --jobs=4 -j 4 =head2 alt and alt_no Alternate long names for the option: option use_stream => ( type => 'Bool', alt => ['stream'], # --stream also works alt_no => ['TAP'], # --TAP is equivalent to --no-use-stream description => 'Use streaming format instead of TAP', ); =head2 prefix Adds a prefix to the option name. Especially useful in option groups: option_group {group => 'db', category => 'Database', prefix => 'db'} => sub { option host => ( type => 'Scalar', description => 'Database host', ); option port => ( type => 'Scalar', default => 5432, description => 'Database port', ); }; # --db-host myhost --db-port 3306 The values are still accessed as C<< $settings->db->host >> and C<< $settings->db->port >> -- the prefix only affects the command-line form. =head2 field and name By default, the option title determines both the field name (underscores) and the CLI name (dashes). You can override either: option test_args => ( type => 'List', field => 'args', # $settings->tests->args (not test_args) alt => ['test-arg'], ... ); =head2 default A value used when the option is not provided on the command line and not set via an environment variable: option timeout => ( type => 'Scalar', default => 60, description => 'Timeout in seconds', ); # Can also be a coderef: option search => ( type => 'PathList', default => sub { './t', './t2' }, ... ); =head2 initialize Set an initial value before parsing begins. This differs from C<default> in that C<default> is applied after parsing if the option was never set, while C<initialize> sets a starting value that can then be modified by command-line arguments. option verbosity => ( type => 'Count', initialize => 0, ... ); =head1 ENVIRONMENT VARIABLES =head2 from_env_vars Read an option's initial value from environment variables. The first one that is defined wins: option verbose => ( type => 'Bool', from_env_vars => ['MYAPP_VERBOSE', 'VERBOSE'], description => 'Enable verbose output', ); Prefix a variable with C<!> to negate its value: option quiet => ( type => 'Bool', from_env_vars => ['!VERBOSE'], # quiet = true when VERBOSE is false description => 'Suppress output', ); =head2 set_env_vars Set environment variables after parsing is complete (Bool, Scalar, Count, and Auto types only): option cover => ( type => 'Auto', autofill => '-silent,1', from_env_vars => ['T2_DEVEL_COVER'], set_env_vars => ['T2_DEVEL_COVER'], description => 'Enable Devel::Cover', ); The C<!> prefix also works here for inverted env vars. =head2 clear_env_vars Clear specified environment variables after parsing: option token => ( type => 'Scalar', from_env_vars => ['AUTH_TOKEN'], clear_env_vars => ['AUTH_TOKEN'], # don't leak to child processes description => 'Auth token (cleared from env after reading)', ); =head1 NORMALIZE AND TRIGGER =head2 normalize Transform a value as it is parsed: option module => ( type => 'Scalar', normalize => sub { my ($val) = @_; $val =~ s/-/::/g; # Allow Foo-Bar instead of Foo::Bar return $val; }, description => 'Module name', ); # --module Foo-Bar => "Foo::Bar" For List and Map types, normalize is called on each value individually. =head2 trigger A callback invoked whenever the option is set or cleared from the command line. Triggers do B<not> fire for defaults, autofill, or initialization. option input_file => ( type => 'Scalar', trigger => sub { my $opt = shift; my %params = @_; return unless $params{action} eq 'set'; my ($file) = @{$params{val}}; die "File not found: $file\n" unless -f $file; }, description => 'Input file', ); The C<%params> hash contains: action => 'set' or 'clear' val => \@values (arrayref, even for scalars) ref => \$field_ref state => $parse_state options => $instance settings => $settings group => $group =head1 ALLOWED VALUES Restrict what values an option will accept: option format => ( type => 'Scalar', allowed_values => [qw/json csv xml/], description => 'Output format', ); # --format json # ok # --format yaml # dies: Invalid value C<allowed_values> can be an arrayref, a regex, or a coderef: allowed_values => qr/^\d+$/, # must be numeric allowed_values => sub { $_[1] > 0 }, # must be positive Use C<allowed_values_text> to customize the help message: allowed_values_text => 'json, csv, or xml', =head1 PARSING OPTIONS The C<parse_options> function is how you process command-line arguments. It returns a state hashref with all the parsed data. =head2 Basic parsing my $state = parse_options(\@ARGV); my $settings = $state->settings; # Getopt::Yath::Settings object my $remains = $state->remains; # args after a stop token my $skipped = $state->skipped; # skipped non-options my $stop = $state->stop; # what token stopped parsing my $env = $state->env; # env vars that were/would be set my $cleared = $state->cleared; # options cleared via --no-opt my $modules = $state->modules; # modules whose options were used =head2 Stops Use C<stops> to stop parsing at certain tokens. This is most commonly used for C<-->: my $state = parse_options(\@ARGV, stops => ['--'], ); # perl script.pl --verbose -- --not-an-option foo bar # $state->stop = '--' # $state->remains = ['--not-an-option', 'foo', 'bar'] You can define multiple stop tokens. C<::> is commonly used as a separator for passing arguments through to tests: my $state = parse_options(\@ARGV, stops => ['--', '::'], ); # perl script.pl --verbose :: --some-test-arg # $state->stop = '::' # $state->remains = ['--some-test-arg'] =head2 Handling non-options By default, encountering a non-option (something not starting with C<->) throws an error. You can change this: # Skip non-options (collect them) my $state = parse_options(\@ARGV, skip_non_opts => 1, ); my @files = @{$state->skipped}; # Stop at first non-option my $state = parse_options(\@ARGV, stop_at_non_opts => 1, ); # $state->stop = the non-option that caused the stop # $state->remains = everything after it =head2 Handling invalid options Similarly, you can control what happens with unrecognized options: # Skip invalid options my $state = parse_options(\@ARGV, skip_invalid_opts => 1, ); # Stop at invalid options my $state = parse_options(\@ARGV, stop_at_invalid_opts => 1, ); =head2 Suppressing env var side effects Prevent parse_options from modifying C<%ENV>: my $state = parse_options(\@ARGV, no_set_env => 1, ); # $state->env still shows what would have been set =head2 Argument groups Argument groups let you collect arguments between delimiter tokens into an arrayref. This is useful for passing structured groups of values: my $state = parse_options(\@ARGV, groups => { ':{' => '}:' }, ); # perl script.pl --opt :{ arg1 arg2 arg3 }: # The :{ ... }: group is collected as ['arg1', 'arg2', 'arg3'] Groups can be used as option values or as standalone arguments (which end up in C<skipped> when C<skip_non_opts> is enabled). =head1 GENERATING HELP OUTPUT =head2 CLI help sub show_help { print options()->docs('cli'); } This produces formatted terminal output with ANSI colors (when available), organized by category. =head2 POD documentation sub show_pod { print options()->docs('pod', head => 2); } This produces POD markup suitable for embedding in your module's documentation. The C<head> parameter controls the heading level (e.g., C<=head2>). =head2 Controlling category order By default, categories are sorted alphabetically. Use C<category_sort_map> to control the order: category_sort_map( 'General Options' => 1, 'Server Options' => 2, 'Debug Options' => 3, ); Lower values appear first. =head1 REUSABLE OPTION LIBRARIES You can define options in a module and include them elsewhere. This lets you build composable option sets. =head2 Defining an option library package My::Options::Database; use strict; use warnings; use Getopt::Yath; option_group {group => 'db', category => 'Database Options'} => sub { option host => ( type => 'Scalar', default => 'localhost', description => 'Database hostname', ); option port => ( type => 'Scalar', default => 5432, description => 'Database port', ); option name => ( type => 'Scalar', description => 'Database name', ); }; 1; =head2 Including options from another module package My::App; use strict; use warnings; use Getopt::Yath; include_options('My::Options::Database'); option_group {group => 'app', category => 'App Options'} => sub { option debug => ( type => 'Bool', description => 'Debug mode', ); }; my $state = parse_options(\@ARGV); # $state->settings->db->host, ->db->port, etc. # $state->settings->app->debug =head2 Selective inclusion You can include only specific options from a library: include_options( 'My::Options::Database' => [qw/host port/], ); Only the C<host> and C<port> options will be included; C<name> will be excluded. =head1 POST-PROCESSING C<option_post_process> registers a callback that runs after all options have been parsed but before environment variables are set. This is useful for validation that depends on multiple options: option_post_process sub { my ($instance, $state) = @_; my $settings = $state->settings; my $server = $settings->server; if ($server->ssl && !$server->cert_file) { die "--ssl requires --cert-file\n"; } }; =head2 Weighted post-processors The first argument is a weight that controls execution order (lower runs first, default is 0): option_post_process 10 => sub { my ($instance, $state) = @_; # Runs after weight-0 post-processors }; =head2 Conditional post-processors An optional C<applicable> coderef controls whether the post-processor runs: option_post_process 0 => sub { ... if server group exists ... } => sub { my ($instance, $state) = @_; ... }; If used inside an C<option_group> block, the group's C<applicable> is inherited automatically. =head1 DYNAMIC OPTIONS WITH mod_adds_options Some options specify a module name whose options should be dynamically loaded when the option is used: option runner_class => ( type => 'Scalar', name => 'runner', field => 'class', default => 'My::Runner', mod_adds_options => 1, normalize => sub { fqmod($_[0], 'My::Runner') }, description => 'Runner class to use', ); When C<--runner=My::Custom::Runner> is specified, the module is loaded, and if it has an C<options()> method, those options are included into the current instance. This allows plugins and extensions to contribute their own command-line options. =head1 APPLICABILITY Options can be conditionally shown/hidden based on runtime state: option reloader => ( type => 'Auto', autofill => 'My::Reloader', applicable => sub { my ($opt, $options, $settings) = @_; return $settings->runner->preloads && @{$settings->runner->preloads}; }, description => 'Module reloader (only available with preloads)', ); When C<applicable> returns false, the option is excluded from parsing and documentation. =head1 THE SETTINGS OBJECT The C<< $state->settings >> value is a L<Getopt::Yath::Settings> object. Groups are accessed as methods: $settings->server->host; $settings->db->port; Useful methods: # Check if a group exists if ($settings->check_group('server')) { ... } # Safe access with a default my $val = $settings->maybe('server', 'host', 'localhost'); =head1 COMPLETE EXAMPLE Here is a complete script demonstrating many features together: #!/usr/bin/perl use strict; use warnings; use Getopt::Yath; option_group {group => 'app', category => 'Application Options'} => sub { option verbose => ( type => 'Count', short => 'v', initialize => 0, from_env_vars => ['MYAPP_VERBOSE'], set_env_vars => ['MYAPP_VERBOSE'], description => 'Increase verbosity (-v, -vv, -vvv)', ); option config => ( type => 'Scalar', short => 'c', description => 'Path to config file', trigger => sub { my $opt = shift; my %params = @_; return unless $params{action} eq 'set'; my ($file) = @{$params{val}}; die "Config file not found: $file\n" unless -f $file; }, ); option output_format => ( type => 'Scalar', short => 'f', default => 'json', allowed_values => [qw/json csv xml/], description => 'Output format', ); option tags => ( type => 'List', short => 't', split_on => ',', description => 'Tags to apply (comma-separated)', ); option env_vars => ( type => 'Map', short => 'E', description => 'Extra environment variables (KEY=VAL)', ); option dry_run => ( type => 'Bool', short => 'n', default => 0, description => 'Dry run, do not make changes', ); }; option_group {group => 'files', category => 'File Options'} => sub { option include => ( type => 'PathList', short => 'I', description => 'Files to include (globs allowed)', ); }; category_sort_map( 'Application Options' => 1, 'File Options' => 2, ); option_post_process sub { my ($instance, $state) = @_; my $settings = $state->settings; if ($settings->app->dry_run && $settings->app->verbose < 1) { warn "Note: --dry-run without --verbose; enabling verbose=1\n"; $settings->app->option(verbose => 1); } }; # Show help if requested if (grep { $_ eq '--help' || $_ eq '-h' } @ARGV) { print options()->docs('cli'); exit 0; } my $state = parse_options(\@ARGV, stops => ['--', '::'], skip_non_opts => 1, ); my $settings = $state->settings; printf "Verbosity: %d\n", $settings->app->verbose; printf "Format: %s\n", $settings->app->output_format; printf "Dry run: %s\n", $settings->app->dry_run ? 'yes' : 'no'; if (my $tags = $settings->app->tags) { printf "Tags: %s\n", join(', ', @$tags) if @$tags; } if (my @files = @{$state->skipped}) { printf "Files: %s\n", join(', ', @files); } if ($state->stop) { printf "Stopped at: %s\n", $state->stop; printf "Remaining: %s\n", join(' ', @{$state->remains}); } =head1 ADVANCED: MULTI-STAGE PARSING WITH SUBCOMMANDS Many tools follow a C<script [GLOBAL OPTIONS] subcommand [COMMAND OPTIONS]> pattern, where the script has its own set of options, a subcommand name, and then the subcommand has its own options. Getopt::Yath supports this through multi-stage parsing: parse the global options first (stopping at the subcommand), then load the subcommand and parse its options from the remaining arguments. =head2 Step 1: Define global options Create a package for your script-level options. package My::CLI; use strict; use warnings; use Getopt::Yath; option_group {group => 'global', category => 'Global Options'} => sub { option verbose => ( type => 'Count', short => 'v', initialize => 0, description => 'Increase verbosity', ); option config => ( type => 'Scalar', short => 'c', description => 'Path to config file', ); }; =head2 Step 2: Define subcommand option packages Each subcommand is a separate package with its own options: package My::CLI::Command::deploy; use strict; use warnings; use Getopt::Yath; option_group {group => 'deploy', category => 'Deploy Options'} => sub { option target => ( type => 'Scalar', short => 't', description => 'Deployment target (staging, production)', ); option dry_run => ( type => 'Bool', short => 'n', default => 0, description => 'Perform a dry run', ); }; sub run { my ($class, $settings) = @_; printf "Deploying to %s (dry_run=%s, verbose=%d)\n", $settings->deploy->target // 'default', $settings->deploy->dry_run ? 'yes' : 'no', $settings->global->verbose; } package My::CLI::Command::test; use strict; use warnings; use Getopt::Yath; option_group {group => 'test', category => 'Test Options'} => sub { option jobs => ( type => 'Scalar', short => 'j', default => 1, description => 'Number of parallel test jobs', ); option tags => ( type => 'List', split_on => ',', description => 'Filter tests by tag', ); }; sub run { my ($class, $settings) = @_; printf "Running tests with %d jobs (verbose=%d)\n", $settings->test->jobs, $settings->global->verbose; } =head2 Step 3: Two-stage dispatch Parse global options first, stopping at the subcommand name. Then load the subcommand module, include its options, and parse the remaining arguments using the combined option set. Pass the settings object through so both stages share state. package main; my %commands = ( deploy => 'My::CLI::Command::deploy', test => 'My::CLI::Command::test', ); # Stage 1: Parse global options, stop at the subcommand name my $stage1 = My::CLI::parse_options( \@ARGV, stop_at_non_opts => 1, ); my $command_name = $stage1->stop or die "Usage: my-cli [global options] <command> [command options]\n"; my $command_class = $commands{$command_name} or die "Unknown command: $command_name\n"; # Stage 2: Include command options, parse remaining args # Carry forward settings so global values are preserved My::CLI::include_options($command_class); my $stage2 = My::CLI::parse_options( $stage1->remains, settings => $stage1->settings, ); # Dispatch — settings object has both global and command groups $command_class->run($stage2->settings); =head2 Example invocations $ my-cli -vv deploy --target production --dry-run Deploying to production (dry_run=yes, verbose=2) $ my-cli --config app.yml test -j8 --tags smoke,unit Running tests with 8 jobs (verbose=0) The key techniques are: =over 4 =item * B<stop_at_non_opts> in Stage 1 stops parsing at the subcommand name, placing it in C<< $state->stop >> and the rest in C<< $state->remains >>. =item * B<include_options> merges the subcommand's options into the script's option instance before Stage 2. =item * B<settings> is passed from Stage 1 to Stage 2 so the global values are preserved and both stages write into the same settings object. =back =head1 SEE ALSO =over 4 =item L<Getopt::Yath> - Main module documentation and API reference =item L<Getopt::Yath::State> - The parse result object returned by parse_options =item L<Getopt::Yath::Option> - Base option class and all available attributes =item L<Getopt::Yath::Settings> - The parsed settings object =item L<Getopt::Yath::Instance> - Internal option instance (advanced usage) =back =head1 SOURCE The source code repository for Getopt-Yath can be found at L<http://github.com/Test-More/Getopt-Yath/>. =head1 MAINTAINERS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 AUTHORS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 COPYRIGHT Copyright Chad Granum E<lt>exodist7@gmail.comE<gt>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L<http://dev.perl.org/licenses/> =cut �������������������������������������������������������������������������������������������������������������������������������Option����������������������������������������������������������������������������������������������000755��001750��001750�� 0�15165554207� 20543� 5����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt/Yath�����������������������������������������������������������������������������������������������������������������������������������Map.pm����������������������������������������������������������������������������������������������100644��001750��001750�� 12174�15165554207� 22003� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt/Yath/Option����������������������������������������������������������������������������������������������������������������������������package Getopt::Yath::Option::Map; use strict; use warnings; our $VERSION = '2.000011'; use Getopt::Yath::Util qw/decode_json/; use parent 'Getopt::Yath::Option'; use Getopt::Yath::HashBase qw/<split_on <key_on/; sub allows_list { 1 } sub allows_default { 1 } sub allows_arg { 1 } sub requires_arg { 1 } sub allows_autofill { 0 } sub requires_autofill { 0 } sub notes { (shift->SUPER::notes(), 'Can be specified multiple times') } sub _example_append { my $self = shift; my ($params, @prefixes) = @_; return unless $self->allows_list; my $groups = $params->{groups} // {}; my @out; for my $prefix (@prefixes) { for my $group (sort keys %$groups) { push @out => "${prefix}${group} KEY1 VAL KEY2 ${group} VAL1 VAL2 ... $groups->{$group} ... $groups->{$group}"; } } return @out; } sub default_long_examples { my $self = shift; my %params = @_; my @append = $self->_example_append(\%params, ' ', '='); return [' key=val', '=key=val', qq[ '{"json":"hash"}'], qq[='{"json":"hash"}'], @append]; } sub default_short_examples { my $self = shift; my %params = @_; my @append = $self->_example_append(\%params, '', ' ', '='); return [' key=val', 'key=value', '=key=val', qq[ '{"json":"hash"}'], qq[='{"json":"hash"}'], @append]; } sub init { my $self = shift; $self->SUPER::init(); $self->{+KEY_ON} //= '='; } sub is_populated { ${$_[1]} && keys %{${$_[1]}} } sub get_initial_value { my $self = shift; my %val; my $env = $self->from_env_vars; for my $name (@{$env || []}) { $val{$name} = $ENV{$name} if defined $ENV{$name}; } return \%val if keys %val; return undef if $self->{+MAYBE}; return $self->_get___value(INITIALIZE()) // {}; } sub get_clear_value { my $self = shift; return $self->_get___value(CLEAR(), @_) // {}; } sub add_value { my $self = shift; my ($ref, %vals) = @_; return unless keys %vals; $$ref //= {}; %{$$ref} = ( %{$$ref}, %vals, ); } sub normalize_value { my $self = shift; my (@input) = @_; return $self->SUPER::normalize_value(@input) if @input > 1; if ($input[0] =~ m/^\s*\{.*\}\s*$/s) { my $out; local $@; unless (eval { local $SIG{__DIE__}; $out = decode_json($input[0]); 1 }) { my ($err) = split /[\n\r]+/, $@; $err =~ s{at \Q$INC{'Getopt/Yath/Util.pm'}\E line \d+\..*$}{}; die "Could not decode JSON string: $err\n====\n$input[0]\n====\n"; } return %$out; } my @split; if (my $on = $self->split_on) { @split = grep { length($_) } map { split($on, $_) } @input; } else { @split = @input; } my $key_on = $self->key_on // '='; my %output = map { my ($k, $v) = split($key_on, $_, 2); $self->SUPER::normalize_value($k, $v) } @split; return %output; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Getopt::Yath::Option::Map - Base class for 'map' style options. =head1 DESCRIPTION Expects all values to be C<key=value> pairs and produces a hashref. C<--opt foo=bar> will set C<$h{foo} = 'bar'>. If a C<split_on> parameter is provided then a single use can set multiple values. For example if C<split_on> is set to C<,> then C<--opt foo=bar,baz=bat> is provided, then the result will have C<$h{foo} = 'bar'; $h{baz} = 'bat'>. =head1 SYNOPSIS option env_var => ( field => 'env_vars', short => 'E', type => 'Map', long_examples => [' VAR=VAL'], short_examples => ['VAR=VAL', ' VAR=VAL'], description => 'Set environment variables', ); =head1 METHODS All methods from L<Getopt::Yath::Option> are inherited. The following are overridden or noteworthy: =over 4 =item requires_arg: true =item allows_list: true Each use of C<--opt key=val> adds to the hash. C<--no-opt> empties it. =item normalize_value(@input) If the input looks like a JSON object (e.g., C<'{"a":"b"}'>), it is decoded and the key/value pairs are returned. Otherwise values are split on C<key_on> (default C<=>) to produce key/value pairs. If C<split_on> is set, values are split on that delimiter first. =item get_initial_value Checks C<from_env_vars>. For maps, the environment variable name is used as the key and the variable's value as the hash value. Returns an empty hashref if no environment values are found. =back =head1 ADDITIONAL ATTRIBUTES =over 4 =item split_on => $delimiter A string or regex to split values on before extracting key/value pairs. =item key_on => $delimiter The delimiter between keys and values. Defaults to C<=>. =back =head1 SOURCE The source code repository for Getopt-Yath can be found at L<http://github.com/Test-More/Getopt-Yath/>. =head1 MAINTAINERS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 AUTHORS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 COPYRIGHT Copyright Chad Granum E<lt>exodist7@gmail.comE<gt>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L<http://dev.perl.org/licenses/> =cut ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Auto.pm���������������������������������������������������������������������������������������������100644��001750��001750�� 4107�15165554207� 22153� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt/Yath/Option����������������������������������������������������������������������������������������������������������������������������package Getopt::Yath::Option::Auto; use strict; use warnings; our $VERSION = '2.000011'; use parent 'Getopt::Yath::Option::Scalar'; use Getopt::Yath::HashBase; sub allows_default { 1 } sub allows_arg { 1 } sub requires_arg { 0 } sub allows_autofill { 1 } sub requires_autofill { 1 } sub can_set_env { 1 } sub get_env_value { my $opt = shift; my ($var, $ref) = @_; return $$ref unless $var =~ m/^!/; return $$ref ? 0 : 1; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Getopt::Yath::Option::Auto - Options with default values that also accept arguments. =head1 DESCRIPTION This type has an 'autofill' value that is used if no argument is provided to the parameter, IE C<--opt>. But can also be given a specific value using C<--opt=val>. It B<DOES NOT> support C<--opt VAL> which will most likely result in an exception. =head1 SYNOPSIS option help => ( type => 'Auto', autofill => 'ALL', # Default to all if no subtitle short => 'h', description => "Show help, optionally just show a specific subtitle from help output", short_examples => ['', '=Subtitle'], long_examples => ['', '=Subtitle'], ); =head1 METHODS All methods from L<Getopt::Yath::Option::Scalar> are inherited. The following are overridden or noteworthy: =over 4 =item requires_arg: false =item allows_autofill: true =item requires_autofill: true C<--opt> uses the autofill value. C<--opt=val> uses the provided value. C<--opt VAL> is B<not> supported (the next argument is not consumed). =item can_set_env: true =back =head1 SOURCE The source code repository for Getopt-Yath can be found at L<http://github.com/Test-More/Getopt-Yath/>. =head1 MAINTAINERS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 AUTHORS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 COPYRIGHT Copyright Chad Granum E<lt>exodist7@gmail.comE<gt>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L<http://dev.perl.org/licenses/> =cut ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Bool.pm���������������������������������������������������������������������������������������������100644��001750��001750�� 4457�15165554207� 22146� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt/Yath/Option����������������������������������������������������������������������������������������������������������������������������package Getopt::Yath::Option::Bool; use strict; use warnings; our $VERSION = '2.000011'; use parent 'Getopt::Yath::Option'; use Getopt::Yath::HashBase; sub allows_shortval { 0 } sub allows_default { 1 } sub allows_arg { 0 } sub requires_arg { 0 } sub allows_autofill { 0 } sub requires_autofill { 0 } sub no_arg_value { 1 } # --bool # undef is not populated, otherwise we have 1 or 0 sub is_populated { defined(${$_[1]}) ? 1 : 0 } sub add_value { ${$_[1]} = $_[2] } sub clear_field { ${$_[1]} = 0 } # --no-bool # Default to 0 unless otherwise specified sub get_default_value { my $self = shift; return undef if $self->{+MAYBE}; return $self->SUPER::get_default_value(@_) ? 1 : 0; } sub can_set_env { 1 } sub get_env_value { my $opt = shift; my ($var, $ref) = @_; my $b = $$ref ? 1 : 0; return $b unless $var =~ m/^!/; return $b ? 0 : 1; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Getopt::Yath::Option::Bool - Option type for boolean values (no arguments) =head1 DESCRIPTION Is either on or off. C<--opt> will turn it on. C<--no-opt> will turn it off. Default is off unless the C<default> is parameter is provided. =head1 SYNOPSIS option dry_run => ( type => 'Bool', description => "Only pretend to do stuff", default => 0, ); =head1 METHODS All methods from L<Getopt::Yath::Option> are inherited. The following are overridden or noteworthy: =over 4 =item requires_arg: false =item allows_arg: false Bool options take no argument. C<--opt> turns it on, C<--no-opt> turns it off. =item can_set_env: true Bool options can set environment variables. Negated env vars (C<!VAR>) are supported and will invert the boolean value. =item get_default_value Returns C<0> by default unless a custom C<default> is provided. =back =head1 SOURCE The source code repository for Getopt-Yath can be found at L<http://github.com/Test-More/Getopt-Yath/>. =head1 MAINTAINERS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 AUTHORS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 COPYRIGHT Copyright Chad Granum E<lt>exodist7@gmail.comE<gt>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L<http://dev.perl.org/licenses/> =cut �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������List.pm���������������������������������������������������������������������������������������������100644��001750��001750�� 10644�15165554207� 22201� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt/Yath/Option����������������������������������������������������������������������������������������������������������������������������package Getopt::Yath::Option::List; use strict; use warnings; our $VERSION = '2.000011'; use Getopt::Yath::Util qw/decode_json/; use parent 'Getopt::Yath::Option'; use Getopt::Yath::HashBase qw/<split_on/; sub allows_list { 1 } sub allows_arg { 1 } sub requires_arg { 1 } sub allows_default { 1 } sub allows_autofill { 0 } sub requires_autofill { 0 } sub notes { (shift->SUPER::notes(), 'Can be specified multiple times') } sub is_populated { ${$_[1]} && @{${$_[1]}} } sub get_clear_value { my $self = shift; return $self->_get___value(CLEAR(), @_) // []; } sub get_initial_value { my $self = shift; my @val; my $env = $self->from_env_vars; for my $name (@{$env || []}) { push @val => $ENV{$name} if defined $ENV{$name}; } return \@val if @val; return undef if $self->{+MAYBE}; return $self->_get___value(INITIALIZE()) // []; } sub add_value { my $self = shift; my ($ref, @val) = @_; return if $self->maybe && !@val; push @{$$ref} => @val; } sub normalize_value { my $self = shift; my (@input) = @_; if ($input[0] =~ m/^\s*\[.*\]\s*$/s) { my $out; local $@; unless (eval { local $SIG{__DIE__}; $out = decode_json($input[0]); 1 }) { my ($err) = split /[\n\r]+/, $@; $err =~ s{at \Q$INC{'Getopt/Yath/Util.pm'}\E line \d+\..*$}{}; die "Could not decode JSON string: $err\n====\n$input[0]\n====\n"; } return @$out; } my @output; if (my $on = $self->split_on) { @output = map { $self->SUPER::normalize_value($_) } map { split($on, $_) } @input; } else { @output = map { $self->SUPER::normalize_value($_) } @input; } return @output; } sub inject_default_long_examples { qq{ '["json","list"]'}, qq{='["json","list"]'} } sub inject_default_short_examples { qq{ '["json","list"]'}, qq{='["json","list"]'} } sub default_long_examples { my $self = shift; my %params = @_; my $list = $self->SUPER::default_long_examples(%params); push @$list => $self->inject_default_long_examples(); return $list; } sub default_short_examples { my $self = shift; my %params = @_; my $list = $self->SUPER::default_short_examples(%params); push @$list => $self->inject_default_short_examples(); return $list; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Getopt::Yath::Option::List - Options that can take multiple values. =head1 DESCRIPTION Can take multiple values. C<--opt VAL> appends a value to the list. C<--no-opt> will empty the list. If a C<split_on> parameter is provided then a single use can set multiple values. For example if C<split_on> is set to C<,> then C<--opt foo,bar> is provided, then C<foo> and C<bar> will both be added to the list. =head1 SYNOPSIS option copy_env => ( short => 'e', type => 'List', description => "Specify environment variables to pass along with their current values", long_examples => [ ' HOME', ' SHELL' ], short_examples => [ ' HOME', ' SHELL' ], ); =head1 METHODS All methods from L<Getopt::Yath::Option> are inherited. The following are overridden or noteworthy: =over 4 =item requires_arg: true =item allows_list: true Each use of C<--opt VAL> appends to the list. C<--no-opt> empties it. =item normalize_value(@input) If the input looks like a JSON array (e.g., C<'["a","b"]'>), it is decoded and the elements are returned. If C<split_on> is set, values are split on that delimiter before normalization. =item get_initial_value Checks C<from_env_vars> for initial values. Unlike the base class, multiple environment variables can each contribute a value. Returns an empty arrayref if no environment values are found. =back =head1 ADDITIONAL ATTRIBUTES =over 4 =item split_on => $delimiter A string or regex to split values on. For example, with C<< split_on => ',' >>, C<--opt foo,bar> adds both C<foo> and C<bar> to the list. =back =head1 SOURCE The source code repository for Getopt-Yath can be found at L<http://github.com/Test-More/Getopt-Yath/>. =head1 MAINTAINERS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 AUTHORS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 COPYRIGHT Copyright Chad Granum E<lt>exodist7@gmail.comE<gt>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L<http://dev.perl.org/licenses/> =cut ��������������������������������������������������������������������������������������������Count.pm��������������������������������������������������������������������������������������������100644��001750��001750�� 5401�15165554207� 22331� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt/Yath/Option����������������������������������������������������������������������������������������������������������������������������package Getopt::Yath::Option::Count; use strict; use warnings; use Carp qw/croak/; our $VERSION = '2.000011'; use parent 'Getopt::Yath::Option'; use Getopt::Yath::HashBase; sub allows_shortval { 0 } sub allows_arg { 1 } sub requires_arg { 0 } sub allows_autofill { 0 } sub requires_autofill { 0 } sub is_populated { 1 } # Always populated sub no_arg_value { () } sub clear_field { ${$_[1]} = 0 } # --no-count # Autofill should be 0 if not specified sub get_autofill_value { $_[0]->SUPER::get_autofill_value() // 0 } sub default_long_examples {my $self = shift; ['', '=COUNT'] } sub default_short_examples {my $self = shift; ['', $self->short, ($self->short x 2) . '..', '=COUNT'] } sub notes { (shift->SUPER::notes(), 'Can be specified multiple times, counter bumps each time it is used.') } # --count # --count=5 sub add_value { my $self = shift; my ($ref, @val) = @_; # Explicit value set return $$ref = $val[0] if @val; # Make sure we have a sane start $$ref //= $self->get_autofill_value; # Bump by one return ${$ref}++; } sub can_set_env { 1 } sub get_env_value { my $opt = shift; my ($var, $ref) = @_; return $$ref unless $var =~ m/^!/; return $$ref ? 0 : 1; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Getopt::Yath::Option::Count - Option that can be incremented as a counter. =head1 DESCRIPTION Is an integer value, default is to start at C<0>. C<--opt> increments the counter. C<--no-opt> resets the counter. C<--opt=VAL> can be used to specify a desired count. =head1 SYNOPSIS option verbose => ( type => 'Count', short => 'v', description => "Increase the verbosity level", initialize => 0, ); =head1 METHODS All methods from L<Getopt::Yath::Option> are inherited. The following are overridden or noteworthy: =over 4 =item requires_arg: false =item allows_arg: true C<--opt> increments the counter, C<--opt=N> sets it to N, C<--no-opt> resets it to 0. =item allows_shortval: false The C<-oVAL> form is disabled so that C<-vvv> can increment the counter multiple times. =item is_populated: always true Counters are always considered populated since they default to 0. =item can_set_env: true Count options can set environment variables. =back =head1 SOURCE The source code repository for Getopt-Yath can be found at L<http://github.com/Test-More/Getopt-Yath/>. =head1 MAINTAINERS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 AUTHORS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 COPYRIGHT Copyright Chad Granum E<lt>exodist7@gmail.comE<gt>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L<http://dev.perl.org/licenses/> =cut ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Scalar.pm�������������������������������������������������������������������������������������������100644��001750��001750�� 3543�15165554207� 22453� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt/Yath/Option����������������������������������������������������������������������������������������������������������������������������package Getopt::Yath::Option::Scalar; use strict; use warnings; our $VERSION = '2.000011'; use parent 'Getopt::Yath::Option'; use Getopt::Yath::HashBase; sub allows_default { 1 } sub allows_arg { 1 } sub requires_arg { 1 } sub allows_autofill { 0 } sub requires_autofill { 0 } sub is_populated { defined(${$_[1]}) ? 1 : 0 } sub add_value { ${$_[1]} = $_[2] } sub can_set_env { 1 } sub get_env_value { my $opt = shift; my ($var, $ref) = @_; return $$ref unless $var =~ m/^!/; return $$ref ? 0 : 1; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Getopt::Yath::Option::Scalar - Option type for basic scalar values. =head1 DESCRIPTION Takes a scalar value. A value is required. Can be used as C<--opt VAL> or C<--opt=val>. C<--no-opt> can be used to clear the value. =head1 SYNOPSIS option name => ( short => 'n', type => 'Scalar', description => 'Specify the name', long_examples => [ ' foo'], short_examples => [ ' foo'], default => 'john', ); =head1 METHODS All methods from L<Getopt::Yath::Option> are inherited. The following are overridden or noteworthy: =over 4 =item requires_arg: true A value must be provided (C<--opt VALUE> or C<--opt=VALUE>). =item can_set_env: true Scalar options can set environment variables. Negated env vars (C<!VAR>) are supported. =back =head1 SOURCE The source code repository for Getopt-Yath can be found at L<http://github.com/Test-More/Getopt-Yath/>. =head1 MAINTAINERS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 AUTHORS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 COPYRIGHT Copyright Chad Granum E<lt>exodist7@gmail.comE<gt>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L<http://dev.perl.org/licenses/> =cut �������������������������������������������������������������������������������������������������������������������������������������������������������������AutoMap.pm������������������������������������������������������������������������������������������100644��001750��001750�� 3665�15165554207� 22621� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt/Yath/Option����������������������������������������������������������������������������������������������������������������������������package Getopt::Yath::Option::AutoMap; use strict; use warnings; our $VERSION = '2.000011'; use parent 'Getopt::Yath::Option::Map'; use Getopt::Yath::HashBase; sub allows_arg { 1 } sub requires_arg { 0 } sub allows_default { 1 } sub allows_autofill { 1 } sub requires_autofill { 1 } sub default_long_examples { ['', '=key=val'] } sub default_short_examples { ['', 'key=val', '=key=val'] } 1; __END__ =pod =encoding UTF-8 =head1 NAME Getopt::Yath::Option::AutoMap - Options that accept multiple values, but also provide a default if no values are provided. =head1 DESCRIPTION This is a combination of 'Auto' and 'Map' types. The no-arg form C<--opt> will add the default key+value pairs to the hash. The C<--opt=KEY=VAL> form will add additional values. =head1 SYNOPSIS option env_var => ( field => 'env_vars', short => 'E', type => 'Map', long_examples => [' VAR=VAL'], short_examples => ['VAR=VAL', ' VAR=VAL'], description => 'Set environment variables', autofill => sub { +{ HOME => $ENV{HOME}, USER => $ENV{USER} } }, ); =head1 METHODS All methods from L<Getopt::Yath::Option::Map> are inherited. The following are overridden or noteworthy: =over 4 =item requires_arg: false =item allows_autofill: true =item requires_autofill: true C<--opt> adds the autofill key/value pairs. C<--opt=KEY=VAL> adds a specific pair. =back =head1 SOURCE The source code repository for Getopt-Yath can be found at L<http://github.com/Test-More/Getopt-Yath/>. =head1 MAINTAINERS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 AUTHORS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 COPYRIGHT Copyright Chad Granum E<lt>exodist7@gmail.comE<gt>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L<http://dev.perl.org/licenses/> =cut ���������������������������������������������������������������������������BoolMap.pm������������������������������������������������������������������������������������������100644��001750��001750�� 7460�15165554207� 22601� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt/Yath/Option����������������������������������������������������������������������������������������������������������������������������package Getopt::Yath::Option::BoolMap; use strict; use warnings; our $VERSION = '2.000011'; use Carp qw/croak/; use parent 'Getopt::Yath::Option::Map'; use Getopt::Yath::HashBase qw/+pattern +requires_arg +custom_matches/; sub allows_list { 1 } sub allows_default { 1 } sub allows_arg { 1 } sub allows_autofill { 0 } sub requires_autofill { 0 } sub notes { (shift->SUPER::notes(), 'Can be specified multiple times') } sub requires_arg { $_[0]->{+REQUIRES_ARG} ? 1 : 0 } sub init { my $self = shift; $self->SUPER::init(@_); croak "A 'pattern' is required" unless $self->{+PATTERN}; return $self; } sub no_arg_value { $_[0]->field, 1 } sub pattern { my $self = shift; my $append = $self->{+PATTERN}; return qr/^--(no-)?$append$/; } sub default_long_examples { my $self = shift; my $out = $self->SUPER::default_long_examples(@_); push @$out => $self->pattern; return $out; } sub default_short_examples { my $self = shift; my $out = $self->SUPER::default_short_examples(@_); push @$out => $self->pattern; return $out; } sub custom_matches { my $self = shift; my $pattern = $self->pattern; return sub { my ($input, $state) = @_; return $self->{+CUSTOM_MATCHES}->($self, @_) if $self->{+CUSTOM_MATCHES}; return unless $input =~ $pattern; my ($no, $key) = ($1, $2); return ($self, 1, [$key => $no ? 0 : 1]); }; } sub doc_forms { my $self = shift; my %params = @_; my ($forms, $no_forms) = $self->SUPER::doc_forms(%params); my $inner = "" . $self->{+PATTERN}; $inner =~ s{^\Q(?^:\E}{}; $inner =~ s{\)$}{}; return ($forms, $no_forms, ["/^--(no-)?$inner\$/"]); } 1; __END__ =pod =encoding UTF-8 =head1 NAME Getopt::Yath::Option::BoolMap - Options that take multiple boolean values. =head1 DESCRIPTION Match several --OPTION-XXX and --no-OPTION-XXX options based on a given regex, populates a hashref where each option found is given a true or false value depending on if it has the --no- prefix. =head1 SYNOPSIS option features => ( type => 'BoolMap', clear => sub { {features => 0} }, pattern => qr/feature-(.+)/, description => 'Match '--feature-(foo), --no-feature-(foo), etc and set {foo => $BOOL} in the 'features' option', ); =head1 METHODS All methods from L<Getopt::Yath::Option::Map> are inherited. The following are overridden or noteworthy: =over 4 =item requires_arg Depends on the value of the C<requires_arg> attribute. Defaults to false. =item custom_matches Returns a coderef that matches command-line arguments against the C<pattern> regex. When C<--MATCH> is used the key gets a true value; when C<--no-MATCH> is used it gets a false value. =item no_arg_value Returns the option's field name with a value of C<1>. =back =head1 ADDITIONAL ATTRIBUTES =over 4 =item pattern => qr/.../ B<Required.> A regex pattern (with a capture group) that is embedded into C<< qr/^--(no-)?$pattern$/ >>. The first capture group from the pattern is used as the hash key. =item requires_arg => BOOL If true, the option requires an argument. Defaults to false. =item custom_matches => sub { ... } Optional coderef to override the default matching logic. Receives the option object, the input string, and the parse state. =back =head1 SOURCE The source code repository for Getopt-Yath can be found at L<http://github.com/Test-More/Getopt-Yath/>. =head1 MAINTAINERS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 AUTHORS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 COPYRIGHT Copyright Chad Granum E<lt>exodist7@gmail.comE<gt>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L<http://dev.perl.org/licenses/> =cut ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Settings��������������������������������������������������������������������������������������������000755��001750��001750�� 0�15165554207� 21073� 5����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt/Yath�����������������������������������������������������������������������������������������������������������������������������������Group.pm��������������������������������������������������������������������������������������������100644��001750��001750�� 6565�15165554207� 22701� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt/Yath/Settings��������������������������������������������������������������������������������������������������������������������������package Getopt::Yath::Settings::Group; use strict; use warnings; our $VERSION = '2.000011'; use Carp(); sub new { my $class = shift; my $self = (@_ != 1) ? { @_ } : $_[0]; return bless($self, $class); } sub all { return %{$_[0]} } sub check_option { exists($_[0]->{$_[1]}) ? 1 : 0 } sub option :lvalue { my $self = shift; my ($option, @vals) = @_; Carp::confess("Too many arguments for option()") if @vals > 1; Carp::confess("The '$option' option does not exist") unless exists $self->{$option}; ($self->{$option}) = @vals if @vals; return $self->{$option}; } sub create_option { my $self = shift; my ($name, $val) = @_; $self->{$name} = $val; return $self->{$name}; } sub option_ref { my $self = shift; my ($name, $create) = @_; Carp::confess("The '$name' option does not exist") unless $create || exists $self->{$name}; return \($self->{$name}); } sub delete_option { my $self = shift; my ($name) = @_; delete $self->{$name}; } sub remove_option { my $self = shift; my ($name) = @_; delete $self->{$name}; } our $AUTOLOAD; sub AUTOLOAD : lvalue { my $this = shift; my $option = $AUTOLOAD; $option =~ s/^.*:://g; return if $option eq 'DESTROY'; Carp::confess("Method $option() must be called on a blessed instance") unless ref($this); $this->option($option, @_); } sub TO_JSON { my $self = shift; return {%$self}; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Getopt::Yath::Settings::Group - Representation of an option group. =head1 DESCRIPTION This is used by L<Getopt::Yath::Settings> to represent parsed group settings. =head1 SYNOPSIS my $parsed = parse_options(\@ARGV, ...); my $settings = $parsed->settings; my $value = $settings->GROUP->OPTION; # Or my $value = $settings->group('GROUP')->option('OPTION'); # Or my $value = $settings->maybe('GROUP' => 'OPTION', $default); if ($group = $settings->check_group('GROUP')) { # We have the specified group } =head1 METHODS =over 4 =item %options = $group->all Get all options, key/value pairs. =item $bool = $group->check_option($option_name) Check if an option exists. =item $value = $group->option($option_name) =item $value = $group->option($option_name, $value) =item $group->option($option_name) = $value Get/set an option. =item $group->create_option($option_name, $value) Create the specified option. =item $ref = $group->option_ref($option_name) =item $ref = $group->option_ref($option_name, $create) Get a reference to the value of the specified option. Optionally create it if it does not exist. my $ref = $group->option_ref('foo'); $$ref = 'I am setting the option value'; =item $value = $group->delete_option($option_name) =item $value = $group->remove_option($option_name) Delete an option, returning the value it used to have. =back =head1 SOURCE The source code repository for Getopt-Yath can be found at L<http://github.com/Test-More/Getopt-Yath/>. =head1 MAINTAINERS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 AUTHORS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 COPYRIGHT Copyright Chad Granum E<lt>exodist7@gmail.comE<gt>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L<http://dev.perl.org/licenses/> =cut �������������������������������������������������������������������������������������������������������������������������������������������AutoList.pm�����������������������������������������������������������������������������������������100644��001750��001750�� 3164�15165554207� 23011� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt/Yath/Option����������������������������������������������������������������������������������������������������������������������������package Getopt::Yath::Option::AutoList; use strict; use warnings; our $VERSION = '2.000011'; use parent 'Getopt::Yath::Option::List'; use Getopt::Yath::HashBase; sub allows_arg { 1 } sub requires_arg { 0 } sub allows_autofill { 1 } sub requires_autofill { 1 } sub inject_default_long_examples { qq{='["json","list"]'} } sub inject_default_short_examples { qq{='["json","list"]'} } 1; __END__ =pod =encoding UTF-8 =head1 NAME Getopt::Yath::Option::AutoList - Options with a default list of values =head1 DESCRIPTION This is a combination of 'Auto' and 'List' types. The no-arg form C<--opt> will add the default values(s) to the list. The C<--opt=VAL> form will add additional values. =head1 SYNOPSIS option do_things => ( type => 'AutoList', autofill => sub { qw/foo bar baz/ }, ); =head1 METHODS All methods from L<Getopt::Yath::Option::List> are inherited. The following are overridden or noteworthy: =over 4 =item requires_arg: false =item allows_autofill: true =item requires_autofill: true C<--opt> adds the autofill value(s) to the list. C<--opt=VAL> adds a specific value. =back =head1 SOURCE The source code repository for Getopt-Yath can be found at L<http://github.com/Test-More/Getopt-Yath/>. =head1 MAINTAINERS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 AUTHORS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 COPYRIGHT Copyright Chad Granum E<lt>exodist7@gmail.comE<gt>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L<http://dev.perl.org/licenses/> =cut ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������PathList.pm�����������������������������������������������������������������������������������������100644��001750��001750�� 4252�15165554207� 22774� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt/Yath/Option����������������������������������������������������������������������������������������������������������������������������package Getopt::Yath::Option::PathList; use strict; use warnings; our $VERSION = '2.000011'; use parent 'Getopt::Yath::Option::List'; use Getopt::Yath::HashBase; sub normalize_value { my $self = shift; my (@input) = @_; my @out; for my $val (@input) { if ($val =~ m/\*/) { push @out => $self->SUPER::normalize_value($_) for glob($val); } else { push @out => $self->SUPER::normalize_value($val); } } return @out; } sub default_long_examples { my $self = shift; my %params = @_; my $list = $self->SUPER::default_long_examples(%params); push @$list => (qq{ '*.*'}, qq{='*.*'}); return $list; } sub default_short_examples { my $self = shift; my %params = @_; my $list = $self->SUPER::default_short_examples(%params); push @$list => (qq{ '*.*'}, qq{='*.*'}); return $list; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Getopt::Yath::Option::PathList - Option that takes one or more paths, wild cards allowed. =head1 DESCRIPTION Option that lets you specify multiple files and/or paths including wildcards that get expanded. =head1 SYNOPSIS option changed => ( type => 'PathList', split_on => ',', description => "Specify one or more files as having been changed.", long_examples => [' path/to/file'], ); =head1 METHODS All methods from L<Getopt::Yath::Option::List> are inherited. The following are overridden or noteworthy: =over 4 =item normalize_value(@input) Values containing wildcard characters (C<*>) are expanded using Perl's C<glob()> function. All other processing is delegated to the parent class. =back =head1 SOURCE The source code repository for Getopt-Yath can be found at L<http://github.com/Test-More/Getopt-Yath/>. =head1 MAINTAINERS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 AUTHORS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 COPYRIGHT Copyright Chad Granum E<lt>exodist7@gmail.comE<gt>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L<http://dev.perl.org/licenses/> =cut ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������AutoPathList.pm�������������������������������������������������������������������������������������100644��001750��001750�� 4423�15165554207� 23625� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/lib/Getopt/Yath/Option����������������������������������������������������������������������������������������������������������������������������package Getopt::Yath::Option::AutoPathList; use strict; use warnings; our $VERSION = '2.000011'; use Getopt::Yath::Option::PathList; use parent 'Getopt::Yath::Option::AutoList'; use Getopt::Yath::HashBase; BEGIN { *normalize_value = Getopt::Yath::Option::PathList->can('normalize_value'); } sub default_long_examples { my $self = shift; my %params = @_; my $list = $self->SUPER::default_long_examples(%params); push @$list => (qq{='*.*'}); return $list; } sub default_short_examples { my $self = shift; my %params = @_; my $list = $self->SUPER::default_short_examples(%params); push @$list => (qq{='*.*'}); return $list; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Getopt::Yath::Option::AutoPathList - Like L<Getopt::Yath::Option::PathList> with autofill. =head1 DESCRIPTION Like L<Getopt::Yath::Option::PathList> with autofill. =head1 SYNOPSIS option dev_libs => ( type => 'AutoPathList', short => 'D', name => 'dev-lib', autofill => sub { 'lib', 'blib/lib', 'blib/arch' }, description => 'find the local code instead of the installed versions of the same code. You can provide an argument (-Dfoo) to provide a custom path, or you can just use -D without and arg to add lib, blib/lib and blib/arch.', long_examples => ['', '=lib', '="lib/*"'], short_examples => ['', 'lib', '=lib', 'lib', '"lib/*"'], ); =head1 METHODS All methods from L<Getopt::Yath::Option::AutoList> are inherited, with C<normalize_value> from L<Getopt::Yath::Option::PathList> (glob expansion). =over 4 =item requires_arg: false =item allows_autofill: true =item requires_autofill: true C<--opt> adds the autofill paths. C<--opt=GLOB> expands the glob and adds matching paths. =back =head1 SOURCE The source code repository for Getopt-Yath can be found at L<http://github.com/Test-More/Getopt-Yath/>. =head1 MAINTAINERS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 AUTHORS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 COPYRIGHT Copyright Chad Granum E<lt>exodist7@gmail.comE<gt>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L<http://dev.perl.org/licenses/> =cut ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������structure�������������������������������������������������������������������������������������������000755��001750��001750�� 0�15165554207� 20201� 5����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db������������������������������������������������������������������������������������������������������������������������������������������becf4247919f617ab51cb6d1ac26c424��������������������������������������������������������������������100644��001750��001750�� 1344�15165554207� 24717� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������{"subroutine":[[3,"BEGIN"],[4,"BEGIN"],[5,"BEGIN"],[6,"BEGIN"]],"branch":[[10,{"text":"$app->run ? :"}],[3,{"text":"if $INC[-1] eq \".\""}]],"digest":"becf4247919f617ab51cb6d1ac26c424","file":"/home/exodist/perl5/perlbrew/perls/main/bin/prove","start":{"4":{"BEGIN":[{"time":null,"statement":4,"condition":null,"branch":2,"subroutine":1}]},"5":{"BEGIN":[{"condition":null,"time":null,"statement":7,"subroutine":2,"branch":2}]},"-1":{"__COVER__":[{"time":null,"statement":13,"condition":null,"branch":2,"subroutine":4}]},"3":{"BEGIN":[{"branch":1,"subroutine":null,"statement":3,"time":null,"condition":null}]},"6":{"BEGIN":[{"condition":null,"statement":10,"time":null,"subroutine":3,"branch":2}]}},"statement":[8,9,10,3,4,4,4,5,5,5,6,6,6]}��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������f32ba23251c7beef0a4fe0eaa54fe555��������������������������������������������������������������������100644��001750��001750�� 5625�15165554207� 25134� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������{"branch":[[23,{"text":"if $params{'inherit'} and $class->can(\"options\")"}],[31,{"text":"@common ? :"}],[38,{"text":"unless $INC{$file}"}],[40,{"text":"unless $module->can(\"options\")"}],[43,{"text":"@_ && ref $_[0] eq 'ARRAY' ? :"}],[54,{"text":"if @common"}],[56,{"text":"unless $cb and ref $cb eq \"CODE\""}],[64,{"text":"@common ? :"}],[66,{"text":"unless $common->{'no_module'}"}],[73,{"text":"unless $ok"}],[83,{"text":"if defined &{\"${caller}::$name\";}"}]],"subroutine":[[2,"BEGIN"],[3,"BEGIN"],[7,"BEGIN"],[9,"BEGIN"],[11,"BEGIN"],[12,"BEGIN"],[81,"BEGIN"],[15,"import"],[27,"__ANON__"],[30,"__ANON__"],[36,"__ANON__"],[50,"__ANON__"],[62,"__ANON__"],[76,"__ANON__"],[78,"__ANON__"]],"condition":[[20,{"left":"$params{'inst_class'}","right":"\"Getopt::Yath::Instance\"","type":"or_2","op":"//"}],[23,{"type":"and_3","right":"$class->can(\"options\")","op":"and","left":"$params{'inherit'}"}],[43,{"op":"&&","type":"and_3","right":"ref $_[0] eq 'ARRAY'","left":"@_"}],[51,{"left":"shift()","type":"or_2","right":"0","op":"//"}],[54,{"type":"or_3","right":"$common[-1]{'applicable'}","op":"//=","left":"$applicable"}],[56,{"right":"ref $cb eq \"CODE\"","type":"and_3","op":"and","left":"$cb"}]],"digest":"f32ba23251c7beef0a4fe0eaa54fe555","statement":[2,2,2,3,3,3,7,7,7,9,9,9,11,11,11,12,12,12,81,81,81,15,16,18,20,22,23,25,27,27,33,30,31,31,32,47,36,37,38,40,43,45,59,50,51,52,54,56,58,74,62,64,64,66,68,69,69,69,70,71,73,76,76,78,78,80,83,83,85,85,88],"file":"lib/Getopt/Yath.pm","start":{"78":{"__ANON__":[{"statement":71,"time":null,"condition":6,"branch":11,"subroutine":14}]},"15":{"import":[{"branch":null,"subroutine":7,"time":null,"statement":21,"condition":null}]},"3":{"BEGIN":[{"branch":null,"subroutine":1,"time":null,"statement":3,"condition":null}]},"76":{"__ANON__":[{"time":null,"statement":71,"condition":6,"branch":11,"subroutine":13}]},"2":{"BEGIN":[{"branch":null,"subroutine":null,"statement":null,"time":null,"condition":null}]},"81":{"BEGIN":[{"subroutine":6,"branch":null,"condition":null,"time":null,"statement":18}]},"9":{"BEGIN":[{"time":null,"statement":9,"condition":null,"branch":null,"subroutine":3}]},"-1":{"__COVER__":[{"subroutine":15,"branch":11,"condition":6,"statement":71,"time":null}]},"30":{"__ANON__":[{"branch":11,"subroutine":9,"time":null,"statement":71,"condition":6}]},"27":{"__ANON__":[{"subroutine":8,"branch":11,"condition":6,"statement":71,"time":null}]},"12":{"BEGIN":[{"statement":15,"time":null,"condition":null,"branch":null,"subroutine":5}]},"62":{"__ANON__":[{"condition":6,"statement":71,"time":null,"subroutine":12,"branch":11}]},"11":{"BEGIN":[{"condition":null,"time":null,"statement":12,"subroutine":4,"branch":null}]},"36":{"__ANON__":[{"subroutine":10,"branch":11,"condition":6,"statement":71,"time":null}]},"50":{"__ANON__":[{"subroutine":11,"branch":11,"condition":6,"statement":71,"time":null}]},"7":{"BEGIN":[{"subroutine":2,"branch":null,"condition":null,"statement":6,"time":null}]}}}�����������������������������������������������������������������������������������������������������������7d23b0bf85ec79b212a8f76564523107��������������������������������������������������������������������100644��001750��001750�� 13636�15165554207� 24457� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������{"statement":[2,2,2,3,3,3,18,18,18,29,29,29,48,48,48,36,36,37,37,37,37,39,42,56,49,50,51,52,52,54,103,103,103,259,259,259,67,70,71,72,76,77,80,81,83,84,85,87,90,92,93,94,99,99,99,104,105,106,106,109,110,116,117,119,121,123,124,125,127,128,130,131,133,133,134,136,137,138,139,142,145,145,149,150,151,154,157,157,161,161,164,164,164,167,168,169,173,177,179,181,183,182,183,185,186,189,190,193,196,200,201,203,203,204,204,206,207,207,207,209,210,210,210,251,213,215,217,218,219,221,222,225,228,229,230,231,232,233,236,240,244,246,247,248,250,253,254,256,259,260,260,261,261,262,262,263,263,264,264,267],"condition":[[56,{"right":"require mro","type":"and_3","op":"&&","left":"$] >= 5.01"}],[80,{"left":"$Getopt::Yath::HashBase::HB_VERSION","type":"or_3","right":"$VERSION","op":"||"}],[81,{"type":"or_3","right":"$Getopt::Yath::HashBase::VERSION{$into} > $ver","op":"or","left":"not $Getopt::Yath::HashBase::VERSION{$into}"}],[84,{"left":"$Getopt::Yath::HashBase::ATTR_LIST{$into}","right":"[]","type":"or_2","op":"||="}],[85,{"left":"$Getopt::Yath::HashBase::ATTR_SUBS{$into}","op":"||=","type":"or_2","right":"{}"}],[93,{"left":"$Getopt::Yath::HashBase::NEW_LOOKUP","type":"or_2","right":"{}","op":"//="}],[127,{"left":"$class->spec->{$p}","op":"||","right":"{'reader', 1, 'writer', 1}","type":"or_2"}],[185,{"op":"||","type":"or_2","right":0,"left":"$Getopt::Yath::HashBase::VERSION{$_}"}],[253,{"op":"//=","right":"{}","type":"or_2","left":"$Getopt::Yath::HashBase::NEW_LOOKUP"}]],"start":{"67":{"spec":[{"subroutine":8,"branch":2,"condition":1,"time":null,"statement":36}]},"164":{"__ANON__":[{"branch":20,"subroutine":16,"statement":97,"time":null,"condition":7}]},"259":{"BEGIN":[{"condition":1,"time":null,"statement":33,"subroutine":7,"branch":2}]},"3":{"BEGIN":[{"condition":null,"time":null,"statement":3,"subroutine":1,"branch":null}]},"76":{"do_import":[{"condition":1,"time":null,"statement":40,"subroutine":10,"branch":2}]},"2":{"BEGIN":[{"subroutine":null,"branch":null,"condition":null,"statement":null,"time":null}]},"200":{"_build_new":[{"condition":8,"statement":109,"time":null,"subroutine":18,"branch":22}]},"210":{"__ANON__":[{"condition":9,"statement":160,"time":null,"subroutine":22,"branch":35}]},"48":{"BEGIN":[{"condition":null,"statement":12,"time":null,"subroutine":4,"branch":null}]},"204":{"__ANON__":[{"condition":9,"time":null,"statement":160,"subroutine":20,"branch":35}]},"18":{"BEGIN":[{"branch":null,"subroutine":2,"statement":6,"time":null,"condition":null}]},"29":{"BEGIN":[{"subroutine":3,"branch":null,"condition":null,"statement":9,"time":null}]},"36":{"BEGIN":[{"statement":15,"time":null,"condition":null,"branch":null,"subroutine":5}]},"103":{"BEGIN":[{"time":null,"statement":30,"condition":1,"branch":2,"subroutine":6}]},"177":{"attr_list":[{"subroutine":17,"branch":20,"condition":7,"statement":97,"time":null}]},"213":{"__ANON__":[{"branch":35,"subroutine":23,"statement":160,"time":null,"condition":9}]},"203":{"__ANON__":[{"condition":9,"statement":160,"time":null,"subroutine":19,"branch":35}]},"161":{"__ANON__":[{"condition":7,"statement":97,"time":null,"subroutine":15,"branch":20}]},"133":{"__ANON__":[{"subroutine":12,"branch":20,"condition":7,"statement":97,"time":null}]},"-1":{"__COVER__":[{"subroutine":24,"branch":35,"condition":9,"statement":160,"time":null}]},"207":{"__ANON__":[{"condition":9,"statement":160,"time":null,"subroutine":21,"branch":35}]},"157":{"__ANON__":[{"branch":20,"subroutine":14,"statement":97,"time":null,"condition":7}]},"145":{"__ANON__":[{"statement":97,"time":null,"condition":7,"branch":20,"subroutine":13}]},"70":{"import":[{"condition":1,"statement":37,"time":null,"subroutine":9,"branch":2}]},"116":{"args_to_subs":[{"condition":6,"time":null,"statement":61,"subroutine":11,"branch":8}]}},"file":"lib/Getopt/Yath/HashBase.pm","branch":[[37,{"text":"if (eval {\n\tdo {\n\trequire Class::XSAccessor;\n'Class::XSAccessor'->VERSION(1.19);\n1\n}\n}) { }"}],[56,{"text":"$] >= 5.01 && require mro ? :"}],[81,{"text":"if not $Getopt::Yath::HashBase::VERSION{$into} or $Getopt::Yath::HashBase::VERSION{$into} > $ver"}],[94,{"text":"unless $new_lookup->{$have_new}"}],[92,{"text":"if (my $have_new = $into->can(\"new\"))"}],[99,{"text":"$add_new ? :"}],[99,{"text":"unless $Getopt::Yath::HashBase::ATTR_SUBS{$_}"}],[105,{"text":"if (ref $v eq 'CODE') { }"}],[128,{"text":"if $spec->{'strip'}"}],[138,{"text":"if ($use_gen) { }"}],[138,{"text":"elsif (not $spec->{'no_xs'}) { }"}],[137,{"text":"if ($spec->{'reader'})"}],[150,{"text":"if ($use_gen) { }"}],[150,{"text":"elsif (not $spec->{'no_xs'}) { }"}],[161,{"text":"$use_gen ? :"}],[164,{"text":"$use_gen ? :"}],[149,{"text":"if ($spec->{'writer'}) { }"}],[149,{"text":"elsif ($spec->{'read_only'}) { }"}],[149,{"text":"elsif ($spec->{'dep_writer'}) { }"}],[167,{"text":"if ($spec->{'custom'})"}],[190,{"text":"$list ? :"}],[185,{"text":"if (0.004 > ($Getopt::Yath::HashBase::VERSION{$_} || 0)) { }"}],[207,{"text":"$__pre_init ? :"}],[210,{"text":"$__post_init ? :"}],[225,{"text":"unless $type eq \"ARRAY\""}],[232,{"text":"unless my $key = shift @attributes"}],[221,{"text":"if ($type eq 'HASH') { }"}],[217,{"text":"if (@_ == 1) { }"}],[244,{"text":"unless exists $Getopt::Yath::HashBase::CAN_CACHE{$class}"}],[247,{"text":"if $Getopt::Yath::HashBase::CAN_CACHE{$class}"}],[260,{"text":"unless defined &{\"${into}::new\";}"}],[261,{"text":"unless defined &{\"${into}::add_pre_init\";}"}],[262,{"text":"unless defined &{\"${into}::add_post_init\";}"}],[263,{"text":"unless defined &{\"${into}::_pre_init\";}"}],[264,{"text":"unless defined &{\"${into}::_post_init\";}"}]],"subroutine":[[2,"BEGIN"],[3,"BEGIN"],[18,"BEGIN"],[29,"BEGIN"],[48,"BEGIN"],[36,"BEGIN"],[103,"BEGIN"],[259,"BEGIN"],[67,"spec"],[70,"import"],[76,"do_import"],[116,"args_to_subs"],[133,"__ANON__"],[145,"__ANON__"],[157,"__ANON__"],[161,"__ANON__"],[164,"__ANON__"],[177,"attr_list"],[200,"_build_new"],[203,"__ANON__"],[204,"__ANON__"],[207,"__ANON__"],[210,"__ANON__"],[213,"__ANON__"]],"digest":"7d23b0bf85ec79b212a8f76564523107"}��������������������������������������������������������������������������������������������������9b30e2fc1222fa186afd5bf5a7376d18��������������������������������������������������������������������100644��001750��001750�� 27330�15165554207� 24745� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������{"digest":"9b30e2fc1222fa186afd5bf5a7376d18","start":{"32":{"init":[{"subroutine":8,"branch":null,"condition":null,"time":null,"statement":24}]},"55":{"_post":[{"subroutine":11,"branch":null,"condition":4,"time":null,"statement":35}]},"131":{"have_group":[{"statement":85,"time":null,"condition":10,"branch":8,"subroutine":16}]},"13":{"BEGIN":[{"condition":null,"time":null,"statement":18,"subroutine":6,"branch":null}]},"9":{"BEGIN":[{"statement":9,"time":null,"condition":null,"branch":null,"subroutine":3}]},"-1":{"__COVER__":[{"subroutine":24,"branch":83,"condition":49,"time":null,"statement":331}]},"138":{"option_groups":[{"branch":9,"subroutine":17,"time":null,"statement":89,"condition":10}]},"495":{"docs":[{"subroutine":22,"branch":75,"condition":35,"statement":289,"time":null}]},"246":{"__ANON__":[{"statement":289,"time":null,"condition":35,"branch":75,"subroutine":20}]},"539":{"doc_sort_ops":[{"branch":82,"subroutine":23,"time":null,"statement":317,"condition":39}]},"199":{"process_args":[{"subroutine":19,"branch":18,"condition":12,"time":null,"statement":119}]},"250":{"__ANON__":[{"subroutine":21,"branch":75,"condition":35,"time":null,"statement":289}]},"44":{"add_option":[{"branch":null,"subroutine":9,"statement":30,"time":null,"condition":4}]},"97":{"_option":[{"branch":6,"subroutine":13,"statement":67,"time":null,"condition":8}]},"160":{"option_map":[{"subroutine":18,"branch":12,"condition":11,"time":null,"statement":100}]},"3":{"BEGIN":[{"time":null,"statement":3,"condition":null,"branch":null,"subroutine":1}]},"2":{"BEGIN":[{"time":null,"statement":null,"condition":null,"branch":null,"subroutine":null}]},"65":{"include":[{"subroutine":12,"branch":1,"condition":5,"statement":41,"time":null}]},"107":{"clear_cache":[{"condition":9,"statement":73,"time":null,"subroutine":14,"branch":7}]},"29":{"BEGIN":[{"branch":null,"subroutine":7,"time":null,"statement":21,"condition":null}]},"12":{"BEGIN":[{"branch":null,"subroutine":5,"time":null,"statement":15,"condition":null}]},"115":{"check_cache":[{"statement":77,"time":null,"condition":9,"branch":7,"subroutine":15}]},"50":{"add_post_process":[{"subroutine":10,"branch":null,"condition":4,"statement":33,"time":null}]},"7":{"BEGIN":[{"statement":6,"time":null,"condition":null,"branch":null,"subroutine":2}]},"11":{"BEGIN":[{"condition":null,"statement":12,"time":null,"subroutine":4,"branch":null}]}},"file":"lib/Getopt/Yath/Instance.pm","statement":[2,2,2,3,3,3,7,7,7,9,9,9,11,11,11,12,12,12,13,13,13,29,29,15,32,34,35,36,38,40,44,45,46,50,51,55,56,58,60,61,61,65,66,68,69,71,71,73,74,74,75,75,75,79,80,80,81,81,81,84,84,87,87,88,89,89,93,97,98,100,102,103,103,107,109,110,111,115,117,118,119,121,123,125,127,131,132,133,134,138,139,141,142,143,146,149,153,153,155,156,160,161,163,164,165,168,171,175,180,181,181,184,184,185,186,187,190,194,195,199,200,202,204,206,207,208,209,209,211,211,211,213,221,224,225,226,227,227,228,229,230,231,234,237,239,240,243,246,246,248,265,250,252,253,254,255,257,258,261,264,267,268,269,271,272,273,276,277,278,281,282,283,284,287,288,289,292,295,297,298,299,301,302,303,304,307,310,315,316,319,320,321,322,323,324,325,330,333,334,335,336,339,340,341,344,347,350,352,354,355,356,357,359,360,361,362,363,366,368,369,370,373,374,375,379,380,383,384,385,386,387,390,391,394,395,398,399,400,401,402,403,408,409,410,411,411,413,416,417,418,419,420,423,424,425,428,429,429,429,430,430,431,432,437,438,439,441,441,442,443,446,448,450,451,453,455,456,457,458,459,460,461,462,463,466,467,469,470,474,495,496,498,500,501,501,501,503,504,505,507,508,510,512,512,514,517,517,519,522,523,524,525,528,529,532,533,535,539,540,542,543,544,546,547,548,549,552,553,555,556,558],"subroutine":[[2,"BEGIN"],[3,"BEGIN"],[7,"BEGIN"],[9,"BEGIN"],[11,"BEGIN"],[12,"BEGIN"],[13,"BEGIN"],[29,"BEGIN"],[32,"init"],[44,"add_option"],[50,"add_post_process"],[55,"_post"],[65,"include"],[97,"_option"],[107,"clear_cache"],[115,"check_cache"],[131,"have_group"],[138,"option_groups"],[160,"option_map"],[199,"process_args"],[246,"__ANON__"],[250,"__ANON__"],[495,"docs"],[539,"doc_sort_ops"]],"branch":[[60,{"text":"if $self->{'dedup'}{$cb}++"}],[68,{"text":"unless $other"}],[69,{"text":"if $self->{'dedup'}{$other}++"}],[73,{"text":"if (my $other_include = $other->included)"}],[81,{"text":"unless $want{$_->title} or $want{$_->field}"}],[79,{"text":"if ($list) { }"}],[102,{"text":"if $self->{'dedup'}{$option}++"}],[121,{"text":"if $old_key == $new_key"}],[133,{"text":"if $self->option_groups->{$name}"}],[149,{"text":"if $self->{'options_groups_cache'} and $self->check_cache"}],[142,{"text":"if ($in_options) { }"}],[155,{"text":"if $in_options"}],[171,{"text":"if $self->{'options_map_cache'} and $self->check_cache"}],[164,{"text":"if ($in_options) { }"}],[181,{"text":"if $option->can(\"custom_matches\")"}],[186,{"text":"if $existing ne $option"}],[185,{"text":"if (my $existing = $map->{$form})"}],[194,{"text":"if $in_options"}],[202,{"text":"unless $args and ref $args eq \"ARRAY\""}],[209,{"text":"if $stops and ref $stops eq \"ARRAY\""}],[234,{"text":"$rt eq 'ARRAY' ? :"}],[230,{"text":"if (not defined $val) { }"}],[230,{"text":"elsif ($rt) { }"}],[227,{"text":"unless (defined ${$ref;})"}],[255,{"text":"if $arg eq $end"}],[257,{"text":"if (my $nest = $groups->{$arg})"}],[271,{"text":"if (my $end = $groups->{$base})"}],[276,{"text":"if ($stops->{$base})"}],[282,{"text":"if ($params{'stop_at_non_opts'})"}],[287,{"text":"if ($params{'skip_non_opts'})"}],[281,{"text":"unless ($base =~ /^-/)"}],[310,{"text":"if $other"}],[302,{"text":"if ($opt->allows_shortval and $set || $other) { }"}],[302,{"text":"elsif ($set) { }"}],[301,{"text":"if ($opt = $map->{$first})"}],[297,{"text":"if ($base =~ /^(-[^-])(=?)(.*)$/) { }"}],[323,{"text":"unless $opt"}],[320,{"text":"if (my $list = $map->{'custom_match'})"}],[319,{"text":"unless ($opt)"}],[330,{"text":"if $set and not defined $arg"}],[334,{"text":"if ($params{'skip_invalid_opts'})"}],[339,{"text":"if ($params{'stop_at_invalid_opts'})"}],[333,{"text":"unless ($opt)"}],[347,{"text":"if $set and not $opt->allows_arg"}],[352,{"text":"unless $opt->no_module"}],[363,{"text":"unless $set"}],[359,{"text":"if ($delta < 0)"}],[366,{"text":"if $state->{'cleared'}{$group_name}"}],[369,{"text":"unless @$argv"}],[368,{"text":"if ($opt->requires_arg and not $set)"}],[374,{"text":"if (my $end = $groups->{$arg})"}],[373,{"text":"if ($arg)"}],[379,{"text":"if (ref $arg and @$arg > 1 and not $opt->allows_list)"}],[387,{"text":"ref $arg ? :"}],[385,{"text":"if (defined $arg) { }"}],[385,{"text":"elsif ($opt->allows_autofill) { }"}],[402,{"text":"if (my $add = $class->options)"}],[401,{"text":"if ($class->can(\"options\"))"}],[398,{"text":"if ($opt->mod_adds_options)"}],[411,{"text":"defined $_ ? :"}],[410,{"text":"if (@bad)"}],[423,{"text":"if $state->{'cleared'} and $state->{'cleared'}{$group_name} and $state->{'cleared'}{$group_name}{$field_name}"}],[424,{"text":"if $opt->is_populated($ref)"}],[431,{"text":"if $set->{'applicable'} and not $set->{'applicable'}->($set, $self, $settings)"}],[428,{"text":"unless ($params{'skip_posts'})"}],[443,{"text":"unless $params{'no_set_env'}"}],[448,{"text":"unless $opt->can_set_env"}],[450,{"text":"unless my $to_set = $opt->set_env_vars"}],[451,{"text":"unless @$to_set"}],[453,{"text":"unless $opt->is_populated($ref)"}],[459,{"text":"unless my(@val) = $opt->get_env_value($env, $ref)"}],[460,{"text":"if (@val > 1)"}],[467,{"text":"$setval ? :"}],[467,{"text":"if $neg"}],[470,{"text":"unless $params{'no_set_env'}"}],[501,{"text":"unless $params{'applicable'}"}],[504,{"text":"unless my $fset = $DOC_FORMATS{$format}"}],[507,{"text":"unless $opts"}],[508,{"text":"unless @$opts"}],[512,{"text":"if $params{'group'}"}],[514,{"text":"unless @render"}],[523,{"text":"if (not $cat or $opt->category ne $cat)"}],[547,{"text":"if ($params{'group_first'}) { }"}]],"condition":[[34,{"left":"$self->{'options'}","op":"//=","right":"[]","type":"or_2"}],[35,{"left":"$self->{'posts'}","right":"{}","type":"or_2","op":"//="}],[36,{"op":"//=","type":"or_2","right":"{}","left":"$self->{'included'}"}],[38,{"op":"//=","type":"or_2","right":"{\"NO CATEGORY - FIX ME\", 99999}","left":"$self->{'category_sort_map'}"}],[58,{"op":"//=","right":"0","type":"or_2","left":"$weight"}],[71,{"op":"//=","type":"or_2","right":"[]","left":"$self->included->{ref $other}"}],[75,{"left":"$other_include->{$key}","op":"//","type":"or_2","right":"[]"}],[81,{"right":"$want{$_->field}","type":"or_3","op":"or","left":"$want{$_->title}"}],[100,{"left":"$self->{'options'}","right":"[]","type":"or_2","op":"//="}],[119,{"op":"//=","type":"or_2","right":"0","left":"$self->{'cache_key'}"}],[149,{"left":"$self->{'options_groups_cache'}","type":"and_3","right":"$self->check_cache","op":"and"}],[171,{"left":"$self->{'options_map_cache'}","op":"and","type":"and_3","right":"$self->check_cache"}],[202,{"left":"$args","type":"and_3","right":"ref $args eq \"ARRAY\"","op":"and"}],[206,{"left":"$params{'settings'}","op":"//","type":"or_3","right":"\"Getopt::Yath::Settings\"->new({})"}],[207,{"right":"[]","type":"or_2","op":"//","left":"$params{'stops'}"}],[208,{"left":"$params{'groups'}","op":"//","right":"{}","type":"or_2"}],[209,{"left":"$stops","type":"and_3","right":"ref $stops eq \"ARRAY\"","op":"and"}],[211,{"type":"or_2","right":"[]","op":"//","left":"$self->options"}],[221,{"left":"$params{'env'}","op":"//","right":"{}","type":"or_2"}],[221,{"left":"$params{'cleared'}","op":"//","right":"{}","type":"or_2"}],[221,{"op":"//","right":"{}","type":"or_2","left":"$params{'modules'}"}],[246,{"type":"or_3","right":"sub {\n\tdie \"'$_[0]' is not a valid option.\\n\";\n}\n","op":"//","left":"$params{'invalid_opt_callback'}"}],[302,{"type":"or_3","right":"$other","op":"||","left":"$set"}],[302,{"type":"and_3","right":"$set || $other","op":"and","left":"$opt->allows_shortval"}],[330,{"right":"not defined $arg","type":"and_3","op":"and","left":"$set"}],[347,{"left":"$set","op":"and","right":"not $opt->allows_arg","type":"and_3"}],[350,{"op":"//=","right":"$opt->forms->{$first}","type":"or_3","left":"$delta"}],[368,{"left":"$opt->requires_arg","op":"and","type":"and_3","right":"not $set"}],[379,{"left":"ref $arg","right":"@$arg > 1","type":"and_3","op":"and"}],[379,{"left":"ref $arg and @$arg > 1","type":"and_3","right":"not $opt->allows_list","op":"and"}],[423,{"left":"$state->{'cleared'}","type":"and_3","right":"$state->{'cleared'}{$group_name}","op":"and"}],[423,{"left":"$state->{'cleared'} and $state->{'cleared'}{$group_name}","right":"$state->{'cleared'}{$group_name}{$field_name}","type":"and_3","op":"and"}],[431,{"right":"not $set->{'applicable'}->($set, $self, $settings)","type":"and_3","op":"and","left":"$set->{'applicable'}"}],[441,{"op":"//","right":"[]","type":"or_2","left":"$opt->clear_env_vars"}],[462,{"left":"$opt->trace","right":"[\"\", \"unknown\", \"n/a\"]","type":"or_2","op":"//"}],[498,{"left":"$params{'color'}","right":"-t STDOUT","type":"or_3","op":"//="}],[501,{"left":"$self->options","type":"or_2","right":"[]","op":"//"}],[503,{"op":"//=","type":"or_2","right":"\"UNDEFINED\"","left":"$format"}],[523,{"left":"not $cat","op":"or","type":"or_3","right":"$opt->category ne $cat"}],[543,{"left":"$$map{$a->category}","op":"||","right":0,"type":"or_2"}],[544,{"left":"$$map{$b->category}","type":"or_2","right":0,"op":"||"}],[548,{"left":"$ret","op":"||=","right":"$a->group cmp $b->group","type":"or_3"}],[549,{"left":"$ret","type":"or_3","right":"$a->category cmp $b->category","op":"||="}],[552,{"op":"||=","type":"or_3","right":"$a->category cmp $b->category","left":"$ret"}],[553,{"left":"$ret","op":"||=","right":"$a->group cmp $b->group","type":"or_3"}],[555,{"op":"||","right":"''","type":"or_2","left":"$a->prefix"}],[555,{"left":"$b->prefix","op":"||","right":"''","type":"or_2"}],[555,{"left":"$ret","right":"($a->prefix || '') cmp ($b->prefix || '')","type":"or_3","op":"||="}],[556,{"type":"or_3","right":"$a->name cmp $b->name","op":"||=","left":"$ret"}]]}��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������c966eed5df47d66977103c0068d2ccc5��������������������������������������������������������������������100644��001750��001750�� 31364�15165554207� 24712� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������{"digest":"c966eed5df47d66977103c0068d2ccc5","subroutine":[[2,"BEGIN"],[3,"BEGIN"],[5,"BEGIN"],[12,"BEGIN"],[13,"BEGIN"],[54,"BEGIN"],[274,"BEGIN"],[56,"requires_arg"],[57,"add_value"],[58,"is_populated"],[59,"no_arg_value"],[60,"get_env_value"],[62,"can_set_env"],[63,"requires_autofill"],[65,"allows_shortval"],[66,"allows_default"],[68,"allows_list"],[70,"allows_arg"],[71,"allows_autofill"],[73,"get_autofill_value"],[74,"get_default_value"],[76,"init_settings"],[77,"finalize_settings"],[80,"create"],[93,"get_initial_value"],[110,"get_clear_value"],[116,"_get___value"],[130,"normalize_value"],[138,"trigger"],[144,"clear_field"],[150,"is_applicable"],[157,"long_args"],[163,"trace_string"],[169,"long_examples"],[175,"short_examples"],[181,"init"],[251,"check_value"],[291,"forms"],[313,"_example_append"],[332,"default_long_examples"],[345,"default_short_examples"],[360,"doc_forms"],[394,"cli_docs"],[448,"pod_docs"]],"branch":[[83,{"text":"unless $class eq __PACKAGE__"}],[85,{"text":"unless my $type = delete $params{'type'}"}],[96,{"text":"unless $env"}],[101,{"text":"unless exists $ENV{$env}"}],[102,{"text":"unless $neg"}],[103,{"text":"$ENV{$env} ? :"}],[119,{"text":"if $self->{'maybe'} and $field eq \"initialize\""}],[121,{"text":"unless exists $self->{$field}"}],[123,{"text":"unless ref $val"}],[124,{"text":"unless ref $val eq \"CODE\""}],[133,{"text":"unless my $cb = $self->{'normalize'}"}],[139,{"text":"unless my $cb = $self->{'trigger'}"}],[152,{"text":"unless my $cb = $self->{'applicable'}"}],[159,{"text":"unless $self->{'alt'}"}],[164,{"text":"unless my $trace = $self->{'trace'}"}],[170,{"text":"if $self->{'long_examples'}"}],[176,{"text":"if $self->{'short_examples'}"}],[184,{"text":"unless $self->{'trace'}"}],[187,{"text":"unless $self->{'module'} or $self->{'no_module'}"}],[190,{"text":"unless $self->{'title'} or $self->{'field'} and $self->{'name'}"}],[193,{"text":"unless $self->{'group'}"}],[196,{"text":"if $self->{'set_env_vars'} and not $self->can_set_env"}],[199,{"text":"if $self->{'alt'} and ref $self->{'alt'} ne \"ARRAY\""}],[202,{"text":"if $self->{'alt_no'} and ref $self->{'alt_no'} ne \"ARRAY\""}],[204,{"text":"unless $self->{'no_module'}"}],[206,{"text":"if (my $title = $self->{'title'})"}],[216,{"text":"unless $alt =~ /_/"}],[214,{"text":"unless ($self->allow_underscore_in_alt)"}],[222,{"text":"$self->allows_autofill ? :"}],[222,{"text":"if $self->{'default'} and not $self->allows_default"}],[224,{"text":"if $self->requires_autofill and not $self->{'autofill'}"}],[225,{"text":"if $self->{'autofill'} and not $self->allows_autofill"}],[228,{"text":"unless my $val = $self->{$field}"}],[229,{"text":"unless my $ref = ref $val"}],[230,{"text":"if $ref and $ref ne \"CODE\""}],[234,{"text":"unless my $val = $self->{$field}"}],[236,{"text":"if $ref eq \"CODE\""}],[244,{"text":"unless $self->can(uc $key)"}],[254,{"text":"unless defined $val"}],[256,{"text":"unless ref $val eq \"ARRAY\""}],[258,{"text":"unless my $av = $self->allowed_values"}],[273,{"text":"unless defined $c"}],[275,{"text":"if $c eq $v"}],[276,{"text":"if 0 + $c and 0 + $v and $c == $v"}],[264,{"text":"if ($r eq 'CODE') { }"}],[264,{"text":"elsif ($r =~ /Regex/i) { }"}],[264,{"text":"elsif ($r eq 'ARRAY') { }"}],[282,{"text":"if $ok"}],[292,{"text":"if $self->{'forms'}"}],[296,{"text":"if $self->{'short'}"}],[299,{"text":"if length $prefix"}],[316,{"text":"unless $self->allows_list"}],[335,{"text":"unless $self->allows_arg"}],[337,{"text":"if ($self->requires_arg)"}],[348,{"text":"unless $self->allows_arg"}],[351,{"text":"if $self->allows_shortval"}],[350,{"text":"if ($self->requires_arg)"}],[355,{"text":"if $self->allows_shortval"}],[364,{"text":"$self->{'prefix'} ? :"}],[369,{"text":"unless $self->{'alt'}"}],[373,{"text":"if (my $short = $self->{'short'})"}],[383,{"text":"unless $al <=> $bl"}],[402,{"text":"if ($params{'color'}) { }"}],[421,{"text":"if $self->{'from_env_vars'}"}],[422,{"text":"if $self->{'clear_env_vars'}"}],[423,{"text":"if $self->{'set_env_vars'}"}],[427,{"text":"if $_"}],[425,{"text":"if (my(@notes) = $self->notes)"}],[433,{"text":"if ref $val"}],[441,{"text":"if @$vals"}],[437,{"text":"if (my $avt = $self->allowed_values_text) { }"}],[437,{"text":"elsif (my $vals = $self->allowed_values) { }"}],[457,{"text":"if $self->{'from_env_vars'}"}],[458,{"text":"if $self->{'clear_env_vars'}"}],[459,{"text":"if $self->{'set_env_vars'}"}],[462,{"text":"if $_"}]],"start":{"77":{"finalize_settings":[{"statement":35,"time":null,"condition":null,"branch":null,"subroutine":22}]},"130":{"normalize_value":[{"branch":10,"subroutine":27,"time":null,"statement":63,"condition":1}]},"76":{"init_settings":[{"subroutine":21,"branch":null,"condition":null,"statement":35,"time":null}]},"66":{"allows_default":[{"statement":29,"time":null,"condition":null,"branch":null,"subroutine":15}]},"65":{"allows_shortval":[{"branch":null,"subroutine":14,"statement":28,"time":null,"condition":null}]},"251":{"check_value":[{"subroutine":36,"branch":38,"condition":18,"time":null,"statement":129}]},"291":{"forms":[{"subroutine":37,"branch":48,"condition":22,"statement":150,"time":null}]},"68":{"allows_list":[{"branch":null,"subroutine":16,"statement":30,"time":null,"condition":null}]},"163":{"trace_string":[{"branch":14,"subroutine":32,"statement":80,"time":null,"condition":1}]},"60":{"get_env_value":[{"branch":null,"subroutine":11,"statement":25,"time":null,"condition":null}]},"169":{"long_examples":[{"time":null,"statement":83,"condition":1,"branch":15,"subroutine":33}]},"360":{"doc_forms":[{"branch":58,"subroutine":41,"time":null,"statement":192,"condition":27}]},"70":{"allows_arg":[{"time":null,"statement":31,"condition":null,"branch":null,"subroutine":17}]},"71":{"allows_autofill":[{"subroutine":18,"branch":null,"condition":null,"time":null,"statement":32}]},"93":{"get_initial_value":[{"branch":2,"subroutine":24,"statement":42,"time":null,"condition":null}]},"332":{"default_long_examples":[{"subroutine":39,"branch":52,"condition":27,"time":null,"statement":178}]},"54":{"BEGIN":[{"subroutine":5,"branch":null,"condition":null,"time":null,"statement":15}]},"116":{"_get___value":[{"statement":55,"time":null,"condition":null,"branch":6,"subroutine":26}]},"181":{"init":[{"condition":1,"time":null,"statement":93,"subroutine":35,"branch":17}]},"63":{"requires_autofill":[{"subroutine":13,"branch":null,"condition":null,"time":null,"statement":27}]},"73":{"get_autofill_value":[{"subroutine":19,"branch":null,"condition":null,"statement":33,"time":null}]},"345":{"default_short_examples":[{"branch":54,"subroutine":40,"time":null,"statement":184,"condition":27}]},"3":{"BEGIN":[{"subroutine":1,"branch":null,"condition":null,"statement":3,"time":null}]},"80":{"create":[{"time":null,"statement":35,"condition":null,"branch":null,"subroutine":23}]},"2":{"BEGIN":[{"statement":null,"time":null,"condition":null,"branch":null,"subroutine":null}]},"58":{"is_populated":[{"condition":null,"time":null,"statement":23,"subroutine":9,"branch":null}]},"150":{"is_applicable":[{"time":null,"statement":73,"condition":1,"branch":12,"subroutine":30}]},"12":{"BEGIN":[{"condition":null,"time":null,"statement":9,"subroutine":3,"branch":null}]},"74":{"get_default_value":[{"branch":null,"subroutine":20,"time":null,"statement":34,"condition":null}]},"144":{"clear_field":[{"branch":12,"subroutine":29,"statement":70,"time":null,"condition":1}]},"56":{"requires_arg":[{"branch":null,"subroutine":7,"statement":21,"time":null,"condition":null}]},"-1":{"__COVER__":[{"branch":76,"subroutine":44,"time":null,"statement":278,"condition":39}]},"59":{"no_arg_value":[{"subroutine":10,"branch":null,"condition":null,"time":null,"statement":24}]},"313":{"_example_append":[{"subroutine":38,"branch":51,"condition":26,"statement":169,"time":null}]},"175":{"short_examples":[{"subroutine":34,"branch":16,"condition":1,"time":null,"statement":88}]},"13":{"BEGIN":[{"subroutine":4,"branch":null,"condition":null,"time":null,"statement":12}]},"57":{"add_value":[{"branch":null,"subroutine":8,"statement":22,"time":null,"condition":null}]},"157":{"long_args":[{"time":null,"statement":77,"condition":1,"branch":13,"subroutine":31}]},"138":{"trigger":[{"condition":1,"time":null,"statement":67,"subroutine":28,"branch":11}]},"110":{"get_clear_value":[{"condition":null,"statement":53,"time":null,"subroutine":25,"branch":6}]},"5":{"BEGIN":[{"branch":null,"subroutine":2,"statement":6,"time":null,"condition":null}]},"448":{"pod_docs":[{"branch":72,"subroutine":43,"time":null,"statement":257,"condition":39}]},"394":{"cli_docs":[{"statement":219,"time":null,"condition":30,"branch":62,"subroutine":42}]},"62":{"can_set_env":[{"statement":26,"time":null,"condition":null,"branch":null,"subroutine":12}]},"274":{"BEGIN":[{"branch":null,"subroutine":6,"statement":18,"time":null,"condition":null}]}},"file":"lib/Getopt/Yath/Option.pm","condition":[[119,{"left":"$self->{'maybe'}","op":"and","type":"and_3","right":"$field eq \"initialize\""}],[187,{"right":"$self->{'no_module'}","type":"or_3","op":"or","left":"$self->{'module'}"}],[190,{"right":"$self->{'name'}","type":"and_3","op":"and","left":"$self->{'field'}"}],[190,{"op":"or","right":"$self->{'field'} and $self->{'name'}","type":"or_3","left":"$self->{'title'}"}],[196,{"op":"and","type":"and_3","right":"not $self->can_set_env","left":"$self->{'set_env_vars'}"}],[199,{"right":"ref $self->{'alt'} ne \"ARRAY\"","type":"and_3","op":"and","left":"$self->{'alt'}"}],[202,{"op":"and","type":"and_3","right":"ref $self->{'alt_no'} ne \"ARRAY\"","left":"$self->{'alt_no'}"}],[204,{"type":"or_3","right":"$self->{'trace'}[0]","op":"//=","left":"$self->{'module'}"}],[207,{"op":"//=","right":"$title","type":"or_3","left":"$self->{'field'}"}],[208,{"op":"//=","right":"$title","type":"or_3","left":"$self->{'name'}"}],[215,{"right":"[]","type":"or_2","op":"//","left":"$self->{'alt'}"}],[222,{"left":"$self->{'default'}","right":"not $self->allows_default","type":"and_3","op":"and"}],[224,{"left":"$self->requires_autofill","type":"and_3","right":"not $self->{'autofill'}","op":"and"}],[225,{"op":"and","right":"not $self->allows_autofill","type":"and_3","left":"$self->{'autofill'}"}],[230,{"left":"$ref","op":"and","right":"$ref ne \"CODE\"","type":"and_3"}],[235,{"type":"or_2","right":"'not a ref'","op":"||","left":"ref $val"}],[240,{"left":"$self->{'category'}","type":"or_2","right":"\"NO CATEGORY - FIX ME\"","op":"//="}],[241,{"type":"or_2","right":"\"NO DESCRIPTION - FIX ME\"","op":"//=","left":"$self->{'description'}"}],[275,{"right":"last","type":"and_2","op":"and","left":"$ok = 1"}],[276,{"left":"$ok = 1","op":"and","type":"and_2","right":"last"}],[276,{"left":"0 + $c","op":"and","right":"0 + $v","type":"and_3"}],[276,{"left":"0 + $c and 0 + $v","op":"and","type":"and_3","right":"$c == $v"}],[298,{"left":"$self->prefix","op":"//","right":"\"\"","type":"or_2"}],[301,{"right":"[]","type":"or_2","op":"//","left":"$self->{'alt'}"}],[302,{"right":"[]","type":"or_2","op":"//","left":"$self->{'alt'}"}],[303,{"type":"or_2","right":"[]","op":"//","left":"$self->{'alt_no'}"}],[318,{"left":"$params->{'groups'}","op":"//","right":"{}","type":"or_2"}],[380,{"left":"$1","op":"//","type":"or_2","right":"\"\""}],[382,{"type":"or_2","right":"\"\"","op":"//","left":"$1"}],[388,{"op":"//","right":"[]","type":"or_2","left":"$self->{'alt_no'}"}],[397,{"type":"or_3","right":"-t STDOUT","op":"//=","left":"$params{'color'}"}],[405,{"right":"[]","type":"or_2","op":"//","left":"$forms"}],[406,{"left":"$no_forms","type":"or_2","right":"[]","op":"//"}],[407,{"op":"//","right":"[]","type":"or_2","left":"$other_forms"}],[413,{"op":"//","type":"or_2","right":"[]","left":"$forms"}],[414,{"left":"$no_forms","type":"or_2","right":"[]","op":"//"}],[415,{"left":"$other_forms","type":"or_2","right":"[]","op":"//"}],[432,{"type":"or_3","right":"$self->$field","op":"||","left":"$self->$t"}],[432,{"left":"($self->$t || $self->$field)","op":"//","type":"or_2","right":"(next)"}]],"statement":[2,2,2,3,3,3,5,5,5,12,12,12,13,13,13,54,54,17,274,274,274,56,57,58,59,60,62,63,65,66,68,70,71,73,74,80,81,83,85,87,88,89,93,95,96,96,97,98,99,101,102,103,106,110,112,116,117,119,121,122,123,124,126,130,131,133,134,138,139,140,144,145,146,150,151,152,153,157,159,159,163,164,165,169,170,170,171,171,175,176,176,177,177,181,184,187,190,193,196,199,202,204,206,207,208,211,212,214,215,215,216,217,222,224,225,227,228,229,230,233,234,235,236,237,240,241,243,244,247,251,252,254,256,258,259,261,262,263,264,265,268,271,272,273,275,276,280,282,284,287,291,292,294,296,298,299,301,301,301,302,302,302,303,303,303,305,306,307,309,313,314,316,318,320,322,323,324,328,332,333,335,337,338,341,345,346,348,350,351,352,355,356,360,361,363,364,366,367,367,369,369,370,370,373,374,375,375,379,379,380,381,382,383,386,387,388,388,388,390,394,395,397,399,401,402,407,405,405,406,406,407,407,415,413,414,415,419,421,421,422,422,423,423,425,426,427,427,427,430,431,432,433,434,437,438,441,444,448,449,451,453,453,453,455,457,457,457,458,458,458,459,459,459,461,462,462,462,464]}����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������416b69c8408206cdd3a54ba7fb914057��������������������������������������������������������������������100644��001750��001750�� 3111�15165554207� 24476� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������{"digest":"416b69c8408206cdd3a54ba7fb914057","branch":[[22,{"text":"unless $var =~ /^!/"}],[23,{"text":"$$ref ? :"}]],"subroutine":[[2,"BEGIN"],[3,"BEGIN"],[7,"BEGIN"],[8,"BEGIN"],[10,"allows_default"],[11,"allows_arg"],[12,"requires_arg"],[13,"allows_autofill"],[14,"requires_autofill"],[16,"can_set_env"],[19,"get_env_value"]],"statement":[2,2,2,3,3,3,7,7,7,8,8,8,10,11,12,13,14,16,19,20,22,23],"start":{"8":{"BEGIN":[{"subroutine":3,"branch":null,"condition":null,"statement":9,"time":null}]},"3":{"BEGIN":[{"branch":null,"subroutine":1,"time":null,"statement":3,"condition":null}]},"-1":{"__COVER__":[{"subroutine":11,"branch":2,"condition":null,"statement":22,"time":null}]},"16":{"can_set_env":[{"subroutine":9,"branch":null,"condition":null,"statement":17,"time":null}]},"19":{"get_env_value":[{"branch":null,"subroutine":10,"time":null,"statement":18,"condition":null}]},"13":{"allows_autofill":[{"subroutine":7,"branch":null,"condition":null,"statement":15,"time":null}]},"2":{"BEGIN":[{"subroutine":null,"branch":null,"condition":null,"time":null,"statement":null}]},"12":{"requires_arg":[{"time":null,"statement":14,"condition":null,"branch":null,"subroutine":6}]},"14":{"requires_autofill":[{"subroutine":8,"branch":null,"condition":null,"statement":16,"time":null}]},"7":{"BEGIN":[{"branch":null,"subroutine":2,"time":null,"statement":6,"condition":null}]},"10":{"allows_default":[{"branch":null,"subroutine":4,"statement":12,"time":null,"condition":null}]},"11":{"allows_arg":[{"condition":null,"time":null,"statement":13,"subroutine":5,"branch":null}]}},"file":"lib/Getopt/Yath/Option/Auto.pm"}�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������a6b7b00c9e2237d585b5223604d20bb3��������������������������������������������������������������������100644��001750��001750�� 2701�15165554207� 24457� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������{"subroutine":[[2,"BEGIN"],[3,"BEGIN"],[7,"BEGIN"],[8,"BEGIN"],[10,"allows_arg"],[11,"requires_arg"],[12,"allows_autofill"],[13,"requires_autofill"],[15,"inject_default_long_examples"],[16,"inject_default_short_examples"]],"file":"lib/Getopt/Yath/Option/AutoList.pm","start":{"15":{"inject_default_long_examples":[{"statement":16,"time":null,"condition":null,"branch":null,"subroutine":8}]},"3":{"BEGIN":[{"branch":null,"subroutine":1,"time":null,"statement":3,"condition":null}]},"12":{"allows_autofill":[{"condition":null,"statement":14,"time":null,"subroutine":6,"branch":null}]},"8":{"BEGIN":[{"statement":9,"time":null,"condition":null,"branch":null,"subroutine":3}]},"2":{"BEGIN":[{"statement":null,"time":null,"condition":null,"branch":null,"subroutine":null}]},"13":{"requires_autofill":[{"statement":15,"time":null,"condition":null,"branch":null,"subroutine":7}]},"-1":{"__COVER__":[{"time":null,"statement":18,"condition":null,"branch":null,"subroutine":10}]},"16":{"inject_default_short_examples":[{"condition":null,"time":null,"statement":17,"subroutine":9,"branch":null}]},"7":{"BEGIN":[{"statement":6,"time":null,"condition":null,"branch":null,"subroutine":2}]},"11":{"requires_arg":[{"subroutine":5,"branch":null,"condition":null,"time":null,"statement":13}]},"10":{"allows_arg":[{"subroutine":4,"branch":null,"condition":null,"statement":12,"time":null}]}},"statement":[2,2,2,3,3,3,7,7,7,8,8,8,10,11,12,13,15,16],"digest":"a6b7b00c9e2237d585b5223604d20bb3"}���������������������������������������������������������������97ba764446ce74b6c33a1ab4b586dfaf��������������������������������������������������������������������100644��001750��001750�� 3043�15165554207� 25010� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������{"digest":"97ba764446ce74b6c33a1ab4b586dfaf","subroutine":[[2,"BEGIN"],[3,"BEGIN"],[7,"BEGIN"],[8,"BEGIN"],[10,"allows_arg"],[11,"requires_arg"],[12,"allows_default"],[13,"allows_autofill"],[14,"requires_autofill"],[16,"default_long_examples"],[17,"default_short_examples"]],"statement":[2,2,2,3,3,3,7,7,7,8,8,8,10,11,12,13,14,16,17],"file":"lib/Getopt/Yath/Option/AutoMap.pm","start":{"8":{"BEGIN":[{"branch":null,"subroutine":3,"time":null,"statement":9,"condition":null}]},"3":{"BEGIN":[{"branch":null,"subroutine":1,"statement":3,"time":null,"condition":null}]},"17":{"default_short_examples":[{"condition":null,"time":null,"statement":18,"subroutine":10,"branch":null}]},"16":{"default_long_examples":[{"subroutine":9,"branch":null,"condition":null,"statement":17,"time":null}]},"-1":{"__COVER__":[{"subroutine":11,"branch":null,"condition":null,"statement":19,"time":null}]},"2":{"BEGIN":[{"branch":null,"subroutine":null,"time":null,"statement":null,"condition":null}]},"13":{"allows_autofill":[{"branch":null,"subroutine":7,"statement":15,"time":null,"condition":null}]},"12":{"allows_default":[{"subroutine":6,"branch":null,"condition":null,"time":null,"statement":14}]},"14":{"requires_autofill":[{"statement":16,"time":null,"condition":null,"branch":null,"subroutine":8}]},"10":{"allows_arg":[{"condition":null,"time":null,"statement":12,"subroutine":4,"branch":null}]},"11":{"requires_arg":[{"branch":null,"subroutine":5,"time":null,"statement":13,"condition":null}]},"7":{"BEGIN":[{"branch":null,"subroutine":2,"time":null,"statement":6,"condition":null}]}}}���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������3502465c9985752ba64a6402725cd6e0��������������������������������������������������������������������100644��001750��001750�� 2252�15165554207� 24267� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������{"digest":"3502465c9985752ba64a6402725cd6e0","subroutine":[[2,"BEGIN"],[3,"BEGIN"],[7,"BEGIN"],[9,"BEGIN"],[10,"BEGIN"],[13,"BEGIN"],[17,"default_long_examples"],[26,"default_short_examples"]],"file":"lib/Getopt/Yath/Option/AutoPathList.pm","start":{"3":{"BEGIN":[{"condition":null,"time":null,"statement":3,"subroutine":1,"branch":null}]},"26":{"default_short_examples":[{"branch":null,"subroutine":7,"time":null,"statement":21,"condition":null}]},"10":{"BEGIN":[{"condition":null,"time":null,"statement":12,"subroutine":4,"branch":null}]},"7":{"BEGIN":[{"branch":null,"subroutine":2,"time":null,"statement":6,"condition":null}]},"17":{"default_long_examples":[{"condition":null,"statement":16,"time":null,"subroutine":6,"branch":null}]},"2":{"BEGIN":[{"branch":null,"subroutine":null,"statement":null,"time":null,"condition":null}]},"13":{"BEGIN":[{"condition":null,"statement":15,"time":null,"subroutine":5,"branch":null}]},"9":{"BEGIN":[{"subroutine":3,"branch":null,"condition":null,"statement":9,"time":null}]},"-1":{"__COVER__":[{"branch":null,"subroutine":8,"time":null,"statement":26,"condition":null}]}},"statement":[2,2,2,3,3,3,7,7,7,9,9,9,10,10,10,13,17,18,20,21,22,26,27,29,30,31]}������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������e169eb9cf9ee8f25fe6c90a46c963bb0��������������������������������������������������������������������100644��001750��001750�� 4717�15165554207� 25123� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������{"digest":"e169eb9cf9ee8f25fe6c90a46c963bb0","subroutine":[[2,"BEGIN"],[3,"BEGIN"],[7,"BEGIN"],[8,"BEGIN"],[10,"allows_shortval"],[11,"allows_default"],[12,"allows_arg"],[13,"requires_arg"],[14,"allows_autofill"],[15,"requires_autofill"],[17,"no_arg_value"],[20,"is_populated"],[22,"add_value"],[23,"clear_field"],[27,"get_default_value"],[32,"can_set_env"],[35,"get_env_value"]],"branch":[[20,{"text":"defined ${$_[1];} ? :"}],[28,{"text":"if $self->{'maybe'}"}],[29,{"text":"$self->SUPER::get_default_value(@_) ? :"}],[38,{"text":"$$ref ? :"}],[39,{"text":"unless $var =~ /^!/"}],[40,{"text":"$b ? :"}]],"file":"lib/Getopt/Yath/Option/Bool.pm","start":{"35":{"get_env_value":[{"subroutine":16,"branch":3,"condition":null,"time":null,"statement":29}]},"12":{"allows_arg":[{"subroutine":6,"branch":null,"condition":null,"statement":14,"time":null}]},"14":{"allows_autofill":[{"subroutine":8,"branch":null,"condition":null,"time":null,"statement":16}]},"27":{"get_default_value":[{"condition":null,"statement":25,"time":null,"subroutine":14,"branch":1}]},"23":{"clear_field":[{"subroutine":13,"branch":1,"condition":null,"statement":23,"time":null}]},"7":{"BEGIN":[{"branch":null,"subroutine":2,"time":null,"statement":6,"condition":null}]},"10":{"allows_shortval":[{"statement":12,"time":null,"condition":null,"branch":null,"subroutine":4}]},"11":{"allows_default":[{"subroutine":5,"branch":null,"condition":null,"statement":13,"time":null}]},"20":{"is_populated":[{"time":null,"statement":19,"condition":null,"branch":null,"subroutine":11}]},"8":{"BEGIN":[{"branch":null,"subroutine":3,"time":null,"statement":9,"condition":null}]},"3":{"BEGIN":[{"subroutine":1,"branch":null,"condition":null,"time":null,"statement":3}]},"15":{"requires_autofill":[{"branch":null,"subroutine":9,"statement":17,"time":null,"condition":null}]},"32":{"can_set_env":[{"subroutine":15,"branch":3,"condition":null,"time":null,"statement":28}]},"17":{"no_arg_value":[{"branch":null,"subroutine":10,"time":null,"statement":18,"condition":null}]},"22":{"add_value":[{"condition":null,"statement":21,"time":null,"subroutine":12,"branch":1}]},"-1":{"__COVER__":[{"condition":null,"statement":34,"time":null,"subroutine":17,"branch":6}]},"2":{"BEGIN":[{"condition":null,"time":null,"statement":null,"subroutine":null,"branch":null}]},"13":{"requires_arg":[{"condition":null,"time":null,"statement":15,"subroutine":7,"branch":null}]}},"statement":[2,2,2,3,3,3,7,7,7,8,8,8,10,11,12,13,14,15,17,20,20,22,22,23,23,27,28,29,32,35,36,38,39,40]}�������������������������������������������������d3e7a78339f259ed5077b808dc815c12��������������������������������������������������������������������100644��001750��001750�� 5464�15165554207� 24535� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������{"statement":[2,2,2,3,3,3,7,7,7,9,9,9,10,10,10,12,13,14,15,16,18,20,23,24,26,28,31,34,36,37,41,42,43,44,48,49,50,51,55,56,67,59,62,64,65,66,71,72,74,76,77,78,80],"file":"lib/Getopt/Yath/Option/BoolMap.pm","start":{"12":{"allows_list":[{"subroutine":5,"branch":null,"condition":null,"time":null,"statement":15}]},"14":{"allows_arg":[{"subroutine":7,"branch":null,"condition":null,"statement":17,"time":null}]},"71":{"doc_forms":[{"time":null,"statement":46,"condition":null,"branch":5,"subroutine":19}]},"23":{"init":[{"subroutine":12,"branch":1,"condition":null,"time":null,"statement":22}]},"41":{"default_long_examples":[{"branch":2,"subroutine":15,"statement":30,"time":null,"condition":null}]},"10":{"BEGIN":[{"statement":12,"time":null,"condition":null,"branch":null,"subroutine":4}]},"7":{"BEGIN":[{"branch":null,"subroutine":2,"statement":6,"time":null,"condition":null}]},"20":{"requires_arg":[{"condition":null,"statement":21,"time":null,"subroutine":11,"branch":null}]},"3":{"BEGIN":[{"subroutine":1,"branch":null,"condition":null,"statement":3,"time":null}]},"34":{"pattern":[{"condition":null,"statement":27,"time":null,"subroutine":14,"branch":2}]},"55":{"custom_matches":[{"subroutine":17,"branch":2,"condition":null,"time":null,"statement":38}]},"15":{"allows_autofill":[{"condition":null,"statement":18,"time":null,"subroutine":8,"branch":null}]},"18":{"notes":[{"subroutine":10,"branch":null,"condition":null,"statement":20,"time":null}]},"48":{"default_short_examples":[{"time":null,"statement":34,"condition":null,"branch":2,"subroutine":16}]},"16":{"requires_autofill":[{"time":null,"statement":19,"condition":null,"branch":null,"subroutine":9}]},"9":{"BEGIN":[{"time":null,"statement":9,"condition":null,"branch":null,"subroutine":3}]},"31":{"no_arg_value":[{"branch":2,"subroutine":13,"statement":26,"time":null,"condition":null}]},"-1":{"__COVER__":[{"statement":53,"time":null,"condition":null,"branch":5,"subroutine":20}]},"2":{"BEGIN":[{"condition":null,"time":null,"statement":null,"subroutine":null,"branch":null}]},"13":{"allows_default":[{"condition":null,"statement":16,"time":null,"subroutine":6,"branch":null}]},"59":{"__ANON__":[{"branch":5,"subroutine":18,"statement":46,"time":null,"condition":null}]}},"digest":"d3e7a78339f259ed5077b808dc815c12","branch":[[20,{"text":"$_[0]{'requires_arg'} ? :"}],[26,{"text":"unless $self->{'pattern'}"}],[62,{"text":"if $self->{'custom_matches'}"}],[64,{"text":"unless $input =~ /$pattern/"}],[66,{"text":"$no ? :"}]],"subroutine":[[2,"BEGIN"],[3,"BEGIN"],[7,"BEGIN"],[9,"BEGIN"],[10,"BEGIN"],[12,"allows_list"],[13,"allows_default"],[14,"allows_arg"],[15,"allows_autofill"],[16,"requires_autofill"],[18,"notes"],[20,"requires_arg"],[23,"init"],[31,"no_arg_value"],[34,"pattern"],[41,"default_long_examples"],[48,"default_short_examples"],[55,"custom_matches"],[59,"__ANON__"],[71,"doc_forms"]]}������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������eb8bc1a2c2dfe8bb39eb83c8ede73cba��������������������������������������������������������������������100644��001750��001750�� 5576�15165554207� 25457� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������{"digest":"eb8bc1a2c2dfe8bb39eb83c8ede73cba","statement":[2,2,2,3,3,3,5,5,5,9,9,9,10,10,10,12,13,14,15,16,17,19,21,21,24,26,26,27,27,29,34,35,38,41,44,44,47,50,51,53,54],"start":{"21":{"clear_field":[{"condition":null,"statement":22,"time":null,"subroutine":12,"branch":null}]},"3":{"BEGIN":[{"branch":null,"subroutine":1,"time":null,"statement":3,"condition":null}]},"34":{"add_value":[{"time":null,"statement":30,"condition":1,"branch":null,"subroutine":17}]},"15":{"allows_autofill":[{"subroutine":8,"branch":null,"condition":null,"time":null,"statement":18}]},"17":{"is_populated":[{"subroutine":10,"branch":null,"condition":null,"time":null,"statement":20}]},"24":{"get_autofill_value":[{"condition":null,"time":null,"statement":24,"subroutine":13,"branch":null}]},"47":{"can_set_env":[{"time":null,"statement":36,"condition":2,"branch":1,"subroutine":18}]},"16":{"requires_autofill":[{"time":null,"statement":19,"condition":null,"branch":null,"subroutine":9}]},"9":{"BEGIN":[{"subroutine":3,"branch":null,"condition":null,"statement":9,"time":null}]},"-1":{"__COVER__":[{"condition":2,"statement":41,"time":null,"subroutine":20,"branch":3}]},"13":{"allows_arg":[{"branch":null,"subroutine":6,"time":null,"statement":16,"condition":null}]},"2":{"BEGIN":[{"subroutine":null,"branch":null,"condition":null,"time":null,"statement":null}]},"19":{"no_arg_value":[{"time":null,"statement":21,"condition":null,"branch":null,"subroutine":11}]},"12":{"allows_shortval":[{"statement":15,"time":null,"condition":null,"branch":null,"subroutine":5}]},"14":{"requires_arg":[{"branch":null,"subroutine":7,"statement":17,"time":null,"condition":null}]},"27":{"default_short_examples":[{"condition":1,"time":null,"statement":27,"subroutine":15,"branch":null}]},"5":{"BEGIN":[{"condition":null,"time":null,"statement":6,"subroutine":2,"branch":null}]},"29":{"notes":[{"subroutine":16,"branch":null,"condition":1,"statement":29,"time":null}]},"26":{"default_long_examples":[{"time":null,"statement":25,"condition":1,"branch":null,"subroutine":14}]},"10":{"BEGIN":[{"condition":null,"statement":12,"time":null,"subroutine":4,"branch":null}]},"50":{"get_env_value":[{"branch":1,"subroutine":19,"statement":37,"time":null,"condition":2}]}},"file":"lib/Getopt/Yath/Option/Count.pm","condition":[[24,{"left":"$_[0]->SUPER::get_autofill_value","op":"//","type":"or_2","right":"0"}],[41,{"right":"$self->get_autofill_value","type":"or_3","op":"//=","left":"$$ref"}]],"branch":[[38,{"text":"if @val"}],[53,{"text":"unless $var =~ /^!/"}],[54,{"text":"$$ref ? :"}]],"subroutine":[[2,"BEGIN"],[3,"BEGIN"],[5,"BEGIN"],[9,"BEGIN"],[10,"BEGIN"],[12,"allows_shortval"],[13,"allows_arg"],[14,"requires_arg"],[15,"allows_autofill"],[16,"requires_autofill"],[17,"is_populated"],[19,"no_arg_value"],[21,"clear_field"],[24,"get_autofill_value"],[26,"default_long_examples"],[27,"default_short_examples"],[29,"notes"],[34,"add_value"],[47,"can_set_env"],[50,"get_env_value"]]}����������������������������������������������������������������������������������������������������������������������������������123a2812c394bf08bb84455b37b6292d��������������������������������������������������������������������100644��001750��001750�� 7053�15165554207� 24422� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������{"condition":[[25,{"type":"or_2","right":"[]","op":"//","left":"$self->_get___value(\"clear\", @_)"}],[41,{"left":"$self->_get___value(\"initialize\")","op":"//","right":"[]","type":"or_2"}],[47,{"left":"$self->maybe","op":"and","right":"not @val","type":"and_3"}]],"branch":[[21,{"text":"if ${$_[1];}"}],[34,{"text":"unless $env"}],[35,{"text":"if defined $ENV{$name}"}],[38,{"text":"if @val"}],[40,{"text":"if $self->{'maybe'}"}],[47,{"text":"if $self->maybe and not @val"}],[58,{"text":"unless (eval {\n\tdo {\n\tlocal $SIG{'__DIE__'};\n$out = decode_json($input[0]);\n1\n}\n})"}],[55,{"text":"if ($input[0] =~ /^\\s*\\[.*\\]\\s*$/s)"}],[67,{"text":"if (my $on = $self->split_on) { }"}]],"subroutine":[[2,"BEGIN"],[3,"BEGIN"],[7,"BEGIN"],[9,"BEGIN"],[10,"BEGIN"],[12,"allows_list"],[13,"allows_arg"],[14,"requires_arg"],[15,"allows_default"],[16,"allows_autofill"],[17,"requires_autofill"],[19,"notes"],[21,"is_populated"],[24,"get_clear_value"],[29,"get_initial_value"],[45,"add_value"],[52,"normalize_value"],[77,"inject_default_long_examples"],[78,"inject_default_short_examples"],[81,"default_long_examples"],[90,"default_short_examples"]],"digest":"123a2812c394bf08bb84455b37b6292d","statement":[2,2,2,3,3,3,7,7,7,9,9,9,10,10,10,12,13,14,15,16,17,19,21,21,21,21,24,25,29,31,33,34,34,35,38,40,41,45,46,47,48,48,52,53,55,56,57,58,58,58,58,59,60,61,63,66,67,68,68,68,71,71,74,77,78,81,82,84,85,86,90,91,93,94,95],"start":{"13":{"allows_arg":[{"time":null,"statement":16,"condition":null,"branch":null,"subroutine":6}]},"19":{"notes":[{"branch":null,"subroutine":11,"time":null,"statement":21,"condition":null}]},"9":{"BEGIN":[{"condition":null,"time":null,"statement":9,"subroutine":3,"branch":null}]},"-1":{"__COVER__":[{"condition":3,"statement":75,"time":null,"subroutine":21,"branch":9}]},"16":{"allows_autofill":[{"condition":null,"statement":19,"time":null,"subroutine":9,"branch":null}]},"17":{"requires_autofill":[{"statement":20,"time":null,"condition":null,"branch":null,"subroutine":10}]},"15":{"allows_default":[{"time":null,"statement":18,"condition":null,"branch":null,"subroutine":8}]},"78":{"inject_default_short_examples":[{"statement":64,"time":null,"condition":3,"branch":9,"subroutine":18}]},"45":{"add_value":[{"condition":2,"statement":37,"time":null,"subroutine":15,"branch":5}]},"21":{"is_populated":[{"statement":22,"time":null,"condition":null,"branch":null,"subroutine":12}]},"14":{"requires_arg":[{"statement":17,"time":null,"condition":null,"branch":null,"subroutine":7}]},"81":{"default_long_examples":[{"condition":3,"statement":65,"time":null,"subroutine":19,"branch":9}]},"2":{"BEGIN":[{"subroutine":null,"branch":null,"condition":null,"time":null,"statement":null}]},"24":{"get_clear_value":[{"statement":26,"time":null,"condition":null,"branch":1,"subroutine":13}]},"77":{"inject_default_long_examples":[{"subroutine":17,"branch":9,"condition":3,"time":null,"statement":63}]},"90":{"default_short_examples":[{"branch":9,"subroutine":20,"time":null,"statement":70,"condition":3}]},"3":{"BEGIN":[{"statement":3,"time":null,"condition":null,"branch":null,"subroutine":1}]},"7":{"BEGIN":[{"condition":null,"statement":6,"time":null,"subroutine":2,"branch":null}]},"10":{"BEGIN":[{"branch":null,"subroutine":4,"time":null,"statement":12,"condition":null}]},"29":{"get_initial_value":[{"subroutine":14,"branch":1,"condition":1,"statement":28,"time":null}]},"52":{"normalize_value":[{"statement":42,"time":null,"condition":3,"branch":6,"subroutine":16}]},"12":{"allows_list":[{"condition":null,"time":null,"statement":15,"subroutine":5,"branch":null}]}},"file":"lib/Getopt/Yath/Option/List.pm"}�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������6a827e48e74afc25312686ca19d59be8��������������������������������������������������������������������100644��001750��001750�� 7464�15165554207� 24621� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������{"subroutine":[[2,"BEGIN"],[3,"BEGIN"],[7,"BEGIN"],[9,"BEGIN"],[10,"BEGIN"],[12,"allows_list"],[13,"allows_default"],[14,"allows_arg"],[15,"requires_arg"],[16,"allows_autofill"],[17,"requires_autofill"],[19,"notes"],[22,"_example_append"],[41,"default_long_examples"],[50,"default_short_examples"],[59,"init"],[66,"is_populated"],[69,"get_initial_value"],[86,"get_clear_value"],[91,"add_value"],[105,"normalize_value"]],"branch":[[25,{"text":"unless $self->allows_list"}],[66,{"text":"if ${$_[1];}"}],[74,{"text":"unless $env"}],[75,{"text":"if defined $ENV{$name}"}],[78,{"text":"if keys %val"}],[80,{"text":"if $self->{'maybe'}"}],[94,{"text":"unless keys %vals"}],[108,{"text":"if @input > 1"}],[113,{"text":"unless (eval {\n\tdo {\n\tlocal $SIG{'__DIE__'};\n$out = decode_json($input[0]);\n1\n}\n})"}],[110,{"text":"if ($input[0] =~ /^\\s*\\{.*\\}\\s*$/s)"}],[122,{"text":"if (my $on = $self->split_on) { }"}]],"condition":[[27,{"left":"$params->{'groups'}","type":"or_2","right":"{}","op":"//"}],[63,{"op":"//=","right":"\"=\"","type":"or_2","left":"$self->{'key_on'}"}],[82,{"op":"//","right":"{}","type":"or_2","left":"$self->_get___value(\"initialize\")"}],[87,{"right":"{}","type":"or_2","op":"//","left":"$self->_get___value(\"clear\", @_)"}],[96,{"op":"//=","type":"or_2","right":"{}","left":"$$ref"}],[129,{"left":"$self->key_on","right":"\"=\"","type":"or_2","op":"//"}]],"digest":"6a827e48e74afc25312686ca19d59be8","start":{"12":{"allows_list":[{"time":null,"statement":15,"condition":null,"branch":null,"subroutine":5}]},"14":{"allows_arg":[{"statement":17,"time":null,"condition":null,"branch":null,"subroutine":7}]},"105":{"normalize_value":[{"branch":7,"subroutine":20,"time":null,"statement":64,"condition":5}]},"41":{"default_long_examples":[{"branch":1,"subroutine":13,"statement":31,"time":null,"condition":1}]},"86":{"get_clear_value":[{"subroutine":18,"branch":6,"condition":3,"time":null,"statement":55}]},"10":{"BEGIN":[{"statement":12,"time":null,"condition":null,"branch":null,"subroutine":4}]},"7":{"BEGIN":[{"branch":null,"subroutine":2,"statement":6,"time":null,"condition":null}]},"50":{"default_short_examples":[{"subroutine":14,"branch":1,"condition":1,"statement":35,"time":null}]},"15":{"requires_arg":[{"time":null,"statement":18,"condition":null,"branch":null,"subroutine":8}]},"69":{"get_initial_value":[{"branch":2,"subroutine":17,"statement":46,"time":null,"condition":2}]},"3":{"BEGIN":[{"subroutine":1,"branch":null,"condition":null,"time":null,"statement":3}]},"66":{"is_populated":[{"subroutine":16,"branch":1,"condition":2,"time":null,"statement":42}]},"91":{"add_value":[{"condition":4,"statement":57,"time":null,"subroutine":19,"branch":6}]},"16":{"allows_autofill":[{"time":null,"statement":19,"condition":null,"branch":null,"subroutine":9}]},"-1":{"__COVER__":[{"branch":11,"subroutine":21,"time":null,"statement":89,"condition":6}]},"9":{"BEGIN":[{"time":null,"statement":9,"condition":null,"branch":null,"subroutine":3}]},"13":{"allows_default":[{"condition":null,"time":null,"statement":16,"subroutine":6,"branch":null}]},"2":{"BEGIN":[{"subroutine":null,"branch":null,"condition":null,"statement":null,"time":null}]},"19":{"notes":[{"statement":21,"time":null,"condition":null,"branch":null,"subroutine":11}]},"59":{"init":[{"condition":1,"time":null,"statement":39,"subroutine":15,"branch":1}]},"17":{"requires_autofill":[{"statement":20,"time":null,"condition":null,"branch":null,"subroutine":10}]},"22":{"_example_append":[{"branch":null,"subroutine":12,"statement":22,"time":null,"condition":null}]}},"file":"lib/Getopt/Yath/Option/Map.pm","statement":[2,2,2,3,3,3,7,7,7,9,9,9,10,10,10,12,13,14,15,16,17,19,22,23,25,27,29,31,32,33,37,41,42,44,46,50,51,53,55,59,61,63,66,66,66,66,69,71,73,74,74,75,78,80,82,86,87,91,92,94,96,99,98,99,105,106,108,110,111,112,113,113,113,113,114,115,116,118,121,122,123,123,123,126,129,130,130,130,132]}������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fa9c9542d07de5fed488a0ccd13644ce��������������������������������������������������������������������100644��001750��001750�� 2206�15165554207� 25073� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������{"digest":"fa9c9542d07de5fed488a0ccd13644ce","statement":[2,2,2,3,3,3,7,7,7,8,8,8,11,12,14,15,16,17,20,24,28,29,31,32,33,37,38,40,41,42],"start":{"28":{"default_long_examples":[{"condition":null,"statement":20,"time":null,"subroutine":5,"branch":1}]},"3":{"BEGIN":[{"condition":null,"statement":3,"time":null,"subroutine":1,"branch":null}]},"8":{"BEGIN":[{"statement":9,"time":null,"condition":null,"branch":null,"subroutine":3}]},"7":{"BEGIN":[{"condition":null,"time":null,"statement":6,"subroutine":2,"branch":null}]},"11":{"normalize_value":[{"branch":null,"subroutine":4,"time":null,"statement":12,"condition":null}]},"37":{"default_short_examples":[{"branch":1,"subroutine":6,"statement":25,"time":null,"condition":null}]},"2":{"BEGIN":[{"branch":null,"subroutine":null,"time":null,"statement":null,"condition":null}]},"-1":{"__COVER__":[{"branch":1,"subroutine":7,"time":null,"statement":30,"condition":null}]}},"file":"lib/Getopt/Yath/Option/PathList.pm","branch":[[16,{"text":"if ($val =~ /\\*/) { }"}]],"subroutine":[[2,"BEGIN"],[3,"BEGIN"],[7,"BEGIN"],[8,"BEGIN"],[11,"normalize_value"],[28,"default_long_examples"],[37,"default_short_examples"]]}������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������77cca76ea82c90e86e9c2d1d1fe60337��������������������������������������������������������������������100644��001750��001750�� 3536�15165554207� 24746� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������{"branch":[[16,{"text":"defined ${$_[1];} ? :"}],[26,{"text":"unless $var =~ /^!/"}],[27,{"text":"$$ref ? :"}]],"subroutine":[[2,"BEGIN"],[3,"BEGIN"],[7,"BEGIN"],[8,"BEGIN"],[10,"allows_default"],[11,"allows_arg"],[12,"requires_arg"],[13,"allows_autofill"],[14,"requires_autofill"],[16,"is_populated"],[18,"add_value"],[20,"can_set_env"],[23,"get_env_value"]],"statement":[2,2,2,3,3,3,7,7,7,8,8,8,10,11,12,13,14,16,16,18,18,20,23,24,26,27],"file":"lib/Getopt/Yath/Option/Scalar.pm","start":{"-1":{"__COVER__":[{"branch":3,"subroutine":13,"statement":26,"time":null,"condition":null}]},"16":{"is_populated":[{"time":null,"statement":17,"condition":null,"branch":null,"subroutine":9}]},"2":{"BEGIN":[{"subroutine":null,"branch":null,"condition":null,"statement":null,"time":null}]},"13":{"allows_autofill":[{"time":null,"statement":15,"condition":null,"branch":null,"subroutine":7}]},"18":{"add_value":[{"statement":19,"time":null,"condition":null,"branch":1,"subroutine":10}]},"20":{"can_set_env":[{"subroutine":11,"branch":1,"condition":null,"time":null,"statement":21}]},"8":{"BEGIN":[{"statement":9,"time":null,"condition":null,"branch":null,"subroutine":3}]},"3":{"BEGIN":[{"condition":null,"statement":3,"time":null,"subroutine":1,"branch":null}]},"7":{"BEGIN":[{"subroutine":2,"branch":null,"condition":null,"time":null,"statement":6}]},"10":{"allows_default":[{"condition":null,"time":null,"statement":12,"subroutine":4,"branch":null}]},"11":{"allows_arg":[{"subroutine":5,"branch":null,"condition":null,"time":null,"statement":13}]},"23":{"get_env_value":[{"subroutine":12,"branch":1,"condition":null,"statement":22,"time":null}]},"12":{"requires_arg":[{"condition":null,"time":null,"statement":14,"subroutine":6,"branch":null}]},"14":{"requires_autofill":[{"subroutine":8,"branch":null,"condition":null,"statement":16,"time":null}]}},"digest":"77cca76ea82c90e86e9c2d1d1fe60337"}������������������������������������������������������������������������������������������������������������������������������������������������������������������5935a1c1dc8a7b5d8a398c10d88be35b��������������������������������������������������������������������100644��001750��001750�� 4546�15165554207� 24740� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������{"statement":[2,2,2,3,3,3,7,7,7,9,9,9,11,11,11,14,15,17,19,21,25,26,28,30,32,34,37,40,41,43,45,48,52,53,55,59,60,62,67,69,70,72,74,76,80,81,83,84,88,89,91,92,96,97],"start":{"2":{"BEGIN":[{"branch":null,"subroutine":null,"statement":null,"time":null,"condition":null}]},"80":{"FROM_JSON_FILE":[{"time":null,"statement":44,"condition":2,"branch":8,"subroutine":12}]},"59":{"delete_group":[{"condition":2,"statement":35,"time":null,"subroutine":10,"branch":6}]},"9":{"BEGIN":[{"branch":null,"subroutine":3,"time":null,"statement":9,"condition":null}]},"-1":{"__COVER__":[{"condition":2,"statement":54,"time":null,"subroutine":15,"branch":8}]},"3":{"BEGIN":[{"subroutine":1,"branch":null,"condition":null,"statement":3,"time":null}]},"67":{"AUTOLOAD":[{"time":null,"statement":38,"condition":2,"branch":6,"subroutine":11}]},"11":{"BEGIN":[{"condition":null,"time":null,"statement":12,"subroutine":4,"branch":null}]},"7":{"BEGIN":[{"condition":null,"time":null,"statement":6,"subroutine":2,"branch":null}]},"40":{"group":[{"statement":27,"time":null,"condition":2,"branch":3,"subroutine":8}]},"37":{"check_group":[{"condition":1,"time":null,"statement":26,"subroutine":7,"branch":3}]},"25":{"maybe":[{"condition":null,"time":null,"statement":20,"subroutine":6,"branch":1}]},"88":{"FROM_JSON":[{"condition":2,"statement":48,"time":null,"subroutine":13,"branch":8}]},"14":{"new":[{"condition":null,"statement":15,"time":null,"subroutine":5,"branch":null}]},"52":{"create_group":[{"branch":5,"subroutine":9,"statement":32,"time":null,"condition":2}]},"96":{"TO_JSON":[{"condition":2,"statement":52,"time":null,"subroutine":14,"branch":8}]}},"file":"lib/Getopt/Yath/Settings.pm","digest":"5935a1c1dc8a7b5d8a398c10d88be35b","condition":[[34,{"op":"//","type":"or_3","right":"$default","left":"$g->$opt"}],[37,{"left":"$_[0]{$_[1]}","right":"0","type":"or_2","op":"//"}]],"branch":[[15,{"text":"@_ == 1 ? :"}],[28,{"text":"unless $self->check_group($group)"}],[32,{"text":"unless $g->check_option($opt)"}],[43,{"text":"if $self->{$group}"}],[45,{"text":"if $vivify"}],[55,{"text":"@vals == 1 ? :"}],[72,{"text":"if $group eq \"DESTROY\""}],[74,{"text":"unless ref $this"}]],"subroutine":[[2,"BEGIN"],[3,"BEGIN"],[7,"BEGIN"],[9,"BEGIN"],[11,"BEGIN"],[14,"new"],[25,"maybe"],[37,"check_group"],[40,"group"],[52,"create_group"],[59,"delete_group"],[67,"AUTOLOAD"],[80,"FROM_JSON_FILE"],[88,"FROM_JSON"],[96,"TO_JSON"]]}����������������������������������������������������������������������������������������������������������������������������������������������������������074198fa9d9f930e73513c89f513402e��������������������������������������������������������������������100644��001750��001750�� 4140�15165554207� 24364� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������{"digest":"074198fa9d9f930e73513c89f513402e","statement":[2,2,2,3,3,3,7,7,7,10,11,13,16,16,18,21,22,24,25,27,29,33,34,36,38,42,43,45,47,51,52,54,58,59,60,65,67,68,70,72,74,78,79],"start":{"78":{"TO_JSON":[{"subroutine":12,"branch":8,"condition":1,"statement":41,"time":null}]},"21":{"option":[{"subroutine":6,"branch":2,"condition":null,"time":null,"statement":15}]},"3":{"BEGIN":[{"subroutine":1,"branch":null,"condition":null,"statement":3,"time":null}]},"-1":{"__COVER__":[{"branch":8,"subroutine":13,"statement":43,"time":null,"condition":1}]},"16":{"all":[{"subroutine":4,"branch":1,"condition":null,"time":null,"statement":12}]},"2":{"BEGIN":[{"statement":null,"time":null,"condition":null,"branch":null,"subroutine":null}]},"65":{"AUTOLOAD":[{"branch":6,"subroutine":11,"time":null,"statement":35,"condition":1}]},"58":{"remove_option":[{"statement":32,"time":null,"condition":1,"branch":6,"subroutine":10}]},"18":{"check_option":[{"branch":1,"subroutine":5,"time":null,"statement":14,"condition":null}]},"42":{"option_ref":[{"time":null,"statement":25,"condition":null,"branch":5,"subroutine":8}]},"33":{"create_option":[{"subroutine":7,"branch":5,"condition":null,"statement":21,"time":null}]},"7":{"BEGIN":[{"subroutine":2,"branch":null,"condition":null,"statement":6,"time":null}]},"51":{"delete_option":[{"branch":6,"subroutine":9,"time":null,"statement":29,"condition":1}]},"10":{"new":[{"branch":null,"subroutine":3,"time":null,"statement":9,"condition":null}]}},"file":"lib/Getopt/Yath/Settings/Group.pm","condition":[[45,{"left":"$create","type":"or_3","right":"exists $self->{$name}","op":"or"}]],"branch":[[11,{"text":"@_ != 1 ? :"}],[18,{"text":"exists $_[0]{$_[1]} ? :"}],[24,{"text":"if @vals > 1"}],[25,{"text":"unless exists $self->{$option}"}],[27,{"text":"if @vals"}],[45,{"text":"unless $create or exists $self->{$name}"}],[70,{"text":"if $option eq \"DESTROY\""}],[72,{"text":"unless ref $this"}]],"subroutine":[[2,"BEGIN"],[3,"BEGIN"],[7,"BEGIN"],[10,"new"],[16,"all"],[18,"check_option"],[21,"option"],[33,"create_option"],[42,"option_ref"],[51,"delete_option"],[58,"remove_option"],[65,"AUTOLOAD"],[78,"TO_JSON"]]}��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������f3a721bedf2a61b478c4702a40da962c��������������������������������������������������������������������100644��001750��001750�� 2672�15165554207� 24714� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������{"statement":[2,2,2,3,3,3,8,8,8,10,10,10,13,13,13,14,15,18,19,19,24,26,27,28,29,30,33,35,37,38,39,41,42,43,46,49,51,52,55],"start":{"10":{"BEGIN":[{"condition":null,"statement":9,"time":null,"subroutine":3,"branch":null}]},"24":{"fit_to_width":[{"condition":null,"time":null,"statement":20,"subroutine":5,"branch":1}]},"2":{"BEGIN":[{"subroutine":null,"branch":null,"condition":null,"statement":null,"time":null}]},"13":{"BEGIN":[{"time":null,"statement":12,"condition":null,"branch":null,"subroutine":4}]},"-1":{"__COVER__":[{"branch":8,"subroutine":6,"statement":39,"time":null,"condition":2}]},"3":{"BEGIN":[{"condition":null,"time":null,"statement":3,"subroutine":1,"branch":null}]},"8":{"BEGIN":[{"subroutine":2,"branch":null,"condition":null,"statement":6,"time":null}]}},"condition":[[30,{"left":"$width","op":"and","type":"and_3","right":"$width >= 80"}],[41,{"type":"and_3","right":"length $new > $width","op":"and","left":"$line"}]],"file":"lib/Getopt/Yath/Term.pm","branch":[[13,{"text":"if (eval {\n\tdo {\n\trequire Term::ANSIColor;\n1\n}\n}) { }"}],[30,{"text":"unless $width and $width >= 80"}],[28,{"text":"unless (defined $width)"}],[33,{"text":"ref $text ? :"}],[39,{"text":"$line ? :"}],[41,{"text":"if ($line and length $new > $width) { }"}],[49,{"text":"if $line"}],[51,{"text":"if (defined $prefix)"}]],"subroutine":[[2,"BEGIN"],[3,"BEGIN"],[8,"BEGIN"],[10,"BEGIN"],[13,"BEGIN"],[24,"fit_to_width"]],"digest":"f3a721bedf2a61b478c4702a40da962c"}����������������������������������������������������������������������a20e1ed3446db7439850620b7acfc96c��������������������������������������������������������������������100644��001750��001750�� 5230�15165554207� 24640� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������{"branch":[[42,{"text":"unless open my $fh, \"<\", $file"}],[46,{"text":"unless unlink $file"}],[45,{"text":"if ($params{'unlink'})"}],[54,{"text":"unless $mod"}],[64,{"text":"unless $prefixes"}],[66,{"text":"unless ref $prefixes eq \"ARRAY\""}],[68,{"text":"unless @$prefixes"}],[69,{"text":"if $options{'no_require'} and @$prefixes > 1"}],[73,{"text":"if $options{'no_require'}"}],[74,{"text":"if eval {\n\tdo {\n\trequire (mod2file($mod));\n1\n}\n}"}],[71,{"text":"if ($input =~ /^\\+(.*)$/)"}],[80,{"text":"$input =~ /^\\Q$pre\\E/ ? :"}],[86,{"text":"if eval {\n\tdo {\n\trequire (mod2file($mod));\n1\n}\n}"}],[82,{"text":"if ($options{'no_require'}) { }"}]],"subroutine":[[2,"BEGIN"],[3,"BEGIN"],[5,"BEGIN"],[6,"BEGIN"],[7,"BEGIN"],[8,"BEGIN"],[25,"decode_json"],[26,"encode_json"],[29,"encode_json_file"],[40,"decode_json_file"],[53,"mod2file"],[62,"fqmod"]],"condition":[[25,{"left":"eval {\n\tdo {\n\t$out = $json->decode(@_);\n1\n}\n}","op":"//","type":"or_2","right":"confess($@)"}],[26,{"left":"eval {\n\tdo {\n\t$out = $ascii->encode(@_);\n1\n}\n}","op":"//","right":"confess($@)","type":"or_3"}],[69,{"left":"$options{'no_require'}","op":"and","right":"@$prefixes > 1","type":"and_3"}]],"digest":"a20e1ed3446db7439850620b7acfc96c","statement":[2,2,2,3,3,3,5,5,5,6,6,6,7,7,7,8,8,8,25,25,25,25,25,26,26,26,26,26,29,30,32,33,34,36,40,42,43,43,43,45,46,49,53,54,55,56,57,58,62,64,66,68,69,71,72,73,74,74,74,75,78,79,80,82,83,86,86,86,87,88,92,94,94],"start":{"25":{"decode_json":[{"subroutine":6,"branch":null,"condition":null,"statement":18,"time":null}]},"-1":{"__COVER__":[{"subroutine":12,"branch":14,"condition":3,"statement":73,"time":null}]},"62":{"fqmod":[{"time":null,"statement":48,"condition":2,"branch":4,"subroutine":11}]},"2":{"BEGIN":[{"time":null,"statement":null,"condition":null,"branch":null,"subroutine":null}]},"53":{"mod2file":[{"condition":2,"time":null,"statement":42,"subroutine":10,"branch":3}]},"40":{"decode_json_file":[{"branch":null,"subroutine":9,"time":null,"statement":34,"condition":2}]},"6":{"BEGIN":[{"condition":null,"time":null,"statement":9,"subroutine":3,"branch":null}]},"7":{"BEGIN":[{"branch":null,"subroutine":4,"time":null,"statement":12,"condition":null}]},"5":{"BEGIN":[{"statement":6,"time":null,"condition":null,"branch":null,"subroutine":2}]},"29":{"encode_json_file":[{"subroutine":8,"branch":null,"condition":2,"statement":28,"time":null}]},"26":{"encode_json":[{"branch":null,"subroutine":7,"time":null,"statement":23,"condition":1}]},"8":{"BEGIN":[{"condition":null,"statement":15,"time":null,"subroutine":5,"branch":null}]},"3":{"BEGIN":[{"time":null,"statement":3,"condition":null,"branch":null,"subroutine":1}]}},"file":"lib/Getopt/Yath/Util.pm"}������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������074198fa9d9f930e73513c89f513402e.lock���������������������������������������������������������������100644��001750��001750�� 0�15165554207� 25222� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������123a2812c394bf08bb84455b37b6292d.lock���������������������������������������������������������������100644��001750��001750�� 0�15165554207� 25252� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������3502465c9985752ba64a6402725cd6e0.lock���������������������������������������������������������������100644��001750��001750�� 0�15165554207� 25123� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������416b69c8408206cdd3a54ba7fb914057.lock���������������������������������������������������������������100644��001750��001750�� 0�15165554207� 25337� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������5935a1c1dc8a7b5d8a398c10d88be35b.lock���������������������������������������������������������������100644��001750��001750�� 0�15165554207� 25564� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������6a827e48e74afc25312686ca19d59be8.lock���������������������������������������������������������������100644��001750��001750�� 0�15165554207� 25443� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������77cca76ea82c90e86e9c2d1d1fe60337.lock���������������������������������������������������������������100644��001750��001750�� 0�15165554207� 25574� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������7d23b0bf85ec79b212a8f76564523107.lock���������������������������������������������������������������100644��001750��001750�� 0�15165554207� 25263� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������97ba764446ce74b6c33a1ab4b586dfaf.lock���������������������������������������������������������������100644��001750��001750�� 0�15165554207� 25645� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������9b30e2fc1222fa186afd5bf5a7376d18.lock���������������������������������������������������������������100644��001750��001750�� 0�15165554207� 25555� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������a20e1ed3446db7439850620b7acfc96c.lock���������������������������������������������������������������100644��001750��001750�� 0�15165554207� 25475� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������a6b7b00c9e2237d585b5223604d20bb3.lock���������������������������������������������������������������100644��001750��001750�� 0�15165554207� 25314� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������becf4247919f617ab51cb6d1ac26c424.lock���������������������������������������������������������������100644��001750��001750�� 0�15165554207� 25552� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������c966eed5df47d66977103c0068d2ccc5.lock���������������������������������������������������������������100644��001750��001750�� 0�15165554207� 25520� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������d3e7a78339f259ed5077b808dc815c12.lock���������������������������������������������������������������100644��001750��001750�� 0�15165554207� 25361� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������e169eb9cf9ee8f25fe6c90a46c963bb0.lock���������������������������������������������������������������100644��001750��001750�� 0�15165554207� 25747� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������eb8bc1a2c2dfe8bb39eb83c8ede73cba.lock���������������������������������������������������������������100644��001750��001750�� 0�15165554207� 26277� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������f32ba23251c7beef0a4fe0eaa54fe555.lock���������������������������������������������������������������100644��001750��001750�� 0�15165554207� 25761� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������f3a721bedf2a61b478c4702a40da962c.lock���������������������������������������������������������������100644��001750��001750�� 0�15165554207� 25542� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure��������������������������������������������������������������������������������������������������������������������������������fa9c9542d07de5fed488a0ccd13644ce.lock���������������������������������������������������������������100644��001750��001750�� 0�15165554207� 25730� 0����������������������������������������������������������������������������������������������������ustar�00exodist�������������������������exodist�������������������������000000��000000��Getopt-Yath-2.000011/cover_db/structure������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������