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

Missing commas in import tags silently ignored #5628

Open
p6rt opened this issue Aug 30, 2016 · 4 comments
Open

Missing commas in import tags silently ignored #5628

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

Comments

@p6rt
Copy link

p6rt commented Aug 30, 2016

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

Searchable as RT129143$

@p6rt
Copy link
Author

p6rt commented Aug 30, 2016

From @skids

$ cat XX.pm6
unit module XX;

our sub fee() is export { }

our sub fie() is export(​:tag1) { }

our sub foo() is export(​:tag1 :tag2) { }

our sub fum() is export(​:DEFAULT :tag3) { }

$ PERL6LIB=. perl6 -e 'use XX; fee()'
$ PERL6LIB=. perl6 -e 'use XX; fum()'
$ PERL6LIB=. perl6 -e 'use XX :tag1; foo()'
$ PERL6LIB=. perl6 -e 'use XX :tag2; foo()'
$ PERL6LIB=. perl6 -e 'use XX :tag2 :DEFAULT; foo()'
$ PERL6LIB=. perl6 -e 'use XX :DEFAULT :tag2; foo()'
===SORRY!=== Error while compiling -e
Undeclared routine​:
  foo used at line 1

$ PERL6LIB=. perl6 -e 'use XX :tag2 :tag1; foo()'
$ PERL6LIB=. perl6 -e 'use XX :tag1 :tag2; foo()'
$ PERL6LIB=. perl6 -e 'use XX :DEFAULT :tag3; fum()'
$ PERL6LIB=. perl6 -e 'use XX :tag3 :DEFAULT; fum()'
$ PERL6LIB=. perl6 -e 'use XX :tag1 :DEFAULT :tag2; foo()'
$ PERL6LIB=. perl6 -e 'use XX :tag3 :DEFAULT :tag2; foo()'
===SORRY!=== Error while compiling -e
Undeclared routine​:
  foo used at line 1

@p6rt
Copy link
Author

p6rt commented Aug 31, 2016

From @LLFourn

You have to have a comma after each tag. I think it will work if you do
(can't test atm). It's def LTA that there's no syntax error. Arg parsing
for use statements is LTA in general I think.

LL
On Wed, 31 Aug 2016 at 9​:29 AM, Brian S. Julin <perl6-bugs-followup@​perl.org>
wrote​:

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

$ cat XX.pm6
unit module XX;

our sub fee() is export { }

our sub fie() is export(​:tag1) { }

our sub foo() is export(​:tag1 :tag2) { }

our sub fum() is export(​:DEFAULT :tag3) { }

$ PERL6LIB=. perl6 -e 'use XX; fee()'
$ PERL6LIB=. perl6 -e 'use XX; fum()'
$ PERL6LIB=. perl6 -e 'use XX :tag1; foo()'
$ PERL6LIB=. perl6 -e 'use XX :tag2; foo()'
$ PERL6LIB=. perl6 -e 'use XX :tag2 :DEFAULT; foo()'
$ PERL6LIB=. perl6 -e 'use XX :DEFAULT :tag2; foo()'
===SORRY!=== Error while compiling -e
Undeclared routine​:
foo used at line 1

$ PERL6LIB=. perl6 -e 'use XX :tag2 :tag1; foo()'
$ PERL6LIB=. perl6 -e 'use XX :tag1 :tag2; foo()'
$ PERL6LIB=. perl6 -e 'use XX :DEFAULT :tag3; fum()'
$ PERL6LIB=. perl6 -e 'use XX :tag3 :DEFAULT; fum()'
$ PERL6LIB=. perl6 -e 'use XX :tag1 :DEFAULT :tag2; foo()'
$ PERL6LIB=. perl6 -e 'use XX :tag3 :DEFAULT :tag2; foo()'
===SORRY!=== Error while compiling -e
Undeclared routine​:
foo used at line 1

@p6rt
Copy link
Author

p6rt commented Aug 31, 2016

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

@p6rt
Copy link
Author

p6rt commented Sep 4, 2016

From @zoffixznet

On Tue Aug 30 20​:33​:54 2016, lloyd.fourn@​gmail.com wrote​:

You have to have a comma after each tag. I think it will work if you

Tested. Yes, it works fine with commas.

This is related to/same-cause as https://rt-archive.perl.org/perl6/Ticket/Display.html?id=127134#ticket-history

@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