On Fri Mar 25 18:10:03 2016, t...@cpan.org wrote:
> 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 '...'
> % perl6 -e 'unit sub MAIN ($x where { $^x > 1 } ); say "big"' 4
> ===SORRY
On Fri Mar 25 18:10:03 2016, t...@cpan.org wrote:
> 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 '...'
> % perl6 -e 'unit sub MAIN ($x where { $^x > 1 } ); say "big"' 4
> ===SORRY
It's not only in -e. I just used that for my example. A file with a unit
sub MAIN exhibits the same issue.
On Mon, Mar 28, 2016, 17:39 Elizabeth Mattijsen via RT <
perl6-bugs-follo...@perl.org> wrote:
> Perhaps we should disallow “unit” with -e?
>
> > On 28 Mar 2016, at 20:18, Trey Ethan Harris
Perhaps we should disallow “unit” with -e?
> On 28 Mar 2016, at 20:18, Trey Ethan Harris wrote:
>
> No, see S06-routines.pod:
>
> As with module and class declarations, a sub declared
> with the C declarator (and ending in semicolon) is allowed at the
> outermost
> file scope if it
Perhaps we should disallow “unit” with -e?
> On 28 Mar 2016, at 20:18, Trey Ethan Harris wrote:
>
> No, see S06-routines.pod:
>
> As with module and class declarations, a sub declared
> with the C declarator (and ending in semicolon) is allowed at the
> outermost
> file scope if it
No, see S06-routines.pod:
As with module and class declarations, a sub declared
with the C declarator (and ending in semicolon) is allowed at the
outermost
file scope if it is the
first such declaration, in which case the rest of the file is the body:
unit sub MAIN ($direc
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)
> wrote:
>
> # New Ticket Created by Trey Harris
> # Please include the string: [perl #127785]
> # in the subject line of all future correspon
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)
> wrote:
>
> # New Ticket Created by Trey Harris
> # Please include the string: [perl #127785]
> # in the subject line of all future correspon
# New Ticket Created by Trey Harris
# Please include the string: [perl #127785]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=127785 >
Example:
% perl6 -e 'sub MAIN ($x where { $^x > 1 } ) { say "big" }' 4
big
% perl6 -e 'su