http://www.perlmonks.org?node_id=992733


in reply to Constant subroutine main::C redefined

perllexwarn "tells" me

no warnings 'redefine';

... but I guess there should be a way to structure your code not to redefine an existing subroutine at all :-).

On Windows (resp. case-insensitive file systems), getting a lot of these for no obvious reason is a sure-fire symptom of loading a module using the wrong case for its name:

use File::Find; # ... and in a code location far away use file::find;

Replies are listed 'Best First'.
Re^2: Constant subroutine main::C redefined
by BrowserUk (Patriarch) on Sep 10, 2012 at 12:00 UTC
    no warnings 'redefine';

    Doesn't work for constant subroutines

    there should be a way to structure your code not to redefine an existing subroutine at all :-).

    In this case, no.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    RIP Neil Armstrong