Oct 17, 2009

Perl Error - Can't locate object method "new" via package"

Error:
Can't locate object method "new" via package"

Solution:
Check the 'package' line in your module, and make sure that it _exactly_ matches (including case) the name in the 'use' statement.
I typically run into this after I've decided to rearrange some files, or I typo on a case-insensitive file system (so it finds the module, but the name doesn't match)

No comments:

Post a Comment