- or download this
sub foo
{
...
$self->{foo} = shift if @_;
return $self->{foo};
}
- or download this
for my $field (qw(name race aliases)) {
my $slot = __PACKAGE__ . "::$field";
...
return $self->{$slot};
};
}
- or download this
#!/usr/bin/perl
use strict;
...
print "Baz: ", $obj->baz, "\n";
print "Bah: ", $obj->bah, "\n";
- or download this
Baz: 1
Bah: 2
- or download this
#!/usr/bin/perl
use strict;
...
$obj->faz();
$obj->destroy_methods();
$obj->faz();