[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: [PATCH] show -E in error message when called with -E



Am Montag, den 12.01.2009, 17:48 +0000 schrieb Nicholas Clark:
> On Mon, Jan 12, 2009 at 11:39:11AM +0100, Rene Bcker wrote:
> > Currently, perl shows -e if an error occurs even it is called with -E.
> > The attached patch changes this...
> Thanks applied (as efdc43f5015438920ce11f05539e55cb02940377)

This breaks all modules which use code like

if ( $0 eq '-e' ) {
    ...
}


Example:

% bleadperl -MFindBin -le 'print $FindBin::Script'
-e

% bleadperl -MFindBin -E 'say $FindBin::Script'
Cannot find current script '-E' at /opt/perl/perl-1232348288/lib/5.11.0/FindBin.pm line 206
BEGIN failed--compilation aborted at /opt/perl/perl-1232348288/lib/5.11.0/FindBin.pm line 206.
Compilation failed in require.
BEGIN failed--compilation aborted.


vs.

% perl5.10.0 -MFindBin -le 'print $FindBin::Script'
-e

% perl5.10.0 -MFindBin -E 'say $FindBin::Script'
-e


There is a lot of this kind of code out there:
http://tinyurl.com/92kpa6


Thanks, Frank


Follow-Ups from:
"Rafael Garcia-Suarez" <rgarciasuarez@gmail.com>
References to:
Renée Bäcker<renee.baecker@smart-websolutions.de>
Nicholas Clark <nick@ccl4.org>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]