|Problems? Is your data what you think it is?|
Chasing up a module dependency issueby cLive ;-) (Prior)
|on Mar 07, 2016 at 16:13 UTC||Need Help??|
cLive ;-) has asked for the wisdom of the Perl Monks concerning the following question:
Never seen this one before...
I'm digging through an issue in a pile of spaghetti code. It is very old, very cluttered and full of "interesting surprises".
One issue I'm trying to debug now is that, by adding a use statement for a module to another, I get an error of:
Looking through the use statements of modules used, I see some modules that appear to have nested use statements, eg:
The methods that are failing are in @EXPORT_OK (this works as expected when using the module on its own.
I note that some modules use 'require Exporter' and others 'use base'.
Basically, apart from stripping the modules down to skeletons, is there a quicker way of getting to the root of this issue?
EDIT: Found the issue. Two modules export the same function name. It looks like this was the first time both modules had been included in the same app, and that the use statement was just copy/pasted even though imported method wasn't used. Removing Exporter from the lesser used module... Eurgh...