perlquestion
P0w3rK!d
Hello,
<BR><P>
Given the code below, why I am getting back
<CODE>
HASH(0x2240e7c)
</CODE>
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?
<BR><P>Thanks :)
<BR><P>-P0w3rK!d
<CODE>
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;
}
</CODE>