Can't locate object method "patterns" via package "objdir(/[^ ]*)?" (perhaps you forgot to load "objdir(/[^ ]*)?"?) at ./filter.pl line 24.
A Google search turned up many forum entries asking about the message, but they all had to do with open-source projects where there was indeed a package method call that had gone wrong.
After I rubbed my eyes long enough, it was obvious what I had done: left the '$' off the front of the hash reference. I had typed:
patterns{"objdir(/[^ ]*)?"} = "dirs/objs"; # WRONG!
instead of:
$patterns{"objdir(/[^ ]*)?"} = "dirs/objs";
I even had
use strict; use warnings;
on, but only got the error message. Anyway, since Google didn't help me out, let's see if this page with the error text in the title floats to the top and helps someone else out someday.
1 comment:
Thanks, I had a similar issue with a typo, you post sent me on the right track.
Post a Comment