- or download this
package Objet; # yes, the 'c' is absent by design;
use strict;
...
}
1;
- or download this
use Objet;
my $o = Objet->new('aleph' => 1, 'gamma' => 2);
$o->attrib( 'zeta' => 900 ); # sets attribute 'zeta' to 900
print $o->attrib( 'aleph' ); # gets value of attrib 'aleph'
- or download this
sub new {
my $self = bless {
...
return $self->{$attr}{get}->();
}
}