in reply to Re: Reloading changed modules
in thread Reloading changed modules

Thanks, I'll take a look.
I should have tested better before, it seems my eval "no warnings; require $modname"; does not suppress the 'Subroutine redefined' warnings, any idea why?
Casty

Replies are listed 'Best First'.
Re: Re: Re: Reloading changed modules
by grantm (Parson) on Dec 21, 2002 at 18:48 UTC
    The module doesn't have 'use warnings;' in it does it? I've used the exact same technique to reload modules except for backwards compatibility I used 'local($^W) = 0;' to supress 'Subroutine redefined'.
      Your local($^W) = 0; does not work for me, I get 'Can't modify constant item in local ..'
      Using use warnings; at the top and then:
      no warnings; eval "require $modname"; use warnings;
      Still produces the warnings :(
      C.
        Oops, I take it back.. It doesn't in eval "local($^W) = 0; require $modname;" Which is not suprising (silly me).
        Thanks all
        C.
      No it doesn't, but it has #!/usr/bin/perl -w at the top..
      Casty
        *sigh* Yet another example of What's wrong with -w and $^W

        use warnings; unless you are on pre 5.6.

        --- demerphq
        my friends call me, usually because I'm late....