It could be as simple as:
use vars '@EXPORT'; @EXPORT = qw( list of methods to curry ); sub import { my $class = shift; my $curried_object = $class->new(); my $caller = caller(); for my $export ( @EXPORT ) { *{ $caller . "::$export" } = sub { $curried_object->$export( @ +_ ) }; } }
In reply to Re^4: converting libraries into modules
by chromatic
in thread converting libraries into modules
by Andre_br
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |