ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl5-porters
perl5-porters
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved