For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > October 2006 > Re: tracing "Subroutine ** redefined at " warnings









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: tracing "Subroutine ** redefined at " warnings
Tom Phoenix

2006-10-20, 6:56 pm

On 10/20/06, Rampra A Padmanabhan <rampra@nsmailserv.com> wrote:

> I am getting warnings like ( when I run perl -wc )
>
> Subroutine foo redefined at bar.pm.
> I am sure these functions are not redefined anywhere.


Perl is sure that they are. It's more likely to be correct than you are.

The error message should have a line number, as well as a file name;
you seem to have removed it. Is there a subroutine definition starting
near that line? Is there another subroutine with the same name
somewhere else?

If your source code defines the subroutine only once, maybe you're
compiling it twice somehow. Or maybe you're loading a subroutine from
a module, then defining another with the same name.

Hope this helps!

--Tom Phoenix
Stonehenge Perl Training
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com