Next | Hook::LexWrap | 16 |
Here's the list context code:
$prereturn = $return = []; () = $wrapper{pre}->(@_,$return) if $wrapper{pre}; if (ref $return eq 'ARRAY' && $return == $prereturn && !@$return) { $return = [ &$original ]; () = $wrapper{post}->(@_, $return) if $wrapper{post}; } return ref $return eq 'ARRAY' ? @$return : ($return);
The if test handles pre-emption
If $return is overwritten with a new arrayref, $return == $prereturn test will fail
Next | Copyright © 2003 M. J. Dominus |