[tpm] Fwd: Perl modules
sfryer at sourcery.ca
Thu Jan 14 17:07:55 PST 2010
without seeing the code, it's hard to know for sure, but my guess would be
you tried to import something (or didn't) for which there's no export. the
&main::whatever is the clue here.
if you're doing something like...
and getting &main::foo_function(), it's because Foo is not automatically
exporting foo_function(). you might try doing.
or perhaps you meant to do.
use Foo qw(foo_function);
or use Exporter (et al), or
anyway, that'd be my guess based on available info.
On Thu, Jan 14, 2010 at 7:21 PM, <arocker at vex.net> wrote:
> I defined a set of subroutines in a module.
> They worked perfectly well when the module was in the same directory as
> the caller.
> Then I moved the module to a directory on the @INC array, so it would
> become generally available, and now it's broken. Specifically, although
> the program compiles, when running it dies with an "Undefined subroutine
> &main::whatever" message.
> What have I done wrong?
> toronto-pm mailing list
> toronto-pm at pm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the toronto-pm