On Mon, Jan 14, 2002 at 06:45:05PM +0100, Rafael Garcia-Suarez wrote:
> > # ~/tmp/Bar.pm
> > package Bar;
> > 
> > print "\@INC as Bar sees it\n";
> > print join "\n", @INC;
> 
> Nah. You should wrap this code in a CHECK block : otherwise, in
> your example, it will be run at BEGIN-time (i.e. when the Bar module
> is use'd). That's what O.pm does.

You forget (and I forgot), B::C is encased in the perlcc wrapper
script.  So what we really have is this:

    print "\@INC as perlcc sees it\n";
    print join "\n", @INC;
    system(qq{$^X -cwle 'BEGIN { push \@INC, "bar" }'});

So perlcc can simply save the state of @INC (and whatever else B::C
might have trouble getting at) and pass that information along.


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl Quality Assurance      <[EMAIL PROTECTED]>         Kwalitee Is Job One
Maybe they hooked you up with one of those ass-making magazines.
        -- brian d. foy as misheard by Michael G Schwern

Reply via email to