Help for this page

Select Code to Download


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