Here is how your package might look like:
Hope this helps,,,package Frontier::Daemon; sub new{ my $pkg = shift; # this would be Frontier::Daemon my %opts = @_; # these are the key/val pairs passed to you # $opts{LocalPort} # $opts{methods} # ... # and you can my $obj = \%opts; bless $obj, $pkg; return $obj; }
Aziz,,, </code>
In reply to Re: 'new' constructors
by abstracts
in thread 'new' constructors
by emcb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |