X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FGetopt%2FBasic.pm;h=5473d04abad4114f82bfef6e4c42115a55e8e0f5;hb=a20996695460dc338556f0435299555074c76c34;hp=a09ce8d55299c933fcf9d73ed72e5ecf029ba005;hpb=30ed85f7fc94f619d46a7430aff840b334c0ebce;p=gitmo%2FMooseX-Getopt.git diff --git a/lib/MooseX/Getopt/Basic.pm b/lib/MooseX/Getopt/Basic.pm index a09ce8d..5473d04 100644 --- a/lib/MooseX/Getopt/Basic.pm +++ b/lib/MooseX/Getopt/Basic.pm @@ -135,38 +135,6 @@ sub _traditional_spec { return ( \@options, \%name_to_init_arg ); } -sub _gld_spec { - my ( $class, %params ) = @_; - - my ( @options, %name_to_init_arg ); - - my $constructor_params = $params{params}; - - foreach my $opt ( @{ $params{options} } ) { - push @options, [ - $opt->{opt_string}, - $opt->{doc} || ' ', # FIXME new GLD shouldn't need this hack - { - ( ( $opt->{required} && !exists($constructor_params->{$opt->{init_arg}}) ) ? (required => $opt->{required}) : () ), - # NOTE: - # remove this 'feature' because it didn't work - # all the time, and so is better to not bother - # since Moose will handle the defaults just - # fine anyway. - # - SL - #( exists $opt->{default} ? (default => $opt->{default}) : () ), - }, - ]; - - my $identifier = $opt->{name}; - $identifier =~ s/\W/_/g; # Getopt::Long does this to all option names - - $name_to_init_arg{$identifier} = $opt->{init_arg}; - } - - return ( \@options, \%name_to_init_arg ); -} - sub _compute_getopt_attrs { my $class = shift; grep { @@ -432,9 +400,6 @@ and then return a newly constructed object. The special parameter C, if specified should point to an array reference with an array to use instead of C<@ARGV>. -The paramater C, if specified and a true value will disable -the use of L . - If L fails (due to invalid arguments), C will throw an exception.