P0w3rK!d has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
Given the code below, why I am getting back
for the value of the hash in my object when I call the get method. What am I doing wrong in referencing the hash within my object?HASH(0x2240e7c)
Thanks :)
-P0w3rK!d
package Foo; ... sub new { my $class = ""; my $intID = ""; my %hshAgg = (); ( $class, $intID, %hshAgg ) = @_; my $self = { class => $class, id => $intID, hshAgg => %hshAgg }; } ... sub get_hshAgg { my $self = shift; return $self->{hshAgg};; } sub set_hshAgg { my $self = shift; my %hshAgg = shift; $self->{hshAgg} = %hshAgg; }
Back to
Seekers of Perl Wisdom