Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Reloading a module at run time

by alpha (Scribe)
on Jan 16, 2013 at 09:54 UTC ( [id://1013547]=note: print w/replies, xml ) Need Help??


in reply to Re: Reloading a module at run time
in thread Reloading a module at run time

Thanks. Using Module::Refresh directly fixed my issue.
$ cat class.pm package class; use 5.014; use strict; use warnings; use autodie; sub new {bless {}, 'class'} sub talk {print "6111513\n"} 1; $ cat module_refresh_code.pl #!/usr/bin/env perl use strict; use warnings; use autodie; use 5.014; use Data::Dumper; use Module::Refresh; my $refresher = Module::Refresh->new; do './class.pm'; class->new->talk; my $dummy = <>; # we change class.pm meanwhile $refresher->refresh_module('./class.pm'); class->new->talk; $ ./module_refresh_code.pl 6111513 8111513

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2026-01-24 17:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (126 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.