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

require Foo <&foo> is broken #5034

Open
p6rt opened this issue Jan 10, 2016 · 2 comments
Open

require Foo <&foo> is broken #5034

p6rt opened this issue Jan 10, 2016 · 2 comments

Comments

@p6rt
Copy link

p6rt commented Jan 10, 2016

Migrated from rt.perl.org#127233 (status was 'new')

Searchable as RT127233$

@p6rt
Copy link
Author

p6rt commented Jan 10, 2016

From @LLFourn

Looks like we've got a regression.
# lib/Foo.pm6
sub ok is export { }

perl6 -Ilib -e 'require Foo <&ok>;'
WARNINGS for -e​:
Useless use of constant string "Foo" in sink context (lines 1, 1)
Trying to import symbols &ok from 'Foo', but it does not export anything
  in block <unit> at -e line 1

perl6 -Ilib -e 'require :​:("Test") <&ok>;'
WARNINGS for -e​:
Useless use of constant string "Test" in sink context (lines 1, 1)

Obviously this ticket is not focused on the warning but it would be cool if
that got fixed. BTW roast only tests require on Test.pm which is why this
got missed.

@p6rt
Copy link
Author

p6rt commented Jan 10, 2016

From @LLFourn

Doh. Obviously that first example should be​:

perl6 -Ilib -e 'require :​:("Foo") <&ok>;'
WARNINGS for -e​:
Useless use of constant string "Foo" in sink context (lines 1, 1)
Trying to import symbols &ok from 'Foo', but it does not export anything
  in block <unit> at -e line 1

On Mon, Jan 11, 2016 at 7​:35 AM Lloyd Fournier <perl6-bugs-followup@​perl.org>
wrote​:

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

Looks like we've got a regression.
# lib/Foo.pm6
sub ok is export { }

perl6 -Ilib -e 'require Foo <&ok>;'
WARNINGS for -e​:
Useless use of constant string "Foo" in sink context (lines 1, 1)
Trying to import symbols &ok from 'Foo', but it does not export anything
in block <unit> at -e line 1

perl6 -Ilib -e 'require :​:("Test") <&ok>;'
WARNINGS for -e​:
Useless use of constant string "Test" in sink context (lines 1, 1)

Obviously this ticket is not focused on the warning but it would be cool if
that got fixed. BTW roast only tests require on Test.pm which is why this
got missed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant