package My::Singleton; my $object = bless {}, __PACKAGE__; sub import { shift; my %args = @_; $object->$_( $args{$_} ) for keys %args; return; } sub new { return $object } # Your methods here
In reply to Re: Set attribute on a module
by dragonchild
in thread Set attribute on a module
by bschmer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |