Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Fixed (changed) test 46 in B::C
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
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:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Reini Urban  
View profile  
 More options Oct 19 2011, 12:30 pm
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.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
J. Nick Koston  
View profile  
 More options Oct 19 2011, 8:13 pm
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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Reini Urban  
View profile  
 More options Oct 20 2011, 10:10 am
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.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Reini Urban  
View profile  
 More options Oct 20 2011, 10:15 am
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

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.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
J. Nick Koston  
View profile  
 More options Oct 20 2011, 10:17 am
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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »