Getopt-Class
view release on metacpan or search on metacpan
lib/Getopt/Class.pm view on Meta::CPAN
};
# tie( %self, 'Getopt::Class::Repository' );
# Used by Getopt::Class::Values to ensure that whether the data are accessed as methods or as hash keys,
# in either way it returns the option data
# Actually option data are stored in the Getopt::Class::Values object data property
sub TIEHASH
{
my $self = shift( @_ );
my $class = ref( $self ) || $self;
return( bless( { data => {} } => $class ) );
}
sub CLEAR
{
my $self = shift( @_ );
my $data = $self->{data};
my $caller = caller;
%$data = ();
}
lib/Getopt/Class.pm view on Meta::CPAN
{
data => {},
dict => $dict,
aliases => $aliases,
warnings => $should_display_warning,
debug => ( $opts->{debug} || 0 ),
# _data_repo => 'data',
colour_open => '<',
colour_close => '>',
};
return( bless( $hash => $class ) );
}
sub FETCH
{
my $self = shift( @_ );
my $data = $self->{data};
# my $dict = $self->{dict};
my $key = shift( @_ );
# my $def = $dict->{ $key };
return( $data->{ $key } );
( run in 0.243 second using v1.01-cache-2.11-cpan-e9199f4ba4c )