sub _parse_argv {
my ( $class, %params ) = @_;
- local @ARGV = @{ $params{argv} || \@ARGV };
+ local @ARGV = @{ $params{params}{argv} || \@ARGV };
my ( $opt_spec, $name_to_init_arg ) = ( HAVE_GLD ? $class->_gld_spec(%params) : $class->_traditional_spec(%params) );
By default, attributes which start with an underscore are not given
commandline argument support, unless the attribute's metaclass is set
-to L<MooseX::Getopt::Meta::Attribute>. If you don't want you accessors
-to have the leading underscore in thier name, you can do this:
+to L<MooseX::Getopt::Meta::Attribute>. If you don't want your accessors
+to have the leading underscore in their name, you can do this:
# for read/write attributes
has '_foo' => (accessor => 'foo', ...);
params from the command line (possibly overriding those in C<%params>)
and then return a newly constructed object.
+The special parameter C<argv>, if specified should point to an array
+reference with an array to use instead of C<@ARGV>.
+
If L<Getopt::Long/GetOptions> fails (due to invalid arguments),
C<new_with_options> will throw an exception.
--help
--usage
-If you have L<Getopt::Long::Descriptive> a the C<usage> param is also passed to
+If you have L<Getopt::Long::Descriptive> the C<usage> param is also passed to
C<new>.
=item B<ARGV>