alextor has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I'm including a file with some subroutines in my program using require, and I'm also including a module that has the same file in it using require.
It looks like this;
use lib("/usr/local/shlib/");
use Modis::ParseMe;
require '/usr/local/shlib/AL/subs.pl';
Inside ParseMe.pm I also have require '/usr/local/shlib/AL/subs.pl';
When I run the program and use one of the subroutines subs.pl, the output I get is "Undefined subroutine &main::mysub"
If I comment out "use Modis::ParseMe;", it works fine.
What can I do to fix this?
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using require in a module and alongside that module in a program
by Tanktalus (Canon) on Aug 12, 2011 at 22:37 UTC | |
|
Re: Using require in a module and alongside that module in a program
by kennethk (Abbot) on Aug 13, 2011 at 14:44 UTC | |
by alextor (Novice) on Aug 15, 2011 at 15:36 UTC | |
by kennethk (Abbot) on Aug 15, 2011 at 21:11 UTC | |
|
Re: Using require in a module and alongside that module in a program
by Anonymous Monk on Aug 13, 2011 at 08:46 UTC |