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

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'.

Replies are listed 'Best First'.
Re: Re: Re: Re: Reloading changed modules
by castaway (Parson) on Dec 21, 2002 at 19:40 UTC
    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.
Re: Re: Re: Re: Reloading changed modules
by castaway (Parson) on Dec 21, 2002 at 18:55 UTC
    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....