- or download this
sub conf {
shift; # throw away unused class.
# .. do real work here
}
- or download this
my %re_use = (name => 'Alice');
Ex::Mod->new( override=>'whatever', %re_use );
- or download this
use strict;
use warnings;
...
my $b = Ex::mod->new( user=>'Bob');
printf "User a is: %s\n", $a->whoami();
printf "User b is: %s\n", $b->whoami();
- or download this
package Ex::mod;
use strict;
...
my $self = shift;
return $self->{user} // undef;
}