Alexey Tourbin wrote:
> Hello,
> 
> $ perl -e 'use autouse Pod::Usage => "pod2usage(()"; pod2usage()'
> Undefined subroutine &main::pod2usage called at -e line 1.
> $
> 
> --- autouse.pm-       2004-07-04 21:32:39 +0000
> +++ autouse.pm        2005-08-18 05:01:52 +0000

Thanks, both autouse patches applied as change #25302.

> @@ -63,7 +62,8 @@ sub import {
>       };
>  
>       if (defined $proto) {
> -         *$closure_import_func = eval "sub ($proto) { &\$load_sub }";
> +         *$closure_import_func = eval "sub ($proto) { goto &\$load_sub }"
> +             || die;
>       } else {
>           *$closure_import_func = $load_sub;
>       }
> End of patch
> 
> $ perl -e 'use autouse Pod::Usage => "pod2usage(()"; pod2usage()'
> Prototype not terminated at (eval 1) line 1.
>         ...propagated at /usr/lib/perl5/autouse.pm line 65.
> BEGIN failed--compilation aborted at -e line 1.
> $
> 
> I guess the latter behaviour is more appropriate.  I also see no reason
> for saving a stub frame, so using goto should be ok.

Reply via email to