sub new { my ($account) = @_;
That's the problem. The first argument that new gets is the name of the class. So instead write
sub new { my ($class, $account) = @_; return bless $accounts{$account}, $class; }
In reply to Re: Why won't a hash in a hash work as a hash reference to create an object?
by moritz
in thread Why won't a hash in a hash work as a hash reference to create an object?
by Lady_Aleena
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |