Skip Menu |
Report information
Id: 59104
Status: resolved
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: ihrd <forihrd [at] gmail.com>
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: export sub from used module is broken if make pir
Date: Sat, 20 Sep 2008 16:45:07 +1100
To: perl6-bugs [...] perl.org
From: "Илья" <forihrd [...] gmail.com>
Download (untitled) / with headers
text/plain 2.8k
Hi, I compile parrot r31282 and November do not export sub from modules on pir (in r31264 the same situation): Example: Foo/Bar.pm: sub bar ($a) is export { say $a; } Foo.pm: use Foo::Bar; sub foo { bar("A-a-a"); } sub test { "test".say; } test.pl: use Foo; test(); foo(); this work, but if I make it to pir, work only test() call and "Could not find non-existent sub bar" happened. is export do not help, obvious module declaration too. Example source with Makefile in attach. Thank you! Ilya --- osname= linux osvers= 2.6.15.7 arch= i486-linux-gnu-thread-multi cc= cc --- --- Summary of my parrot 0.7.1 (r31282) configuration: configdate='Sat Sep 20 04:10:49 2008 GMT' Platform: osname=linux, archname=i486-linux-gnu-thread-multi jitcapable=1, jitarchname=i386-linux, jitosname=LINUX, jitcpuarch=i386 execcapable=1 perl=/usr/local/bin/perl Compiler: cc='cc', ccflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHASATTRIBUTE_CONST -DHASATTRIBUTE_DEPRECATED -DHASATTRIBUTE_MALLOC -DHASATTRIBUTE_NONNULL -DHASATTRIBUTE_NORETURN -DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED -DHASATTRIBUTE_WARN_UNUSED_RESULT -falign-functions=16 -fvisibility=hidden -maccumulate-outgoing-args -W -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wdisabled-optimization -Wendif-labels -Wextra -Wformat -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit -Wimport -Winit-self -Winline -Winvalid-pch -Wmissing-braces -Wmissing-field-initializers -Wno-missing-format-attribute -Wmissing-include-dirs -Wpacked -Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wno-shadow -Wsign-compare -Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wtrigraphs -Wundef -Wunknown-pragmas -Wno-unused -Wvariadic-macros -Wwrite-strings -Wbad-function-cast -Wc++-compat -Wdeclaration-after-statement -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wnonnull -DDISABLE_GC_DEBUG=1 -DNDEBUG -O2 -DHAS_GETTEXT', Linker and Libraries: ld='cc', ldflags=' -L/usr/local/lib', cc_ldflags='', libs='-ldl -lm -lpthread -lcrypt -lrt -lgmp -lreadline -lpcre -lcrypto ' Dynamic Linking: share_ext='.so', ld_share_flags='-shared -L/usr/local/lib -fPIC', load_ext='.so', ld_load_flags='-shared -L/usr/local/lib -fPIC' Types: iv=long, intvalsize=4, intsize=4, opcode_t=long, opcode_t_size=4, ptrsize=4, ptr_alignment=1 byteorder=1234, nv=double, numvalsize=8, doublesize=8 --- Environment: HOME =/home/ihrd LANG =en_NZ.UTF-8 LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH =/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games SHELL =/bin/bash
Download modules.tar
application/x-tar 20k

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 613b
On Fri Sep 19 22:45:29 2008, ihrd wrote: Show quoted text
> Hi, > I compile parrot r31282 and November do not export sub from modules on > pir (in r31264 the same situation):
I suspect that could be related to r31226 | jonathan | 2008-09-18 12:46:58 +0200 (Thu, 18 Sep 2008) | 1 line [rakudo] Make use happen at BEGIN time. This lets us use modules that contain classes. However, we still have various issues to follow up on with this (for example, making it work when you use a module that does a use itself, which gives very odd errors at the moment, and making this play well when a pre-compiled modul e does a use). Moritz
Subject: Re: [perl #59104] export sub from used module is broken if make pir
Date: Sun, 21 Sep 2008 10:39:47 -0500
To: perl6-compiler [...] perl.org
From: "Patrick R. Michaud" <pmichaud [...] pobox.com>
Download (untitled) / with headers
text/plain 682b
On Fri, Sep 19, 2008 at 10:45:30PM -0700, Ilya Belikin wrote: Show quoted text
> # New Ticket Created by Ilya Belikin > # Please include the string: [perl #59104] > # in the subject line of all future correspondence about this issue. > # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=59104 > > > > Hi, > I compile parrot r31282 and November do not export sub from modules on > pir (in r31264 the same situation): > > Example: > > Foo/Bar.pm: > > sub bar ($a) is export { say $a; }
Correct, Rakudo doesn't implement "is export" as of yet. It's one of those features that we need in place so that we can begin writing builtins in Perl 6 instead of PIR, so it should happen soon. Pm
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 1014b
On Sat Sep 20 01:25:09 2008, moritz wrote: Show quoted text
> On Fri Sep 19 22:45:29 2008, ihrd wrote:
> > Hi, > > I compile parrot r31282 and November do not export sub from modules on > > pir (in r31264 the same situation):
> > I suspect that could be related to > > r31226 | jonathan | 2008-09-18 12:46:58 +0200 (Thu, 18 Sep 2008) | 1 line > > [rakudo] Make use happen at BEGIN time. This lets us use modules that > contain classes. However, we still have various issues to follow up on > with this (for example, making it work when you use a module that does a > use itself, which gives very odd errors at the moment, and making this > play well when a pre-compiled modul > e does a use). >
Yes, it was. I've now in r32325 done something that gives us the best of both worlds, so you can still use classes written in modules (pre-compiled ones too) but pre-compiled PIR modules work again. We'll want to re-visit it at some point in the future, but for now this un-breaks what was broken before. Hope this helps! Jonathan


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org