Autrijus Tang <[EMAIL PROTECTED]> wrote:

On Fri, Jul 15, 2005 at 02:16:48PM -0500, [EMAIL PROTECTED] wrote:
> package MyModule;
>  > use v6;
> sub doubler( Num $x ) {
>    return 2 * $x;
> }
>  > sub value_v( Code +$func = &MyModule::doubler ) is export {
>    return $func( 5 );
> }
>  > This works.  But I think I should be able to say:
>  > sub value_v( Code +$func = doubler ) is export {

That won't do, as it will call the doubler.

That makes sense.

> sub value_v( Code +$func = &doubler ) is export {

This should work; if it does not, it is a bug.  Can you add a
regression test as, say, t/subroutines/defaults.t?  I have just
sent you a committer invitation.

I made the test.  The problem only occurs when the sub is called from another 
package, in my case that was a driving script.

I'm not sure how to accept the invitation (or what that even means).  Sorry, 
I'm new here.

Phil

Reply via email to