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 can't load classes from inside a module #1620

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

Rakudo can't load classes from inside a module #1620

p6rt opened this issue Mar 23, 2010 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Mar 23, 2010

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

Searchable as RT73760$

@p6rt
Copy link
Author

p6rt commented Mar 23, 2010

From @moritz

Consider these files​:

# JSON/Tiny.pm
module JSON​::Tiny;
use JSON​::Tiny​::Grammar;

# JSON/Tiny/Grammar.pm
class JSON​::Tiny​::Grammar { };

$ perl6 JSON/Tiny.pm
Can't handle scope declarator on modules yet
current instr.​: 'perl6;Perl6;Compiler;Module;finish' pc 29044
(src/gen/package_pm.pir​:410)
called from Sub 'perl6;Perl6;Actions;_block2939' pc 204314
(src/gen/perl6-actions.pir​:3847)

This also happens when loading a grammar instead of a class.

I tried to put the use outside the module, and got​:

"Illegal redeclaration of symbol 'JSON​::Tiny'"

Which is less-than-awesome, because it means I can't get JSON​::Tiny
working at all :(

@p6rt
Copy link
Author

p6rt commented Mar 23, 2010

From @jnthn

On Tue Mar 23 00​:09​:02 2010, moritz wrote​:

Consider these files​:

# JSON/Tiny.pm
module JSON​::Tiny;
use JSON​::Tiny​::Grammar;

# JSON/Tiny/Grammar.pm
class JSON​::Tiny​::Grammar { };

$ perl6 JSON/Tiny.pm
Can't handle scope declarator on modules yet
current instr.​: 'perl6;Perl6;Compiler;Module;finish' pc 29044
(src/gen/package_pm.pir​:410)
called from Sub 'perl6;Perl6;Actions;_block2939' pc 204314
(src/gen/perl6-actions.pir​:3847)

This also happens when loading a grammar instead of a class.

I tried to put the use outside the module, and got​:

"Illegal redeclaration of symbol 'JSON​::Tiny'"

Which is less-than-awesome, because it means I can't get JSON​::Tiny
working at all :(

Fixed in 0188099 and assigned to moritz++ for spectests.

Thanks,

Jonathan

@p6rt
Copy link
Author

p6rt commented Mar 23, 2010

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

@p6rt
Copy link
Author

p6rt commented Mar 28, 2010

From @moritz

now tested in S10-packages/basic.t

@p6rt
Copy link
Author

p6rt commented Mar 28, 2010

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

@p6rt p6rt closed this as completed Mar 28, 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