[Israel.pm] how to intercept module calls
Yuval Kogman
nothingmuch at woobling.org
Sun Oct 8 10:15:10 PDT 2006
If you want to do this "manually", use Class::Inspector or
Devel::Symdump or something like that to get at all the functions,
then do something like
my $orig_sub = \&{ "Module::$subname" };
*{"Module::$subname"} = sub {
warn "going to call orig sub ($su name) with the args: @_";
goto &$orig_sub;
};
On Sun, Oct 08, 2006 at 18:54:18 +0200, Tal Kelrich wrote:
> Hi people,
>
> I'm looking for a way to do the following, any help would be
> appreciated.
>
> load a module, intercept calls to same to change behavior.
>
> I'm currently looking at Hook::WrapSub and Aspect for guidance, but any
> spot advice would be helpful
>
> Regards,
> Tal Kelrich
>
> --
> Tal Kelrich
> PGP fingerprint: 3EDF FCC5 60BB 4729 AB2F CAE6 FEC1 9AAC 12B9 AA69
> Key Available at: http://www.hasturkun.com/pub.txt
> ----
> There will be big changes for you but you will be happy.
> ----
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://perl.org.il/mailman/listinfo/perl
--
Yuval Kogman <nothingmuch at woobling.org>
http://nothingmuch.woobling.org 0xEBD27418
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://perl.org.il/pipermail/perl/attachments/20061008/ca02b09a/attachment.pgp
More information about the Perl
mailing list