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

Rakudo is to permissive with semicolon-form package declarations inside package blocks #1578

Closed
p6rt opened this issue Mar 5, 2010 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Mar 5, 2010

Migrated from rt.perl.org#73328 (status was 'resolved')

Searchable as RT73328$

@p6rt
Copy link
Author

p6rt commented Mar 5, 2010

From @masak

<diakopter> rakudo​: package foo { our package bar; say bar; }
<p6eval> rakudo b348b3​: OUTPUT«bar␤»
<diakopter> std​: package foo { our package bar; say bar; }
<p6eval> std 29945​: OUTPUT«�[31m===�[0mSORRY!�[31m===�[0m␤Too late for
semicolon form of package definition [...] FAILED 00​:01 105m␤»
<masak> diakopter​: that's correct.
<diakopter> which? rakudo?
<masak> oh, rakudo does it wrong...
<masak> STD is correct.
* masak submits rakudobug
<masak> alpha​: package foo { our package bar; say bar; }
<p6eval> alpha 30e0ed​: OUTPUT«Malformed declaration at line 10, near
"package ba" [...]
<masak> even alpha has a LTA error message.
<diakopter> sorta a regression, maybe
<masak> yes.

@p6rt
Copy link
Author

p6rt commented Aug 20, 2010

From @bbkr

On Pisa build.

[15​:12] <bbkr> rakudo​: package foo { our package bar; say bar; }
[15​:12] <p6eval> rakudo e45bf6​: OUTPUT«===SORRY!===␤This appears to be
Perl 5 code. If you intended it to be Perl 6 code, please use a Perl 6
style package block like "package Foo { ... }", or "module Foo; ...". at
line 22, near "say bar; }"␤»

[15​:15] <bbkr> std​: package foo { our package bar; say bar; }
[15​:15] <p6eval> std 32068​: OUTPUT«�[31m===�[0mSORRY!�[31m===�[0m␤Too
late for semicolon form of package definition at /tmp/0fyQ5aN_c_ line
1​:␤------> �[32mpackage foo { our package bar�[33m⏏�[31m; say bar;
}�[0m␤ expecting any of​:␤ name␤ trait␤Parse failed␤FAILED
00​:01 115m␤»

@p6rt
Copy link
Author

p6rt commented Aug 20, 2010

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

@p6rt
Copy link
Author

p6rt commented May 29, 2012

From @diakopter

On Fri Aug 20 06​:16​:26 2010, bbkr wrote​:

On Pisa build.

[15​:12] <bbkr> rakudo​: package foo { our package bar; say bar; }
[15​:12] <p6eval> rakudo e45bf6​: OUTPUT«===SORRY!===␤This appears to
be
Perl 5 code. If you intended it to be Perl 6 code, please use a Perl 6
style package block like "package Foo { ... }", or "module Foo; ...".
at
line 22, near "say bar; }"␤»

[15​:15] <bbkr> std​: package foo { our package bar; say bar; }
[15​:15] <p6eval> std 32068​: OUTPUT«�[31m===�[0mSORRY!�[31m===�[0m␤Too
late for semicolon form of package definition at /tmp/0fyQ5aN_c_ line
1​:␤------> �[32mpackage foo { our package bar�[33m⏏�[31m; say bar;
}�[0m␤ expecting any of​:␤ name␤ trait␤Parse
failed␤FAILED
00​:01 115m␤»

behavior now matches STD. marking testneeded.

15​:24 <diakopter> rakudo​: package foo { our package bar; say bar; }
15​:24 <p6eval> rakudo 3b1596​: OUTPUT«===SORRY!===␤Too late for
semicolon form of $*PKGDECL
  definition at line 2, near "say bar; }"␤»

@p6rt
Copy link
Author

p6rt commented Jun 5, 2012

From @moritz

Now tested in S10-packages/basic.t.

@p6rt
Copy link
Author

p6rt commented Jun 5, 2012

@moritz - Status changed from 'open' to 'resolved'

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

No branches or pull requests

1 participant