Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Re: Re: Reloading modules- suppressing warnings works sometimes?

by !1 (Hermit)
on Dec 21, 2003 at 23:18 UTC ( [id://316266]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub reload {
        my ($PM) = @_ or return;
        $PM =~ s!::!/!g;
        $PM .= ".pm";
        delete $INC{$PM};
    
  2. or download this
        no strict 'refs';
        no warnings 'redefine';
    
  3. or download this
        my $warnings = \&warnings::import;
        local *warnings::import = sub {
          &{$warnings};
          unimport warnings "redefine";
        };
    
  4. or download this
        eval { require $PM };
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://316266]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-19 01:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found