Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do and eval sometimes don't clear $@ #2658

Closed
p5pRT opened this issue Sep 27, 2000 · 22 comments
Closed

do and eval sometimes don't clear $@ #2658

p5pRT opened this issue Sep 27, 2000 · 22 comments

Comments

@p5pRT
Copy link

p5pRT commented Sep 27, 2000

Migrated from rt.perl.org#4350 (status was 'resolved')

Searchable as RT4350$

@p5pRT
Copy link
Author

p5pRT commented Sep 27, 2000

From pimlott@idiomtech.com

Created by pimlott@idiomtech.com

The documentation for eval says

  If there was no error, C<$@​> is guaranteed to be a null string.

and the documentation for do (the do EXPR form) says

  do 'stat.pl';

  is just like

  scalar eval `cat stat.pl`;

However, there are circumstances where eval and do leave $@​ set to its
previous value. This can cause subtle bugs.

Example 1​:

  eval { die "shouldn't see this\n" };
  eval { };
  warn $@​ if $@​;

Example 2​:

  eval { die "shouldn't see this\n" };
  do 'no such file';
  warn $@​ if $@​;

Both examples will warn "shouldn't see this". While the first example is
somewhat pathological (it can happen perhaps in program-generated code), the
second example is a common idiom and in fact demonstrates that the sample
code in the documentation for do EXPR is wrong. More generally, it
demonstrates that do EXPR (like system) is not robust because it's hard or
impossible to distinguish all its failure modes (a Perl 6 RFC?).

Andrew

Perl Info


Site configuration information for perl 5.00503:

Configured by drow at Sun Apr 30 12:07:23 EDT 2000.

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
    osname=linux, osvers=2.2.15pre14, archname=i386-linux
    uname='linux them 2.2.15pre14 #2 smp mon mar 13 14:29:00 est 2000 i686 unknown '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
    cc='cc', optimize='-O2 ', gccversion=2.95.2 20000313 (Debian GNU/Linux)
    cppflags='-Dbool=char -DHAS_BOOL -D_REENTRANT -DDEBIAN -I/usr/local/include'
    ccflags ='-Dbool=char -DHAS_BOOL -D_REENTRANT -DDEBIAN -I/usr/local/include'
    stdchar='char', d_stdstdio=undef, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldbm -ldb -ldl -lm -lc -lposix -lcrypt
    libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    


@INC for perl 5.00503:
    /home/pimlott/idiom/perl
    /usr/lib/perl5/5.005/i386-linux
    /usr/lib/perl5/5.005
    /usr/local/lib/site_perl/i386-linux
    /usr/local/lib/site_perl
    /usr/lib/perl5
    .


Environment for perl 5.00503:
    HOME=/home/pimlott
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/pimlott/bin:/usr/local/atria/bin:/usr/sbin:/sbin:/home/pimlott/bin:/usr/local/atria/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
    PERL5LIB=/home/pimlott/idiom/perl
    PERL_BADLANG (unset)
    SHELL=/usr/bin/zsh


@p5pRT
Copy link
Author

p5pRT commented Sep 28, 2000

From @simoncozens

On Wed, Sep 20, 2000 at 07​:32​:56PM -0400, Andrew Pimlott wrote​:

The documentation for eval says
If there was no error, C<$@​> is guaranteed to be a null string.
and the documentation for do (the do EXPR form) says
do 'stat.pl';
is just like
scalar eval `cat stat.pl`;

Easy-peasy. Just clear the error SV when entering an eval or do​:

==== //depot/bleadperl/pp_ctl.c#3 - /home/simon/patchbay/bleadperl/pp_ctl.c ====
@​@​ -3013,6 +3013,7 @​@​
  name = SvPV(sv, len);
  if (!(name && len > 0 && *name))
  DIE(aTHX_ "Null filename used");
