Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Object method in wrong namespaceby Bod (Parson) |
on Feb 27, 2022 at 20:27 UTC ( [id://11141684]=perlquestion: print w/replies, xml ) | Need Help?? |
Bod has asked for the wisdom of the Perl Monks concerning the following question: Wise Monks, I have been scratching my head for too long here...it is time to seek your wisdom. I suspect the problem is simple and sufficiently obvious that I shall kick myself when it is revealed! I am developing a module for internal use that manipulates blog posts. It takes a hashref from a database, manipulates the data and can return either another hashref or any of the individual pieces of data. But it's not working so I have added some debug code. It is the behaviours of this debug code that I cannot understand. I am getting this error: Can't locate object method "heading" via package "main" at admin.pl line 152. The heading method should be in the Bod::Blog namespace but the error suggests that Perl is looking for it in the main namespace. I cannot figure out why that might be! Here is the first part of Blog.pm...
Back to
Seekers of Perl Wisdom
|
|