develooper Front page | perl.perl5.porters | Postings from April 2003

Re: [PATCH] buglet: sub a(;&) { } doesn't work

Thread Previous
From:
Rafael Garcia-Suarez
Date:
April 29, 2003 14:46
Subject:
Re: [PATCH] buglet: sub a(;&) { } doesn't work
Message ID:
20030429235115.5ab42b1d.rgarciasuarez@free.fr
Enache Adrian wrote:
> $ perl -e 'sub a(;&) { } a { }'
> Type of arg 1 to main::a must be block or sub {} (not single ref constructor) at -e line 1, at EOF
> Execution of -e aborted due to compilation errors.
> 
> No, this is not a "feature": if it was, perl would drop the prototype
> in the first place, not go on and parse { } as a hash ref constructor.

Thanks, applied as #19367.

-- 
Urgent is not *NIX [Backlog, backlog...]

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About