+ sv_setsv(ERRSV, &PL_sv_no);
  TAINT_PROPER("require");
  if (PL_op->op_type == OP_REQUIRE &&
  (svp = hv_fetch(GvHVn(PL_incgv), name, len, 0)) &&
@​@​ -3291,6 +3292,7 @​@​
  STRLEN len;
  OP *ret;

+ sv_setsv(ERRSV, &PL_sv_no);
  if (!SvPV(sv,len) || !len)
  RETPUSHUNDEF;
  TAINT_PROPER("eval");
==== //depot/bleadperl/t/comp/require.t#2 - /home/simon/patchbay/bleadperl/t/comp/require.t ====
@​@​ -8,7 +8,7 @​@​

# don't make this lexical
$i = 1;
-print "1..23\n";
+print "1..24\n";

sub do_require {
  %INC = ();
@​@​ -138,6 +138,13 @​@​
$i++; do_require(bytes_to_utf16('n', qq(print "ok $i\\n"; 1;\n), 1)); # BE
$i++; do_require(bytes_to_utf16('v', qq(print "ok $i\\n"; 1;\n), 1)); # LE

+# do 'nothing' clears $@​
+$i++;
+eval {die "shouldn't see this"};
+do "no such file";
+print "not " if $@​;
+print "ok $i\n";
+
END { 1 while unlink 'bleah.pm'; 1 while unlink 'bleah.do'; }

# ***interaction with pod (don't put any thing after here)***
==== //depot/bleadperl/t/op/eval.t#2 - /home/simon/patchbay/bleadperl/t/op/eval.t ====
@​@​ -1,6 +1,6 @​@​
#!./perl

-print "1..40\n";
+print "1..42\n";

eval 'print "ok 1\n";';

@​@​ -206,3 +206,20 @​@​
  print "ok $x\n";
  $x++;
}
+
+# More checks for clearing $@​
+{
+ eval { die "shouldn't see this\n" };
+ eval { };
+ print "not " if $@​;
+ print "ok $x\n";
+ $x++;
+}
+
+{
+ eval { die "shouldn't see this\n" };
+ eval { print "# Something that isn't a syntax error\n"; };
+ print "not " if $@​;
+ print "ok $x\n";
+ $x++;
+}

% ./perl harness op/eval.t comp/require.t
op/eval.............ok
comp/require........ok
All tests successful.
Files=2, Tests=66, 0 wallclock secs ( 0.10 cusr + 0.02 csys = 0.12 CPU)

@p5pRT
Copy link
Author

p5pRT commented Sep 28, 2000

From @gsar

On Thu, 28 Sep 2000 12​:24​:49 BST, Simon Cozens wrote​:

On Wed, Sep 20, 2000 at 07​:32​:56PM -0400, Andrew Pimlott wrote​:

The documentation for eval says
If there was no error, C<$@​> is guaranteed to be a null string.
and the documentation for do (the do EXPR form) says
do 'stat.pl';
is just like
scalar eval `cat stat.pl`;

Easy-peasy. Just clear the error SV when entering an eval or do​:

==== //depot/bleadperl/pp_ctl.c#3 - /home/simon/patchbay/bleadperl/pp_ctl.c ==

@​@​ -3013,6 +3013,7 @​@​
name = SvPV(sv, len);
if (!(name && len > 0 && *name))
DIE(aTHX_ "Null filename used");
+ sv_setsv(ERRSV, &PL_sv_no);
TAINT_PROPER("require");
if (PL_op->op_type == OP_REQUIRE &&
(svp = hv_fetch(GvHVn(PL_incgv), name, len, 0)) &&
@​@​ -3291,6 +3292,7 @​@​
STRLEN len;
OP *ret;

+ sv_setsv(ERRSV, &PL_sv_no);
if (!SvPV(sv,len) || !len)
RETPUSHUNDEF;
TAINT_PROPER("eval");

I think you're forgetting that there is only one $@​. (IOW, what about
DESTROY() or any of those other things done via call_sv(..., G_EVAL)
or eval_sv()?)

IIRC, the archives have some history on this issue.

Sarathy
gsar@​ActiveState.com

@p5pRT
Copy link
Author

p5pRT commented Sep 28, 2000

From @simoncozens

On Thu, Sep 28, 2000 at 08​:41​:53AM -0700, Gurusamy Sarathy wrote​:

I think you're forgetting that there is only one $@​. (IOW, what about
DESTROY() or any of those other things done via call_sv(..., G_EVAL)
or eval_sv()?)

Well, hm, yeah. The point is, anything that enters some kind of eval should
clear ERRSV as soon as possible. I didn't go digging around for other eval
contexts.

IIRC, the archives have some history on this issue.

I'll take a look.

@p5pRT
Copy link
Author

p5pRT commented Jul 16, 2003

From @schwern

The first case, an empty eval BLOCK not clearing $@​, has been fixed in 5.8.0.

The second case, do EXPR failing to load a file not clearing $@​, has not been fixed. It
feels like a bug and not merely a bad analogy.

@p5pRT
Copy link
Author

p5pRT commented Apr 21, 2012

