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

export sub from used module is broken if make pir #333

Closed
p6rt opened this issue Sep 20, 2008 · 7 comments
Closed

export sub from used module is broken if make pir #333

p6rt opened this issue Sep 20, 2008 · 7 comments

Comments

@p6rt
Copy link

p6rt commented Sep 20, 2008

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

Searchable as RT59104$

@p6rt
Copy link
Author

p6rt commented Sep 20, 2008

From @ilyabelikin

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

@p6rt
Copy link
Author

p6rt commented Sep 20, 2008

From @ilyabelikin

modules.tar

@p6rt
Copy link
Author

p6rt commented Sep 20, 2008

From @moritz

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).

Moritz

@p6rt
Copy link
Author

p6rt commented Sep 20, 2008

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

@p6rt
Copy link
Author

p6rt commented Sep 21, 2008

From @pmichaud

On Fri, Sep 19, 2008 at 10​:45​:30PM -0700, Ilya Belikin wrote​:

# 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

@p6rt
Copy link
Author

p6rt commented Nov 4, 2008

From @jnthn

On Sat Sep 20 01​:25​:09 2008, moritz wrote​:

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

@p6rt
Copy link
Author

p6rt commented Nov 4, 2008

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

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