We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Migrated from rt.perl.org#123541 (status was 'open')
Searchable as RT123541$
The text was updated successfully, but these errors were encountered:
$ perl6 -v This is perl6 version 2014.12-86-g43b724e built on MoarVM version 2014.12
$ cat M.pm use v6; use DBIish;
module M { INIT { # A DBIish.connect("SQLite", :database<db>, :RaiseError); # B } # A
our sub x() is export { say "OH HAI"; } }
$ perl6 -I. -e'use M; x()' ===SORRY!=== Error while compiling -e Undeclared routine: x used at line 1
...
This is not what I expected. I expected it to print "OH HAI".
Furthermore, remove the two lines marked "A", and it works as expected. Remove the line marked "B" and it works.
My best guess, for what it's worth, is that the method call in the INIT block is interfering with the normal exporting from the module.
Sorry, something went wrong.
On 04 Jan 2015, at 14:47, Carl Mäsak (via RT) <perl6-bugs-followup@perl.org> wrote: # New Ticket Created by "Carl Mäsak" # Please include the string: [perl #123541] # in the subject line of all future correspondence about this issue. # <URL: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=123541 > $ perl6 -v This is perl6 version 2014.12-86-g43b724e built on MoarVM version 2014.12 $ cat M.pm use v6; use DBIish; module M { INIT { # A DBIish.connect("SQLite", :database<db>, :RaiseError); # B } # A our sub x() is export { say "OH HAI"; } } $ perl6 -I. -e'use M; x()' ===SORRY!=== Error while compiling -e Undeclared routine: x used at line 1 ... This is not what I expected. I expected it to print "OH HAI". Furthermore, remove the two lines marked "A", and it works as expected. Remove the line marked "B" and it works. My best guess, for what it's worth, is that the method call in the INIT block is interfering with the normal exporting from the module.
On 04 Jan 2015, at 14:47, Carl Mäsak (via RT) <perl6-bugs-followup@perl.org> wrote:
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #123541] # in the subject line of all future correspondence about this issue. # <URL: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=123541 >
use v6; use Test; module M { INIT { say <a b c>.Set; }
our sub x is export { say "x" } }
This works without any problem.
I would concur that it is not just any method call, but something specific to DBIish.connect;
Liz
The RT System itself - Status changed from 'new' to 'open'
No branches or pull requests
Migrated from rt.perl.org#123541 (status was 'open')
Searchable as RT123541$
The text was updated successfully, but these errors were encountered: