Re: [PATCH O.pm] avoid to clutter output with -l
by Rafael Garcia-Suarez other posts by this author
Jul 22 2001 8:39PM messages near this date
Re: [PATCH O.pm] avoid to clutter output with -l
|
[ID 20010721.003] Perl's configure script should be able to use
Config.pm for its defaults
On 2001.07.22 16:55 schwern@[...].com wrote:
> On Sun, Jul 22, 2001 at 02:56:09PM +0200, Rafael Garcia-Suarez wrote:
> > > Shouldn't that be C<local $\ = undef>? You probably also want to nail
> > > $, and $" while you're at it.
> >
> > In case of those variables are defined in a BEGIN block ? (or, more
> > pathologically, with -s).
>
> Actually, I have no idea how they might get set in a B module, but I
> just sweep them all as a matter of habit.
No, not in a B module, but in a perl program that is examined by a B module.
Compare :
$ perl -MO=Terse -e 'print'
LISTOP (0x817c5e0) leave
OP (0x81767c8) enter
COP (0x8176790) nextstate
LISTOP (0x8175b70) print
OP (0x8175b00) pushmark
UNOP (0x8105ed0) null [15]
SVOP (0x8105c70) gvsv GV (0x80f8680) *_
and:
$ bperl -MO=Terse -e 'BEGIN{$,="foo"}print'
fooLISTOP (0x8115178) leavefoo [1]foo
fooOP (0x81151a0) enterfoofoo
fooCOP (0x8115138) nextstatefoofoo
fooLISTOP (0x81150d0) printfoofoo
fooOP (0x8117348) pushmarkfoofoo
fooUNOP (0x8115118) nullfoo [15]foo
fooSVOP (0x81150f8) gvsvfoo GV (0x81065b4) *_
My patch corrects this problem.
Thread:
Rafael Garcia-Suarez
Rafael Garcia-Suarez
Rafael Garcia-Suarez
|