in reply to using Sub::Install to override a module method that cannot be edited
use strict; use warnings; use BaseModule qw( function1 function2 ); { no warnings 'overriden'; # I think that's the right one. my $old_function1 = \&function1; *function1 = sub { print "I am the overriden function\n"; $old_function1->( @_ ); }; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: using Sub::Install to override a module method that cannot be edited
by unlinker (Monk) on Oct 07, 2007 at 04:44 UTC |