Tuesday, July 27, 2004

Globs

Okay, so I finally understand how Exporter works. I really should have known this one,

package Module;

sub import {
my $caller = caller();
*{$caller . '::subroutine'} = \&subroutine;
}

sub subroutine {
...
}