Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error on accidental use use Module::With::Colons #5502

Open
p6rt opened this issue Jul 30, 2016 · 3 comments
Open

error on accidental use use Module::With::Colons #5502

p6rt opened this issue Jul 30, 2016 · 3 comments
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Jul 30, 2016

Migrated from rt.perl.org#128781 (status was 'open')

Searchable as RT128781$

@p6rt
Copy link
Author

p6rt commented Jul 30, 2016

From @zoffixznet

If you accidentally put "use" twice with a module that has double colons in the name, the error is LTA as says nothing of the actual reason for failure and also lacks any references such as file names or lines.

<Zoffix> m​: use use Foo​::Bar
<camelia> rakudo-moar 15ee3c​: OUTPUT«===SORRY!===␤Could not find symbol '&Bar'␤»

It happens regardless of whether the actual module exists or not​:

$ tree
.
└── Foo
  └── Bar
  └── Ber.pm6

2 directories, 1 file

$ cat Foo/Bar/Ber.pm6
unit class Foo​::Bar​::Ber;

$ perl6 -I. -e 'use use Foo​::Bar​::Ber'
===SORRY!===
Could not find symbol '&Ber'

--
Cheers,
ZZ | https://twitter.com/zoffix

@p6rt
Copy link
Author

p6rt commented Jul 30, 2016

From @lizmat

On 30 Jul 2016, at 19​:11, Zoffix Znet (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Zoffix Znet
# Please include the string​: [perl #​128781]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=128781 >

If you accidentally put "use" twice with a module that has double colons in the name, the error is LTA as says nothing of the actual reason for failure and also lacks any references such as file names or lines.

<Zoffix> m​: use use Foo​::Bar
<camelia> rakudo-moar 15ee3c​: OUTPUT«===SORRY!===␤Could not find symbol '&Bar'␤»

It happens regardless of whether the actual module exists or not​:

$ tree
.
└── Foo
└── Bar
└── Ber.pm6

2 directories, 1 file

$ cat Foo/Bar/Ber.pm6
unit class Foo​::Bar​::Ber;

$ perl6 -I. -e 'use use Foo​::Bar​::Ber'
===SORRY!===
Could not find symbol '&Ber'

Running this with RAKUDO_MODULE_DEBUG=1 shows that it doesn’t even try to load it as a pragma first​:

$ RAKUDO_MODULE_DEBUG=1 6 'use use Foo​::Bar'
  90921 RMD​: Loading settings CORE
  90921 RMD​: Setting up default paths​: . blib
  90921 RMD​: going to load Perl6​::BOOTSTRAP
  90921 RMD​: Settings CORE loaded
===SORRY!===
Could not find symbol '&Bar’

Compare with​:

$ RAKUDO_MODULE_DEBUG=1 6 'use Foo​::Bar'
  90923 RMD​: Loading settings CORE
  90923 RMD​: Setting up default paths​: . blib
  90923 RMD​: going to load Perl6​::BOOTSTRAP
  90923 RMD​: Settings CORE loaded
  30 90923 RMD​: Attempting 'Foo​::Bar' as a pragma
  6 90923 RMD​: 'Foo​::Bar' is not a valid pragma
  1 90923 RMD​: Attempting to load 'Foo​::Bar'
  0 90923 RMD​: Late loading 'Foo​::Bar'
===SORRY!===
Could not find Foo​::Bar at line 1 in​:
(*snip*)

Liz

@p6rt
Copy link
Author

p6rt commented Jul 30, 2016

The RT System itself - Status changed from 'new' to 'open'

@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

1 participant