Hi Marcel,
Marcel Greter wrote:
I can only tell why myHandler::myFunction () is working.
I think you export the myFunction in Module myOwnFunctions.
I assume you didn't post that part of the code?
Ah, yes -- I didn't think that was doing it but yes, I also have:
require Exporter;
our @ISA = qw (Exporter);
our @EXPORT = qw (myFunction);
our @EXPORT_OK = qw (myFunction);
Therefore myFunction is also accessible within the namespace myHandler,
and therefore the second version is working as I would expect.
But I cannot tell you why myOwnFunctions::myFunction itself is not
working.
Hmmm, I see.
Is there any problem if I continue with myHandler::myFunction () for
now? Maybe later on, I will figure out what is wrong...perhaps some
other silly mistake that I also didn't post? I will continue
investigating...
As someone new to Mason and modperl, what is the correct way of doing
this? i.e., the correct practice? Should myOwnFunctions be exporting?
More importantly, should I do this:
use lib 'my Path';
use myOwnFunctions; ## Located in "my Path"
I thought by doing so, it loads myOwnFunctions once per process. But
I'm having doubts about whether what I'm doing makes any sense... :-)
Thank you!
Ray