- or download this
# simplified version
my @array = ({id=>1, name=>'Linux'}, {id=>2, name=>'Perl'});
my $self = [@array];
bless $self, $class
- or download this
sub get_desc {
my($self, $idx) = @_;
return $self->[0]{_description};
}
- or download this
my $item = Item::Item->new('some record id');
print $item->get_desc(0);
- or download this
my $itemref = Item::Item->new( "10056" );
- or download this
@item = @$itemref;
print $item[0]->{_description};