Any way to "inject" an INIT block into a different module?

Rafael Garcia-Suarez rgarciasuarez at
Fri May 30 16:12:26 BST 2008

2008/5/30 Andy Wardley <abw at>:
> Adriano Ferreira wrote:
>> That seems like the kind of things Devel::Hook was invented to do.
>> However, it is very experimental and imature by now.
> Yes, that's exactly what I'm after.  Too bad it relies on XS.  That's
> probably going too close to the metal for this particular application.
> But at least it tells me that it's not possible to do this kind of thing
> from pure Perl, so I'll try a different tack.

It *is* possible. With B, which is an XS module, but a core module, so
let's say it counts as pure perl, for some value of pure perl. You saw
my snippet in the other mail, didn't you?

More information about the mailing list