unit sub ???

I thought that unit was only supposed to be followed by a package like 
declaration??


> On 26 Mar 2016, at 02:10, Trey Harris (via RT) <perl6-bugs-follo...@perl.org> 
> wrote:
> 
> # New Ticket Created by  Trey Harris 
> # Please include the string:  [perl #127785]
> # in the subject line of all future correspondence about this issue. 
> # <URL: https://rt.perl.org/Ticket/Display.html?id=127785 >
> 
> 
> Example:
> 
> % perl6 -e 'sub MAIN ($x where { $^x > 1 } ) { say "big" }' 4
> big
> % perl6 -e 'sub MAIN ($x where { $^x > 1 } ) { say "big" }' 0
> Usage:
>  -e '...' <x>
> % perl6 -e 'unit sub MAIN ($x where { $^x > 1 } );  say "big"'  4
> ===SORRY!===
> Expression needs parens to avoid gobbling block
> at -e:1
> ------> unit sub MAIN ($x where { $^x > 1 }⏏ );  say "big"
> Missing block (apparently claimed by expression)
> at -e:1
> ------> unit sub MAIN ($x where { $^x > 1 } );⏏  say "big"
> 


Reply via email to