diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-06-06 23:19:47 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-06-07 08:18:55 -0700 |
commit | b1d0a83378b21d719f9e1fd57b852ca875a7c228 (patch) | |
tree | 05a5fbcb06aa56bd3f6618367888e04e95366825 /pp_sys.c | |
parent | 288163b0396d677d915ce0beb12619dc26646926 (diff) | |
download | perl-b1d0a83378b21d719f9e1fd57b852ca875a7c228.tar.gz |
Make warn treat $@=3 and $@="3" the same
If we get this:
$ ./perl -Ilib -e '$@ = "3"; warn'
3 ...caught at -e line 1.
then we shouldn’t get this:
$ ./perl -Ilib -e '$@ = 3; warn'
Warning: something's wrong at -e line 1.
as the two scalars hold the same value.
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -453,7 +453,7 @@ PP(pp_warn) } else exsv = ERRSV; } - else if (SvPOKp(ERRSV) && SvCUR(ERRSV)) { + else if (SvPOKp(ERRSV) ? SvCUR(ERRSV) : SvNIOKp(ERRSV)) { exsv = sv_newmortal(); sv_setsv_nomg(exsv, ERRSV); sv_catpvs(exsv, "\t...caught"); |