Re: [PATCH O.pm] avoid to clutter output with -l
by Rafael Garcia-Suarez other posts by this author
Jul 22 2001 12:56PM messages near this date
Re: [PATCH O.pm] avoid to clutter output with -l
|
Re: [PATCH O.pm] avoid to clutter output with -l
On 2001.07.22 01:53 schwern@[...].com wrote:
> On Sun, Jul 22, 2001 at 12:29:25AM +0200, Rafael Garcia-Suarez wrote:
> > When a B::* module is used on a file for which a -l is specified
> > on the shebang line, the output gets cluttered (if the module author
> > hasn't precautionously undefined $\). This patch fixes this :
> >
> > --- ext/B/O.pm.orig Mon Jul 9 16:09:51 2001
> > +++ ext/B/O.pm Sun Jul 22 00:11:55 2001
> > @@ -39,6 +39,7 @@
> > die $compilesub;
> > }
> >
> > + undef $\;
>
> 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). I haven't thought about this possibility. You're
right. Here's a new patch :
--- ext/B/O.pm.orig Mon Jul 9 16:09:51 2001
+++ ext/B/O.pm Sun Jul 22 14:47:57 2001
@@ -39,6 +39,7 @@
die $compilesub;
}
+ local ($\,$",$,) = (undef,' ','');
&$compilesub();
close STDERR if $veryquiet;
Thread:
Rafael Garcia-Suarez
Rafael Garcia-Suarez
Rafael Garcia-Suarez
|