From @jkeenan

On Tue Jul 15 23​:51​:58 2003, schwern wrote​:

The second case, do EXPR failing to load a file not clearing $@​, has
not been fixed. It feels like a bug and not merely a bad analogy.

Here's the second case as a one-liner​:

#####

perl -e 'eval { die "should not see this\n" };do "no such file";warn
"$@​" if $@​;'
should not see this

#####

Is there anyone who could take this older ticket on?

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Apr 25, 2012

From @davidnicol

On Sat, Apr 21, 2012 at 4​:18 PM, James E Keenan via RT
<perlbug-followup@​perl.org> wrote​:

On Tue Jul 15 23​:51​:58 2003, schwern wrote​:

The second case, do EXPR failing to load a file not clearing $@​, has
not been fixed. It feels like a bug and not merely a bad analogy.

Here's the second case as a one-liner​:

#####

perl -e 'eval { die "should not see this\n" };do "no such file";warn
"$@​" if $@​;'
should not see this

#####

Is there anyone who could take this older ticket on?

Thank you very much.
Jim Keenan

did it ever work as expected? here's a clarification to make "perldoc -f do"
describe the reported behavior.

Inline Patch
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index c9307f3..130c31a 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -1556,7 +1556,7 @@ file as a Perl script.

 is just like

-    eval `cat stat.pl`;
+    -r 'stat.pl' and eval `cat stat.pl`;

 except that it's more efficient and concise, keeps track of the current
 filename for error messages, searches the C<@INC> directories, and updates


-- 

In this document, the key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
"SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
"OPTIONAL" are to be interpreted using situational ethics.

@p5pRT
Copy link
Author

p5pRT commented Apr 25, 2012

From @davidnicol

dopatch.diff

@p5pRT
Copy link
Author

p5pRT commented Apr 25, 2012

From @davidnicol

I didn't actually test this morning before dawn, the choice of adding a "-r"
test rather than a "-e" test was based on the extended explanation

  If "do" cannot read the file, it returns undef and sets $! to
  the error. If "do" can read the file but cannot compile it, it
  returns undef and sets an error message in $@​. If the file is
  successfully compiled, "do" returns the value of the last
  expression evaluated.

which does not say anything about manipulating $@​ at all when "do"
cannot read the file.

One-lliner testing just now indicates that a readability test is in
fact performed.

A more accurate "just like" that does not rely on unix tools, and has
the same semantics WRT $! and $@​ might be

  eval join ('', <DO>) if open DO, "<", 'stat.pl';

or even

  { my $f; open $f, "<", 'stat.pl' and eval join '', <$f> }

if we want to obsessively reinforce symbol privacy.

diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index c9307f3..130c31a 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@​@​ -1556,7 +1556,7 @​@​ file as a Perl script.

 is just like

-    eval `cat stat.pl`;
+    -r 'stat.pl' and eval `cat stat.pl`;

 except that it's more efficient and concise, keeps track of the current
 filename for error messages, searches the C<@​INC> directories, and updates

--
In this document, the key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
"SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
"OPTIONAL" are to be interpreted using situational ethics.

@p5pRT
Copy link
Author

p5pRT commented Jun 18, 2012

From @mauke

Created by @mauke

'perldoc -f do' says​:

...
  If "do" can read the file but cannot compile it, it returns "undef"
  and sets an error message in $@​. If "do" cannot read the file, it
  returns undef and sets $! to the error. Always check $@​ first, as
  compilation could fail in a way that also sets $!. If the file is
  successfully compiled, "do" returns the value of the last
  expression evaluated.
...
  Manual error checking can be done this way​:

  # read in config files​: system first, then user
  for $file ("/share/prog/defaults.rc",
  "$ENV{HOME}/.someprogrc")
  {
  unless ($return = do $file) {
  warn "couldn't parse $file​: $@​" if $@​;
  warn "couldn't do $file​: $!" unless defined $return;
  warn "couldn't run $file" unless $return;
  }
  }

Turns out that advice doesn't work​:

% perl -wle 'eval { die "where is your god now?\n" }; do "no such file"; warn "got​: $@​"'
got​: where is your god now?

That is, if 'do' can't open/read the file, it doesn't clear $@​, so you might
end up looking at a stale error. Specifically, in a loop like in the sample
code, compilation errors from earlier files can end up being ascribed to later
files.

An obvious workaround is to set $@​ = undef; before using 'do'. I'm not sure
whether this is a bug in 'do' itself or whether the explanation / sample code
in perlfunc is wrong.

Perl Info

Flags:
    category=core
    severity=medium

This perlbug was built using Perl 5.12.1 - Thu Jun  3 20:09:15 CEST 2010
It is being executed now by  Perl 5.16.0 - Mon May 21 12:24:16 CEST 2012.

Site configuration information for perl 5.16.0:

Configured by mauke at Mon May 21 12:24:16 CEST 2012.

Summary of my perl5 (revision 5 version 16 subversion 0) configuration:
   
  Platform:
    osname=linux, osvers=2.6.38-gentoo-r6, archname=i686-linux
    uname='linux nora 2.6.38-gentoo-r6 #1 preempt sat aug 6 03:05:34 cest 2011 i686 amd athlon(tm) 64 processor 3200+ authenticamd gnulinux '
    config_args='-Dcc=cgcc -Dprefix=/home/mauke/usr/local -Dman1dir=none -Dman3dir=none -Dinc_version_list=none -Doptimize=-O2 -flto'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cgcc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -flto',
    cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.6.3', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cgcc', ldflags ='-fstack-protector -L/usr/local/lib -O2 -flto'
    libpth=/usr/local/lib /lib/../lib /usr/lib/../lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.14.1.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.14.1'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -flto -L/usr/local/lib -fstack-protector'

Locally applied patches:
    SAVEARGV0 - disable magic open in <ARGV>


@INC for perl 5.16.0:
    /home/mauke/usr/local/lib/perl5/site_perl/5.16.0/i686-linux
    /home/mauke/usr/local/lib/perl5/site_perl/5.16.0
    /home/mauke/usr/local/lib/perl5/5.16.0/i686-linux
    /home/mauke/usr/local/lib/perl5/5.16.0
    .


Environment for perl 5.16.0:
    HOME=/home/mauke
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LC_COLLATE=POSIX
    LD_LIBRARY_PATH=/home/mauke/usr/local/lib
    LOGDIR (unset)
    PATH=/home/mauke/usr/perlbrew/bin:/home/mauke/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.4.5:/opt/sun-jdk-1.4.2.13/bin:/opt/sun-jdk-1.4.2.13/jre/bin:/opt/sun-jdk-1.4.2.13/jre/javaws:/opt/dmd/bin:/usr/games/bin
    PERLBREW_HOME=/home/mauke/.perlbrew
    PERLBREW_PATH=/home/mauke/usr/perlbrew/bin
    PERLBREW_ROOT=/home/mauke/usr/perlbrew
    PERLBREW_VERSION=0.27
    PERL_BADLANG (unset)
    PERL_UNICODE=SAL
    SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Jun 18, 2012

From @ikegami

On Mon, Jun 18, 2012 at 1​:31 PM, l.mai@​web.de <perlbug-followup@​perl.org>wrote​:

If "do" can read the file but cannot compile it, it returns "undef"
and sets an error message in $@​. If "do" cannot read the file, it
returns undef and sets $! to the error. Always check $@​ first, as
compilation could fail in a way that also sets $!. If the file is
successfully compiled, "do" returns the value of the last
expression evaluated.

Your subject is misleading since there's "do" isn't documented to clear $@​
on success.

% perl -wle 'eval { die "where is your god now?\n" }; do "no such file";

warn "got​: $@​"'

got​: where is your god now?

But that is clearly a deviation from the documentation. And I believe the
bug lies in the (Perl) code, not the documentation.


Looking at the code\, it does

if \(open\_error\) \{
&nbsp;   return undef;
\} else \{
&nbsp;   $\! = 0;
\}

So a workaround would be to check $\! first&#8203;:

if \(\!do $file\) \{
&nbsp;   die "IO&#8203;: $\!\\n" if $\!;
&nbsp;   die "Exception&#8203;: $@&#8203;" if $@&#8203;;
&nbsp;   die "Didn't return true";
\}

@p5pRT
Copy link
Author

p5pRT commented Jun 18, 2012

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jun 18, 2012

From @ikegami

Patch attached.

@p5pRT
Copy link
Author

p5pRT commented Jun 18, 2012

From @ikegami

0001-RT-113730-should-be-cleared-on-do-IO-error.patch
From 41f30f84ca03741c2936abe141a99fa26bd85b35 Mon Sep 17 00:00:00 2001
From: Eric Brine <ikegami@adaelis.com>
Date: Mon, 18 Jun 2012 14:56:32 -0400
Subject: [PATCH] RT#113730 - $@ should be cleared on "do" IO error.

