Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: "Backing up" a subroutine during runtime.

by TGI (Parson)
on Oct 21, 2008 at 18:49 UTC ( [id://718561]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    
    
    #$f->fake_function( 'Fake');  # program will die
    
  2. or download this
    $f->override( 'test::function', sub { print 'foo' } );
    # Do your testing;
    $f->restore( 'test::function' );
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-03-29 02:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found