in reply to Re: Use of uninitialized value in hash element at
in thread Use of uninitialized value in hash element at
will do the same, but if you don't mind to create $self->{ATTRIBUTES}, it maybe even shorter:sub get_attribute { my ( $self, $attribute ) = @_; return exists $self->{ATTRIBUTES} ? $self->{ATTRIBUTES}{$attribute} : undef; }
sub get_attribute { my ( $self, $attribute ) = @_; return $self->{ATTRIBUTES}{$attribute}; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Use of uninitialized value in hash element at
by Anonymous Monk on Apr 27, 2011 at 17:12 UTC | |
by zwon (Abbot) on Apr 27, 2011 at 17:21 UTC | |
by Anonymous Monk on Apr 27, 2011 at 18:09 UTC | |
by zwon (Abbot) on Apr 28, 2011 at 12:44 UTC |