Fixed (changed) test 46 in B::C
The group you are posting to is a
Usenet group . Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From:
Reini Urban <rur... @x-ray.at>
Date: Wed, 19 Oct 2011 11:30:54 -0500
Local: Wed, Oct 19 2011 12:30 pm
Subject: Fixed (changed) test 46 in B::C
Hi Nick,
See http://code.google.com/p/perl-compiler/source/detail?r=1206 You wanted to test for the Exporter STASH to appear in the *main:: STASH
You did: use Exporter; if (exists $main::{"Exporter::"}) { print "ok"; } which passed in perl but failed in perlcc
The test should be use Exporter; print q(ok) if defined *main::Exporter::{HASH};
In your test $main:: is autovivified to main:: at run-time only, which is optimized away at compile-time. We could use such a behaviour as test if we run compiled or not, but it looks dirty. -- Reini Urban http://cpanel.net/ http://www.perl-compiler.org/
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"J. Nick Koston" <n... @cpanel.net>
Date: Thu, 20 Oct 2011 08:13:20 +0800
Local: Wed, Oct 19 2011 8:13 pm
Subject: Re: Fixed (changed) test 46 in B::C
Hi Reini,
I think we need something like this
'use Exporter; use Data::Dumper (); print Data::Dumper::Dumper(\%main::);'
to work the same as it does in compiled and non-compiled perl. I'm concerned with code that checks for these symbols and loads code dynamically.
-Nick
On Oct 20, 2011, at 12:30 AM, Reini Urban wrote:
> Hi Nick,
> See http://code.google.com/p/perl-compiler/source/detail?r=1206 > You wanted to test for the Exporter STASH to appear in the *main:: STASH
> You did: > use Exporter; if (exists $main::{"Exporter::"}) { print "ok"; } > which passed in perl but failed in perlcc
> The test should be > use Exporter; print q(ok) if defined *main::Exporter::{HASH};
> In your test $main:: is autovivified to main:: at run-time only, which > is optimized away at compile-time. > We could use such a behaviour as test if we run compiled or not, but > it looks dirty. > -- > Reini Urban > http://cpanel.net/ http://www.perl-compiler.org/
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Reini Urban <rur... @x-ray.at>
Date: Thu, 20 Oct 2011 09:10:01 -0500
Local: Thurs, Oct 20 2011 10:10 am
Subject: Re: [perl-compiler] Re: Fixed (changed) test 46 in B::C
On Wed, Oct 19, 2011 at 7:13 PM, J. Nick Koston <n
... @cpanel.net> wrote:
> I think we need something like this
> 'use Exporter; use Data::Dumper (); print Data::Dumper::Dumper(\%main::);'
> to work the same as it does in compiled and non-compiled perl. I'm concerned with code that checks for these symbols and loads code dynamically.
Almost works:
$ pb -e'use Exporter; use Data::Dumper (); CHECK{ print Data::Dumper::Dumper(\%main::) }' $VAR1 = { 'version::' => *{'::version::'}, '/' => *{'::/'}, 'stderr' => *::stderr, 'SIG' => *::SIG, ',' => *{'::,'}, 'utf8::' => *{'::utf8::'}, '"' => *{'::"'}, 're::' => *{'::re::'}, 'DynaLoader::' => *{'::DynaLoader::'}, 'mro::' => *{'::mro::'}, 'strict::' => *{'::strict::'}, 'Cwd::' => *{'::Cwd::'}, 'stdout' => *::stdout, '' => *{'::'}, 'Regexp::' => *{'::Regexp::'}, '_</usr/local/lib/perl5/5.14.2/darwin-thread-debug/auto/Data/Dumper/Dumper. bundle' => *{'::_</usr/local/lib/perl5/5.14.2/darwin-thread-debug/auto/Data/Dumper/Dum per.bundle'}, 'UNIVERSAL::' => *{'::UNIVERSAL::'}, 'overload::' => *{'::overload::'}, '$' => *{'::$'}, 'File::' => *{'::File::'}, 'E_TRIE_MAXBUF' => *{'::E_TRIE_MAXBUF'}, 'Dos::' => *{'::Dos::'}, 'Data::' => *{'::Data::'}, '_<perlmain.c' => *{'::_<perlmain.c'}, '_<universal.c' => *{'::_<universal.c'}, 'BEGIN' => *::BEGIN, '!' => *{'::!'}, 'IO::' => *{'::IO::'}, '' => *{'::'}, '' => *{'::'}, '_' => *::_, 'Exporter::' => *{'::Exporter::'}, 'Internals::' => *{'::Internals::'}, 'STDIN' => *::STDIN, 'Config::' => *{'::Config::'}, 'warnings::' => *{'::warnings::'}, 'DB::' => *{'::DB::'}, '_<perl.c' => *{'::_<perl.c'}, 'EPOC::' => *{'::EPOC::'}, '_</usr/local/lib/perl5/5.14.2/warnings.pm' => *{'::_</usr/local/lib/perl5/5.14.2/warnings.pm'}, '_<mro.c' => *{'::_<mro.c'}, '2' => *{'::2'}, '_<Cwd.c' => *{'::_<Cwd.c'}, 'blib::' => *{'::blib::'}, '1' => *{'::1'}, 'ARNING_BITS' => *{'::ARNING_BITS'}, 'CORE::' => *{'::CORE::'}, '_<DynaLoader.c' => *{'::_<DynaLoader.c'}, 'stdin' => *::stdin, 'ARGV' => *::ARGV, 'INC' => *::INC, '_<-e' => *{'::_<-e'}, 'Scalar::' => *{'::Scalar::'}, 'ENV' => *::ENV, 'vars::' => *{'::vars::'}, 'XSLoader::' => *{'::XSLoader::'}, '_<perlio.c' => *{'::_<perlio.c'}, 'B::' => *{'::B::'}, 'main::' => *{'::main::'}, 'Carp::' => *{'::Carp::'}, 'VMS::' => *{'::VMS::'}, 'Win32::' => *{'::Win32::'}, 'PerlIO::' => *{'::PerlIO::'}, '0' => *{'::0'}, ' => *{':'}, '@' => *{'::@'}, 'STDOUT' => *::STDOUT, ']' => *{'::]'}, '3' => *{'::3'}, '_</usr/local/lib/perl5/5.14.2/darwin-thread-debug/auto/Cwd/Cwd.bundle' => *{'::_</usr/local/lib/perl5/5.14.2/darwin-thread-debug/auto/Cwd/Cwd.bundle' }, '' => *{'::'}, 'threads::' => *{'::threads::'}, '_<Dumper.c' => *{'::_<Dumper.c'}, 'bytes::' => *{'::bytes::'}, 'STDERR' => *::STDERR };
$ pb script/perlcc -r -e'use Exporter; use Data::Dumper (); print Data::Dumper::Dumper(\%main::)' $VAR1 = { 'stdin' => *::stdin, '' => *{'::'}, 'INC' => *::INC, '3' => *{'::3'}, ']' => *{'::]'}, 'SIG' => *::SIG, '' => *{'::/H'}, '' => *{'::/'}, '2' => *{'::2'}, '"' => *{'::"'}, 'STDERR' => *::STDERR, '0' => *{'::0'}, ';' => *{'::;'}, '!' => *{'::!'} };
What other symbols to we need compiled? We leave out intentionally the symbols beginning with ! ; _< and so on.
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Reini Urban <rur... @x-ray.at>
Date: Thu, 20 Oct 2011 09:15:14 -0500
Local: Thurs, Oct 20 2011 10:15 am
Subject: Re: [perl-compiler] Re: Fixed (changed) test 46 in B::C
On Thu, Oct 20, 2011 at 9:10 AM, Reini Urban <rur
... @x-ray.at> wrote:
> On Wed, Oct 19, 2011 at 7:13 PM, J. Nick Koston <n
... @cpanel.net> wrote:
>> I think we need something like this
>> 'use Exporter; use Data::Dumper (); print Data::Dumper::Dumper(\%main::);'
>> to work the same as it does in compiled and non-compiled perl. I'm concerned with code that checks for these symbols and loads code dynamically.
> Almost works:
> $ pb -e'use Exporter; use Data::Dumper (); CHECK{ print > Data::Dumper::Dumper(\%main::) }' > $VAR1 = { > 'version::' => *{'::version::'}, > '/' => *{'::/'}, > 'stderr' => *::stderr, > 'SIG' => *::SIG, > ',' => *{'::,'}, > 'utf8::' => *{'::utf8::'}, > '"' => *{'::"'}, > 're::' => *{'::re::'}, > 'DynaLoader::' => *{'::DynaLoader::'}, > 'mro::' => *{'::mro::'}, > 'strict::' => *{'::strict::'}, > 'Cwd::' => *{'::Cwd::'}, > 'stdout' => *::stdout, > '' => *{'::'}, > 'Regexp::' => *{'::Regexp::'}, > '_</usr/local/lib/perl5/5.14.2/darwin-thread-debug/auto/Data/Dumper/Dumper. bundle' > => *{'::_</usr/local/lib/perl5/5.14.2/darwin-thread-debug/auto/Data/Dumper/Dum per.bundle'}, > 'UNIVERSAL::' => *{'::UNIVERSAL::'}, > 'overload::' => *{'::overload::'}, > '$' => *{'::$'}, > 'File::' => *{'::File::'}, > 'E_TRIE_MAXBUF' => *{'::E_TRIE_MAXBUF'}, > 'Dos::' => *{'::Dos::'}, > 'Data::' => *{'::Data::'}, > '_<perlmain.c' => *{'::_<perlmain.c'}, > '_<universal.c' => *{'::_<universal.c'}, > 'BEGIN' => *::BEGIN, > '!' => *{'::!'}, > 'IO::' => *{'::IO::'}, > '' => *{'::'}, > '' => *{'::'}, > '_' => *::_, > 'Exporter::' => *{'::Exporter::'}, > 'Internals::' => *{'::Internals::'}, > 'STDIN' => *::STDIN, > 'Config::' => *{'::Config::'}, > 'warnings::' => *{'::warnings::'}, > 'DB::' => *{'::DB::'}, > '_<perl.c' => *{'::_<perl.c'}, > 'EPOC::' => *{'::EPOC::'}, > '_</usr/local/lib/perl5/5.14.2/warnings.pm' => > *{'::_</usr/local/lib/perl5/5.14.2/warnings.pm'}, > '_<mro.c' => *{'::_<mro.c'}, > '2' => *{'::2'}, > '_<Cwd.c' => *{'::_<Cwd.c'}, > 'blib::' => *{'::blib::'}, > '1' => *{'::1'}, > 'ARNING_BITS' => *{'::ARNING_BITS'}, > 'CORE::' => *{'::CORE::'}, > '_<DynaLoader.c' => *{'::_<DynaLoader.c'}, > 'stdin' => *::stdin, > 'ARGV' => *::ARGV, > 'INC' => *::INC, > '_<-e' => *{'::_<-e'}, > 'Scalar::' => *{'::Scalar::'}, > 'ENV' => *::ENV, > 'vars::' => *{'::vars::'}, > 'XSLoader::' => *{'::XSLoader::'}, > '_<perlio.c' => *{'::_<perlio.c'}, > 'B::' => *{'::B::'}, > 'main::' => *{'::main::'}, > 'Carp::' => *{'::Carp::'}, > 'VMS::' => *{'::VMS::'}, > 'Win32::' => *{'::Win32::'}, > 'PerlIO::' => *{'::PerlIO::'}, > '0' => *{'::0'}, > ' => *{':'}, > '@' => *{'::@'}, > 'STDOUT' => *::STDOUT, > ']' => *{'::]'}, > '3' => *{'::3'}, > '_</usr/local/lib/perl5/5.14.2/darwin-thread-debug/auto/Cwd/Cwd.bundle' > => *{'::_</usr/local/lib/perl5/5.14.2/darwin-thread-debug/auto/Cwd/Cwd.bundle' }, > '' => *{'::'}, > 'threads::' => *{'::threads::'}, > '_<Dumper.c' => *{'::_<Dumper.c'}, > 'bytes::' => *{'::bytes::'}, > 'STDERR' => *::STDERR > };
> $ pb script/perlcc -r -e'use Exporter; use Data::Dumper (); print > Data::Dumper::Dumper(\%main::)' > $VAR1 = { > 'stdin' => *::stdin, > '' => *{'::'}, > 'INC' => *::INC, > '3' => *{'::3'}, > ']' => *{'::]'}, > 'SIG' => *::SIG, > '' => *{'::/H'}, > '' => *{'::/'}, > '2' => *{'::2'}, > '"' => *{'::"'}, > 'STDERR' => *::STDERR, > '0' => *{'::0'}, > ';' => *{'::;'}, > '!' => *{'::!'} > };
> What other symbols to we need compiled? > We leave out intentionally the symbols beginning with ! ; _< and so on.
I see. I need to add all the stashes.
'bytes::' => *{'::bytes::'}, and so on.
Should be easy to add.
--
Reini
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"J. Nick Koston" <n... @cpanel.net>
Date: Thu, 20 Oct 2011 22:17:42 +0800
Local: Thurs, Oct 20 2011 10:17 am
Subject: Re: [perl-compiler] Re: Fixed (changed) test 46 in B::C
I think we just need all the package references i.e.:
>> 'Cwd::' => *{'::Cwd::'},
>> 'Config::' => *{'::Config::'},
>> 'DynaLoader::' => *{'::DynaLoader::'},
On Oct 20, 2011, at 10:15 PM, Reini Urban wrote:
> On Thu, Oct 20, 2011 at 9:10 AM, Reini Urban <rur
... @x-ray.at> wrote:
>> On Wed, Oct 19, 2011 at 7:13 PM, J. Nick Koston <n
... @cpanel.net> wrote:
>>> I think we need something like this
>>> 'use Exporter; use Data::Dumper (); print Data::Dumper::Dumper(\%main::);'
>>> to work the same as it does in compiled and non-compiled perl. I'm concerned with code that checks for these symbols and loads code dynamically.
>> Almost works:
>> $ pb -e'use Exporter; use Data::Dumper (); CHECK{ print >> Data::Dumper::Dumper(\%main::) }' >> $VAR1 = { >> 'version::' => *{'::version::'}, >> '/' => *{'::/'}, >> 'stderr' => *::stderr, >> 'SIG' => *::SIG, >> ',' => *{'::,'}, >> 'utf8::' => *{'::utf8::'}, >> '"' => *{'::"'}, >> 're::' => *{'::re::'}, >> 'DynaLoader::' => *{'::DynaLoader::'}, >> 'mro::' => *{'::mro::'}, >> 'strict::' => *{'::strict::'}, >> 'Cwd::' => *{'::Cwd::'}, >> 'stdout' => *::stdout, >> '' => *{'::'}, >> 'Regexp::' => *{'::Regexp::'}, >> '_</usr/local/lib/perl5/5.14.2/darwin-thread-debug/auto/Data/Dumper/Dumper. bundle' >> => *{'::_</usr/local/lib/perl5/5.14.2/darwin-thread-debug/auto/Data/Dumper/Dum per.bundle'}, >> 'UNIVERSAL::' => *{'::UNIVERSAL::'}, >> 'overload::' => *{'::overload::'}, >> '$' => *{'::$'}, >> 'File::' => *{'::File::'}, >> 'E_TRIE_MAXBUF' => *{'::E_TRIE_MAXBUF'}, >> 'Dos::' => *{'::Dos::'}, >> 'Data::' => *{'::Data::'}, >> '_<perlmain.c' => *{'::_<perlmain.c'}, >> '_<universal.c' => *{'::_<universal.c'}, >> 'BEGIN' => *::BEGIN, >> '!' => *{'::!'}, >> 'IO::' => *{'::IO::'}, >> '' => *{'::'}, >> '' => *{'::'}, >> '_' => *::_, >> 'Exporter::' => *{'::Exporter::'}, >> 'Internals::' => *{'::Internals::'}, >> 'STDIN' => *::STDIN, >> 'Config::' => *{'::Config::'}, >> 'warnings::' => *{'::warnings::'}, >> 'DB::' => *{'::DB::'}, >> '_<perl.c' => *{'::_<perl.c'}, >> 'EPOC::' => *{'::EPOC::'}, >> '_</usr/local/lib/perl5/5.14.2/warnings.pm' => >> *{'::_</usr/local/lib/perl5/5.14.2/warnings.pm'}, >> '_<mro.c' => *{'::_<mro.c'}, >> '2' => *{'::2'}, >> '_<Cwd.c' => *{'::_<Cwd.c'}, >> 'blib::' => *{'::blib::'}, >> '1' => *{'::1'}, >> 'ARNING_BITS' => *{'::ARNING_BITS'}, >> 'CORE::' => *{'::CORE::'}, >> '_<DynaLoader.c' => *{'::_<DynaLoader.c'}, >> 'stdin' => *::stdin, >> 'ARGV' => *::ARGV, >> 'INC' => *::INC, >> '_<-e' => *{'::_<-e'}, >> 'Scalar::' => *{'::Scalar::'}, >> 'ENV' => *::ENV, >> 'vars::' => *{'::vars::'}, >> 'XSLoader::' => *{'::XSLoader::'}, >> '_<perlio.c' => *{'::_<perlio.c'}, >> 'B::' => *{'::B::'}, >> 'main::' => *{'::main::'}, >> 'Carp::' => *{'::Carp::'}, >> 'VMS::' => *{'::VMS::'}, >> 'Win32::' => *{'::Win32::'}, >> 'PerlIO::' => *{'::PerlIO::'}, >> '0' => *{'::0'}, >> ' => *{':'}, >> '@' => *{'::@'}, >> 'STDOUT' => *::STDOUT, >> ']' => *{'::]'}, >> '3' => *{'::3'}, >> '_</usr/local/lib/perl5/5.14.2/darwin-thread-debug/auto/Cwd/Cwd.bundle' >> => *{'::_</usr/local/lib/perl5/5.14.2/darwin-thread-debug/auto/Cwd/Cwd.bundle' }, >> '' => *{'::'}, >> 'threads::' => *{'::threads::'}, >> '_<Dumper.c' => *{'::_<Dumper.c'}, >> 'bytes::' => *{'::bytes::'}, >> 'STDERR' => *::STDERR >> };
>> $ pb script/perlcc -r -e'use Exporter; use Data::Dumper (); print >> Data::Dumper::Dumper(\%main::)' >> $VAR1 = { >> 'stdin' => *::stdin, >> '' => *{'::'}, >> 'INC' => *::INC, >> '3' => *{'::3'}, >> ']' => *{'::]'}, >> 'SIG' => *::SIG, >> '' => *{'::/H'}, >> '' => *{'::/'}, >> '2' => *{'::2'}, >> '"' => *{'::"'}, >> 'STDERR' => *::STDERR, >> '0' => *{'::0'}, >> ';' => *{'::;'}, >> '!' => *{'::!'} >> };
>> What other symbols to we need compiled? >> We leave out intentionally the symbols beginning with ! ; _< and so on.
> I see. I need to add all the stashes. > 'bytes::' => *{'::bytes::'}, and so on. > Should be easy to add. > -- > Reini
> -- > Unsubscribe via mail to perl-compiler+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/perl-compiler?hl=en
You must
Sign in before you can post messages.
You do not have the permission required to post.