This is kind of a follow up to this question, which i posted earlier I have been running into this not so uncommon error:
Undefined subroutine &csDB::csErrorClass called at f:/projects/site/bin/lib//csDB.pm line 55which is a no brainer because of course csErrorClass is in my csLogs::Error.pm module, which I then 'use' in csDB.pm.
perl -w -McsDB -e 1; runs without a hitch, so the problem seems to be when the csDB module is used from other scripts which also use the Error.pm module.
From the last thread (linked above) it sounds like the Exporter module's import routine simply aliases the EXPORT'ed variables/subs etc into the current namespace, but does it do this each time the module is included? If I have 3 module files and a script all of which reference a 4th module file, will all of the normally exported symbols from that module be exported into all four of the other namespaces, or just whichever of them gets to say "use Module4" first?
The application behind this question is a core module that redirects some of perl's error handling to a form more useful for me (both by setting SIG handlers for warn and die, and by providing some replacements for warn and die as used in "or die" statements by programmers). As such, i need to have access to the functions in this module from just about every other file in my set of scripts & modules.
In reply to exporter and multiple namespaces by AidanLee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |