X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FFunction%2FParameters.pm;h=78eb6963bd260fefcac5d2811afb90b361f518b7;hb=b4fcf7d0d142ac56f81c83eca891a5ca2684de18;hp=6d5a148cc0b458333495cd7357e6616b26c4c8c3;hpb=60682a8ed2b65a7354e4f180fc541e2daf36bd8d;p=p5sagit%2FFunction-Parameters.git diff --git a/lib/Function/Parameters.pm b/lib/Function/Parameters.pm index 6d5a148..78eb696 100644 --- a/lib/Function/Parameters.pm +++ b/lib/Function/Parameters.pm @@ -29,16 +29,17 @@ sub _fun ($) { $_[0] } sub import { my $class = shift; + my $keyword = shift; my $caller = guess_caller; #warn "caller = $caller"; Devel::Declare->setup_for( $caller, - { fun => { const => \&parser } } + { $keyword => { const => \&parser } } ); no strict 'refs'; - *{$caller . '::fun'} = \&_fun; + *{$caller . '::' . $keyword} = \&_fun; } sub report_pos {