in reply to Re^2: subroutine xyz redefined at ...
in thread subroutine xyz redefined at ...

testing your solution gives me the exact same warning!

UPDATE: Also, the use statements are executed when the program starts, so the blocks around it do not influence which module is used. Depending on which is processed last, is used!

Replies are listed 'Best First'.
Re^4: subroutine xyz redefined at ...
by kennethk (Abbot) on Aug 26, 2009 at 22:01 UTC
    Sorry, I assumed by controlling packages your issue would be resolved. After a little testing with some dummy modules (you have yet to specify which modules you are using), I've verified you can suppress the warning assuming it is resulting from uncontrolled exports from the modules. Since A.pm is exporting twice, you can prevent it from exporting any subroutines when you use it explicitly by modding your use statement to:

    use A qw();

    yielding a final code

    use A qw(); use B ; #.... do something