http://www.perlmonks.org?node_id=940917


in reply to Re^2: Passing subroutine as argument between packages
in thread Passing subroutine as argument between packages

Given:

my $ref = sub { $FooConfig->important_func( '1', @_ ) };

... then you can write:

$ref->( 'more', $args, %here );

... though be cautious and understand how the function reference passes its arguments to the inner function.


Improve your skills with Modern Perl: the free book.