develooper Front page | perl.perl6.compiler | Postings from January 2012

[perl #109182] where{} section triggered in signature despite param optional and not given

Thread Previous
From:
Paweł Pabian
Date:
January 27, 2012 02:21
Subject:
[perl #109182] where{} section triggered in signature despite param optional and not given
Message ID:
rt-3.6.HEAD-14510-1327659692-267.109182-82-0@perl.org
# New Ticket Created by  Paweł Pabian 
# Please include the string:  [perl #109182]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=109182 >


$ perl6 -e 'sub foo ( :$id? where { say "I should not be here when there is no 
param passed"} ) {}; foo()'

Returns:
I should not be here when there is no param passed

$ perl6 --version
This is perl6 version 2012.01 built on parrot 3.11.0 revision RELEASE_3_11_0

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