in reply to Doing "extensions"/"addons"/"plugins"
I'm a tad confused as to exactly what you're trying to do, but my $reg = \INIT(); is probably wrong. That takes a reference to the return value of INIT() (Which will probably be 1) instead of a reference to the subroutine named INIT. You want: my $ref = \&INIT;