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

Owner: Nobody
Requestors: raiph <raiph.mellor [at] gmail.com>
Cc:
AdminCc:

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



Subject: [LTA] "Do not know how to load code from <foo>" due to wrong capitalization of <Foo>
Download (untitled) / with headers
text/plain 529b
See http://irclog.perlgeek.de/perl6/2015-09-17#i_11235064 What a user tried ================= use Inline::Perl5; use SNMP.pm:from<perl5>; Note the lowercase 'p' in 'perl5'. (A similar case applies to 'Java' vs 'java' and presumably 'Python' vs 'python' etc.) What they got ============= Do not know how to load code from perl5 What to do ========== Perhaps loader names would best be case insensitive (but maybe that's not perlish) or a 'did you mean?' response based on available loaders is warranted (that seems p6ish).
Download (untitled) / with headers
text/plain 2.4k
On Thu Sep 17 13:32:26 2015, raiph wrote: Show quoted text
> See http://irclog.perlgeek.de/perl6/2015-09-17#i_11235064 > > What a user tried > ================= > > use Inline::Perl5; > use SNMP.pm:from<perl5>; > > Note the lowercase 'p' in 'perl5'. > > (A similar case applies to 'Java' vs 'java' and presumably 'Python' vs > 'python' etc.) > > What they got > ============= > > Do not know how to load code from perl5 > > What to do > ========== > > Perhaps loader names would best be case insensitive (but maybe that's > not perlish) or a 'did you mean?' response based on available loaders > is warranted (that seems p6ish).
< psch> huh, we've removed the deprecation warnings for "use ...:from<java>" but still allow it..? < psch> i suppose that ties in with RT #126088 < ShimmerFairy> isn't :from<foo> an important part of the use declaration? (Or am I missing something?) < psch> ShimmerFairy: :from<java> was deprecated in favor of :from<Java> < psch> ShimmerFairy: which is what the ticket is about, for the lazy :) < ShimmerFairy> psch: ah, so it's just the from<> adverb assuming anyone would be silly enough to try and make a distinction between 'java' and 'Java' :P < psch> i'm inclined to say ".lc the language name when registering the loader" as a resolution for the ticket, fwiw < psch> oh, and also ".lc the :from-value when looking for a loader" of course < ShimmerFairy> psch: or .fc , since that's generally the nicer way to do caseless comparison < ShimmerFairy> (in Unicode land, specifically) < psch> ShimmerFairy: right, Unicode land is somewhat uncharted for me :) < ShimmerFairy> psch: so, it'd be something like given $from.fc { when "java".fc { ... } ... } , to give you an idea : < psch> m: say &fc <+camelia> rakudo-moar 03a9e7: OUTPUT«===SORRY!=== Error while compiling /tmp/xWLPMCGXlW␤Undeclared routine:␤ &fc used at line 1. Did you mean '&uc', '&lc', '&tc'?␤␤» < ShimmerFairy> m: say "FoO".fc <+camelia> rakudo-moar 03a9e7: OUTPUT«Method 'fc' not found for invocant of class 'Str'␤ in block <unit> at /tmp/wsCsRTQMXL:1␤␤» < psch> the remaining question would be if we require the module loader to be registered with the .fc name or do assume we have to do it ourselves < ShimmerFairy> I think for clarity in the code that does the actual comparison, it'd be best to have it do .fc on both. 12:23 < ShimmerFairy> (It would also let module loader writers care less :P)
Download (untitled) / with headers
text/html 1006b
Still reproducible (2017.11,HEAD(e5b660e)). Yes, the error message could be better.

On 2015-09-17 13:32:26, raiph wrote:
Show quoted text
> See http://irclog.perlgeek.de/perl6/2015-09-17#i_11235064
>
> What a user tried
> =================
>
> use Inline::Perl5;
> use SNMP.pm:from<perl5>;
>
> Note the lowercase 'p' in 'perl5'.
>
> (A similar case applies to 'Java' vs 'java' and presumably 'Python' vs
> 'python' etc.)
>
> What they got
> =============
>
> Do not know how to load code from perl5
>
> What to do
> ==========
>
> Perhaps loader names would best be case insensitive (but maybe that's
> not perlish) or a 'did you mean?' response based on available loaders
> is warranted (that seems p6ish).




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