Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
When I call a function from MyModule in ModuleX, the system gives me a error saying ModuleX::functionOne undefined, apparently not loading MyModule.
However if I take out the use statement from one of the modules, then it is fine. My module looks like this
I thought it was OK to 'use' the same module multiple times. I am not sure if I have provided enough here, but can someone explain what might be going wrong here. Thanks.package MyModule; use strict; use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION); require Exporter; @ISA = qw(Exporter); @EXPORT = qw(functionOne functionTwo); $VERSION = 1.00; use Image::Magick; sub functionOne { } sub functionTwo { } return 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using a module twice giving a problem
by toolic (Bishop) on Aug 14, 2011 at 17:27 UTC | |
|
Re: Using a module twice giving a problem
by happy.barney (Friar) on Aug 14, 2011 at 16:36 UTC | |
by Anonymous Monk on Aug 14, 2011 at 17:01 UTC | |
by Anonymous Monk on Aug 15, 2011 at 01:03 UTC | |
|
Re: Using a module twice giving a problem
by ikegami (Patriarch) on Aug 15, 2011 at 02:42 UTC | |
by Anonymous Monk on Aug 15, 2011 at 04:03 UTC | |
by syphilis (Archbishop) on Aug 15, 2011 at 04:11 UTC | |
by Anonymous Monk on Aug 15, 2011 at 04:30 UTC | |
by ikegami (Patriarch) on Aug 15, 2011 at 09:46 UTC | |
|
Re: Using a module twice giving a problem
by Anonymous Monk on Aug 15, 2011 at 01:21 UTC |