Acme-WalkMethods
view release on metacpan or search on metacpan
lib/Acme/WalkMethods.pm view on Meta::CPAN
sub AUTOLOAD {
my $name = $AUTOLOAD;
$name =~ s/.*://;
if(!defined $_[0]->{$name} && defined $_[1]) {
print "Can I create '$name' as a method (y/N)?";
my $input = <STDIN>;
chomp($input);
unless($input eq 'y') {
return undef;
}
}
if($_[1]) {
# set it
$_[0]->{$name} = $_[1];
}
# Return it
return $_[0]->{$name} if defined $_[0]->{$name};
return undef;
}
sub DESTROY {};
1;
( run in 1.932 second using v1.01-cache-2.11-cpan-d80b1682f3f )