Skip Menu |
Report information
Id: 126669
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: fecund <spam-bitcard [at] yary.ack.org>
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: LTA error with "need 6"/"use 6" (no "v")
Download (untitled) / with headers
text/plain 516b
When Rakudo (MoarVM) 6.b encounters need 6.000; or use 6.000; it gives an error: Undeclared routine: use (or "need") I encountered this as a Perl5-ism, where I may say "use 5.022" so that ancient Perls won't choke on "v5.22" - can we get one of those awesome error messages that says "do you mean 'need v6.0'?" when given the above? Also, use "foo"; also gives same LTA "Undeclared routine: use" error, would be nice if it told use how to use a module from an interpolated string instead. thanks!
See https://github.com/rakudo/rakudo/blob/f946bd35dca39af97983ec95d4da7fdd0416b73d/src/core/Exception.pm#L1025-L1031

It seems that you can add “need” and “use” there (with a good message) and it will do exactly what was requested.

On 2015-11-17 18:57:53, fecund wrote:
Show quoted text
> When Rakudo (MoarVM) 6.b encounters
> need 6.000;
> or
> use 6.000;
>
> it gives an error:
>
> Undeclared routine:
> use (or "need")
>
> I encountered this as a Perl5-ism, where I may say "use 5.022" so that
> ancient Perls won't choke on "v5.22" - can we get one of those awesome
> error messages that says "do you mean 'need v6.0'?" when given the
> above?
>
> Also,
> use "foo";
>
> also gives same LTA "Undeclared routine: use" error, would be nice if
> it told use how to use a module from an interpolated string instead.
>
> thanks!




This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org