in reply to Changing a method call in a CPAN module

How about (temporarily) replacing the constructor with your own?

{ my $old_constructor = \&Backend::new; local *Backend::new = sub { $old_constructor->( @_, 'my', 'additional', 'args' ); }; uf_method(); }

You could/should maybe guard against the module version(s) just in case a/your patch to the useful module gets accepted...

Replies are listed 'Best First'.
Re^2: Changing a method call in a CPAN module
by derby (Abbot) on May 10, 2007 at 12:23 UTC

      Just require it before D:FV:C:U requires it:

      require File::MMagic; local *File::MMagic::new = sub { # ... };