| nobull67@gmail.com 2006-10-20, 6:56 pm |
|
On Oct 20, 12:35 pm, rampra...@nsmailserv.com (Rampra A Padmanabhan)
wrote:
> I am getting warnings like ( when I run perl -wc )
>
> Subroutine foo redefined at bar.pm.
I am guessing[1] you are doing something like
perl -wc bar.pm
This attempts to synax check bar.pm by compiling it as if it were a
script, not a module. Often this makes no difference but if bar.pm is
part of a cyclical module dependancy then you'll get redefined warnings
for all the subroutines in bar.pm because bar.pm will get loaded as a
module too.
Check modules with
perl -Mbar -ce1
Or
perl -ce"use bar"
You may also want to specify -w but really each source file should
contain "use warnings".
[1] I should not have had to guess. You should have reduced your
problem to a minimal but complete test case and posted it here.
Together with the actual output you were getting.
|