in reply to Calling a subroutine located in a module
Might need to see more code, it doesn't sound like the function is being exported. Is the function in the @EXPORT or @EXPORT_OK list in the module? Is Exporter used in the module? Do you say 'use Module qw(function);' in the script if its in EXPORT_OK, or just 'use Module;' if its in @EXPORT? Is Exporter in the @ISA list in the module?
Update: The 'undeclared' error I was talking about is about when you said "I tried removing the my $opendir", and you said that you get an error about it being used later...
Anyway, as others have said, did you forget the package declaration in the module ('package NotesOLE;' if that's the name of the module, and the filename is 'NotesOLE.pm')? Is the module 'NotesOLE'? If not, you need to use it in the main script.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Calling a subroutine located in a module
by Anonymous Monk on Nov 02, 2001 at 06:31 UTC | |
by chipmunk (Parson) on Nov 02, 2001 at 08:07 UTC | |
by VSarkiss (Monsignor) on Nov 02, 2001 at 07:19 UTC | |
by brother ab (Scribe) on Nov 02, 2001 at 12:35 UTC |