Dear Monks,
I have written a perl module (package XYZ) that contains a function named test that does some testing of its internals. The module tests fine on its own. The module is used as part of a larger framework. But when I require the module from the larger framework, I get "Subroutine test redefined at XYZ.pm line 123...". I presume this is because the parent included a module that exported a function called test which is then running into my function. I am confused by perl's namespace handling, but my experience is with use, not require, so maybe that's the issue.
My module's 'test' function is not exported; but clearly a conflict is occurring when I interface with the larger structure.
Is there a way to find where the conflict is coming from? Where is 'test' originally defined? Aside from renaming my package's method, is there a way to avert the namespace conflict wiht require?
Any help is greatly appreciated!
Humbly yours,
A
In reply to how to find the original sub definition by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |