<div dir="ltr"><div>Calling a method or accessing a member of an undefined object will throw a fatal error that looks like this:  "can't call method * on an undefined value at ..."</div><div><br></div><div>For example, this code will cause a software error if $data->{itemnumber} exists, but the item doesn't exist (maybe it's been deleted?):<br></div><div><br></div><div>my $item = Koha::Items->find( $data->{itemnumber} );</div><div>my $biblio = $item->biblio;</div><div><br></div><div>How this is handled will of course depend on context -- maybe we should carp and continue, or maybe just</div><div><br></div><div><div>my $item = Koha::Items->find( $data->{itemnumber} );</div><div>my $biblio = $item->biblio if defined $item;</div></div><div><br></div><div>I would like to add a coding standard that we always check for this.</div><div><br></div><div>Thanks,</div><div><br></div><div>--Barton</div></div>