plechazunga has asked for the wisdom of the Perl Monks concerning the following question:
Something that's been frustrating me lately is that I keep getting the "Undefined subroutine" error without being able to quite figure out why. It usually happens when module A imports module B (both mods here having package names), and module B imports module C (which does NOT have an explicit package name). If I write a script that calls B directly, it'll run fine, but I get the runtime error if the script calls A (which in turn calls B). I've monkeyed around with Exporter, which hasn't helped, and I'd rather not have to give module C its own package space (because it's already in use in a lot of different scripts).
(I'm not posting any code because 1. there are a jillion lines total by now, and 2. some proprietary stuff involved.)
I can't figure out what else to do, so I turn to you professionals.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to debug "undefined subroutine"
by moritz (Cardinal) on Jul 31, 2011 at 19:27 UTC | |
|
Re: How to debug "undefined subroutine"
by tospo (Hermit) on Aug 01, 2011 at 08:17 UTC |