---
 pp_ctl.c  |    1 +
 t/op/do.t |   12 ++++++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/pp_ctl.c b/pp_ctl.c
index b414e81..437bc8f 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3928,6 +3928,7 @@ PP(pp_require)
 	    DIE(aTHX_ "Can't locate %s", name);
 	}
 
+	CLEAR_ERRSV();
 	RETPUSHUNDEF;
     }
     else
diff --git a/t/op/do.t b/t/op/do.t
index 93d3f73..14b9011 100644
--- a/t/op/do.t
+++ b/t/op/do.t
@@ -286,4 +286,16 @@ SKIP: {
   is($w, undef, 'do STRING does not propagate warning hints');
 }
 
+# RT#113730 - $@ should be cleared on IO error.
+{
+    $@ = "should not see";
+    $! = 0;
+    my $rv = do("non exitant");
+    my $saved_error = $@;
+    my $saved_errno = $!;
+    ok(!$rv,          "do returns false on io errror");
+    ok(!$saved_error, "\$\@ not set on io error");
+    ok($saved_errno,  "\$! set on io error");
+}
+
 done_testing();
-- 
1.7.2.5

@p5pRT
Copy link
Author

p5pRT commented Jun 18, 2012

From @tamias

On Mon, Jun 18, 2012 at 02​:59​:28PM -0400, Eric Brine wrote​:

Patch attached.

I suppose it doesn't matter, but you misspelled 'non-existent' in the
test. :)

Ronald

@p5pRT
Copy link
Author

p5pRT commented Jun 18, 2012

From @ikegami

On Mon, Jun 18, 2012 at 3​:16 PM, Ronald J Kimball <rjk@​tamias.net> wrote​:

On Mon, Jun 18, 2012 at 02​:59​:28PM -0400, Eric Brine wrote​:

Patch attached.

I suppose it doesn't matter, but you misspelled 'non-existent' in the
test. :)

Ronald

I know it's "existent" in English, yet I always get it wrong. It must be
the francophone in me, for it's spelled with an "a" in French.

@p5pRT
Copy link
Author

p5pRT commented Jun 18, 2012

From @ikegami

On Mon, Jun 18, 2012 at 3​:45 PM, Eric Brine <ikegami@​adaelis.com> wrote​:

On Mon, Jun 18, 2012 at 3​:16 PM, Ronald J Kimball <rjk@​tamias.net> wrote​:

On Mon, Jun 18, 2012 at 02​:59​:28PM -0400, Eric Brine wrote​:

Patch attached.

I suppose it doesn't matter, but you misspelled 'non-existent' in the
test. :)

Ronald

I know it's "existent" in English, yet I always get it wrong. It must be
the francophone in me, for it's spelled with an "a" in French.

I mean "I did that on purpose to increase the chances of the file not
existing." ;)

@p5pRT
Copy link
Author

p5pRT commented Jun 18, 2012

From @cpansprout

On Mon Jun 18 12​:16​:43 2012, rjk@​tamias.net wrote​:

On Mon, Jun 18, 2012 at 02​:59​:28PM -0400, Eric Brine wrote​:

Patch attached.

I suppose it doesn't matter, but you misspelled 'non-existent' in the
test. :)

So did you. :-) It has no hyphen.

BTW, this bug is a duplicate of #4350.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Jun 21, 2012

From @cpansprout

On Mon Jun 18 11​:59​:59 2012, ikegami@​adaelis.com wrote​:

Patch attached.

Jesse Luehrs has applied this as a3ff80c.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Jun 21, 2012

@cpansprout - Status changed from 'open' to 'resolved'

@p5pRT
Copy link
Author

p5pRT commented Jun 21, 2012

From @cpansprout

On Sat Apr 21 14​:18​:39 2012, jkeenan wrote​:

On Tue Jul 15 23​:51​:58 2003, schwern wrote​:

The second case, do EXPR failing to load a file not clearing $@​, has
not been fixed. It feels like a bug and not merely a bad analogy.

Here's the second case as a one-liner​:

#####

perl -e 'eval { die "should not see this\n" };do "no such file";warn
"$@​" if $@​;'
should not see this

#####

Is there anyone who could take this older ticket on?

This has been fixed by the patch Eric Brine submitted to ticket #113730
(which I will merge with this one shortly), which was applied as
a3ff80c.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Jun 21, 2012

@cpansprout - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant