Getopt-Class
view release on metacpan or search on metacpan
lib/Getopt/Class.pm view on Meta::CPAN
850851852853854855856857858859860861862863864865866867868869};
# 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
105710581059106010611062106310641065106610671068106910701071107210731074107510761077
{
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.231 second using v1.01-cache-2.11-cpan-e9199f4ba4c )