- or download this
my $itemref = Item::Item->new( "10056" );
my @item = @$itemref;
print $item[0]->{_description}, "\n";
- or download this
sub get_desc
{
$_[0]->{_description};
}
- or download this
Can't call method "get_desc" on unblessed reference at testitem.pl lin
+e 17 (#1)
(F) A method call must know in what package it's supposed to run.
+ It ordinarily finds this out from the object reference you supply, b
+ut you didn't supply an object reference in this case. A reference i
+sn't an object reference until it has been blessed. See perlobj.
Uncaught exception from user code:
Can't call method "get_desc" on unblessed reference at testite
+m.pl line 17. at testitem.pl line 17
- or download this
sub get_desc
{
...
At the print statement
print @item->get_desc(), "\n";
print $itemref->get_desc(), "\n";
- or download this
sub new
{
...
} # End sub new
- or download this
sub get_desc()
{
...
return $self->{_description};
}
}
- or download this
print $itemref->get_desc(), "\n";
- or download this
Pseudo-hashes are deprecated at /usr/local/www/cgi-pbin/pmpl/item.pl l
+ine 119 (#1)
(D deprecated) Pseudo-hashes were deprecated in Perl 5.8.0 and th
+ey will be removed in Perl 5.10.0, see perl58delta for more details.
+You can continue to use the fields pragma.
...
Bad index while coercing array into hash at /usr/local/www/cgi
+-pbin/pmpl/item.pl line 119.
at /usr/local/www/cgi-pbin/pmpl/item.pl line 119
Item::Item::get_desc('Item::Item=ARRAY(0x8135c88)') called at
+testitem.pl line 17