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

package Foo; does not cause parsefail #1797

Closed
p6rt opened this issue May 30, 2010 · 8 comments
Closed

package Foo; does not cause parsefail #1797

p6rt opened this issue May 30, 2010 · 8 comments

Comments

@p6rt
Copy link

p6rt commented May 30, 2010

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

Searchable as RT75458$

@p6rt
Copy link
Author

p6rt commented May 30, 2010

From @ShimmerFairy

[10​:13​:37] <lue> rakudo​: package Foo;
[10​:13​:41] <p6eval> rakudo 749fe9​: ( no output )
[10​:13​:50] <masak> lue​: care to submit that one?
[10​:13​:59] * lue submits rakudobug

This should instead return a parsefail, according to S10. At this time,
even STD believes it to be OK.

--
Don't Panic!

@p6rt
Copy link
Author

p6rt commented May 31, 2010

From @masak

<phenny> masak​: 30 May 19​:03Z <sorear> tell masak : there is no 'package' statement in Perl
6. "package Foo;" is interpreted as meaning "use v5; package Foo;" to allow pure-Perl-5
modules to be used unaltered. STD implements this (partially)
<masak> sorear​: if by 'package statement' you mean 'braceless package declaration', then I
agree. I can see how it would be right for STD.pm6 to actually allow such a form, if it did
enough p5. Rakudo, in its present form, should probably disallow it.

@p6rt
Copy link
Author

p6rt commented May 31, 2010

From [Unknown Contact. See original ticket]

<phenny> masak​: 30 May 19​:03Z <sorear> tell masak : there is no 'package' statement in Perl
6. "package Foo;" is interpreted as meaning "use v5; package Foo;" to allow pure-Perl-5
modules to be used unaltered. STD implements this (partially)
<masak> sorear​: if by 'package statement' you mean 'braceless package declaration', then I
agree. I can see how it would be right for STD.pm6 to actually allow such a form, if it did
enough p5. Rakudo, in its present form, should probably disallow it.

@p6rt
Copy link
Author

p6rt commented May 31, 2010

@masak - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jun 1, 2010

From @markjreed

Even with braces, I thought "package" was gone, replaced by "class"
and "module".

On Monday, May 31, 2010, Carl Mäsak via RT <bugs-comment@​bugs6.perl.org> wrote​:

<phenny> masak​: 30 May 19​:03Z <sorear> tell masak : there is no 'package' statement in Perl
6.  "package Foo;" is interpreted as meaning "use v5; package Foo;" to allow pure-Perl-5
modules to be used unaltered.  STD implements this (partially)
<masak> sorear​: if by 'package statement' you mean 'braceless package declaration', then I
agree. I can see how it would be right for STD.pm6 to actually allow such a form, if it did
enough p5. Rakudo, in its present form, should probably disallow it.

--
Mark J. Reed <markjreed@​gmail.com>

@p6rt
Copy link
Author

p6rt commented Jun 1, 2010

From @masak

Mark (>)​:

Even with braces, I thought "package" was gone, replaced by "class"
and "module".

Then you might want to take a look at synopsis 10. It's about packages.

<http://perlcabal.org/syn/S10.html>

(But no, it's not very clear to me either what I would actually *do*
with a package that I wouldn't use a module or a class for instead.)

// Carl

@p6rt
Copy link
Author

p6rt commented Jun 6, 2010

From @jnthn

On Sun May 30 10​:21​:26 2010, lue wrote​:

[10​:13​:37] <lue> rakudo​: package Foo;
[10​:13​:41] <p6eval> rakudo 749fe9​: ( no output )
[10​:13​:50] <masak> lue​: care to submit that one?
[10​:13​:59] * lue submits rakudobug

This should instead return a parsefail, according to S10. At this time,
even STD believes it to be OK.

It now gives a helpful error if you do so, indicating that it appears
that the code is Perl 5, and not to use this form if you intended that
it were Perl 6. Given to moritz++ for spectesting.

Thanks,

Jonathan

@p6rt
Copy link
Author

p6rt commented Oct 4, 2010

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

@p6rt p6rt closed this as completed Oct 4, 2010
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