[perl #132214] [LHF] `need` with version silently fails

2018-10-27 Thread Zoffix Znet via RT
On Tue, 03 Oct 2017 08:34:39 -0700, c...@zoffix.com wrote:
> If you `use` a v6.d, it causes language switch and will also complain
> if the version is too high.
> The same doesn't happen with `need`. It should probably fail in these
> cases, and `` should
> be just removed from the grammar[^1].
> 
> 15:26   m: need v6.c
> 15:26   camelia rakudo-moar f946bd: ( no output )
> 15:27   Zoffix  m: need v6.e
> 15:27   camelia rakudo-moar f946bd: ( no output )
> 15:32   Zoffix  m: need v6.d; say $*PERL.version
> 15:32   camelia rakudo-moar f946bd: OUTPUT: «v6.c␤»
> 
> [1]
> https://github.com/rakudo/rakudo/blob/f946bd35dca39af97983ec95d4da7fdd0416b73d/src/Perl6/Grammar.nqp#L1548


This appears to be fixed now:

 m: need v6.d
 rakudo-moar e7e91ecfb: OUTPUT: «===SORRY!=== Error while compiling 
␤In case of using pragma, use "use" instead (e.g., "use v6;", "use 
v6.c;").␤at :1␤--> need v6.d⏏␤»


[perl #132214] [LHF] `need` with version silently fails

2018-10-27 Thread Zoffix Znet via RT
On Tue, 03 Oct 2017 08:34:39 -0700, c...@zoffix.com wrote:
> If you `use` a v6.d, it causes language switch and will also complain
> if the version is too high.
> The same doesn't happen with `need`. It should probably fail in these
> cases, and `` should
> be just removed from the grammar[^1].
> 
> 15:26   m: need v6.c
> 15:26   camelia rakudo-moar f946bd: ( no output )
> 15:27   Zoffix  m: need v6.e
> 15:27   camelia rakudo-moar f946bd: ( no output )
> 15:32   Zoffix  m: need v6.d; say $*PERL.version
> 15:32   camelia rakudo-moar f946bd: OUTPUT: «v6.c␤»
> 
> [1]
> https://github.com/rakudo/rakudo/blob/f946bd35dca39af97983ec95d4da7fdd0416b73d/src/Perl6/Grammar.nqp#L1548


This appears to be fixed now:

 m: need v6.d
 rakudo-moar e7e91ecfb: OUTPUT: «===SORRY!=== Error while compiling 
␤In case of using pragma, use "use" instead (e.g., "use v6;", "use 
v6.c;").␤at :1␤--> need v6.d⏏␤»


[perl #132214] [LHF] `need` with version silently fails

2017-10-03 Thread via RT
# New Ticket Created by  Zoffix Znet 
# Please include the string:  [perl #132214]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=132214 >


If you `use` a v6.d, it causes language switch and will also complain if the 
version is too high.
The same doesn't happen with `need`. It should probably fail in these cases, 
and `` should
be just removed from the grammar[^1].

15:26   m: need v6.c
15:26   camelia rakudo-moar f946bd: ( no output )
15:27   Zoffix  m: need v6.e
15:27   camelia rakudo-moar f946bd: ( no output )
15:32   Zoffix  m: need v6.d; say $*PERL.version
15:32   camelia rakudo-moar f946bd: OUTPUT: «v6.c␤»

[1] 
https://github.com/rakudo/rakudo/blob/f946bd35dca39af97983ec95d4da7fdd0416b73d/src/Perl6/Grammar.nqp#L1548