Perl complaining of undefined subroutine, even though package in %INC -
perl's namespace magic frustrating....
have script relies on recipient.pm, donation.pm
use lib '../bulkload'; use recipient; use donation;
recipient.pm object-orientated class, , uses donation.pm (just bundle of functions). kinda recursive/redundant, know.
my script - again relies on both - failing whenever tries gratuitously use sub donation.pm:
my $city = donation::getcity($dbh, $cityname, $statename);
perl complains:
undefined subroutine &donation::getcity called @ ...
"nice have", "best practices" refactoring out of scope :)
thank in advance!!
since don't provide source donation 1 can guess. might be
- that name of function different
- that forgot declare package "donation" in donation.pm
- maybe else (show code)
Comments
Post a Comment