diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-03-05 18:11:52 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-03-05 18:38:47 -0800 |
commit | 3b7f69a598c44f5c3dc6fac662ca72212b7c22ec (patch) | |
tree | 3af81345e007f56d2f468b2436f6604508b2d9fc /pp_sys.c | |
parent | fbc70a9e6c5a8b48dcdf2aa4f1f639d7064649cf (diff) | |
download | perl-3b7f69a598c44f5c3dc6fac662ca72212b7c22ec.tar.gz |
[perl #77384] Passing a ref to warn doesn't append file and line
This commit makes pp_warn stringify the warning if there is no
$SIG{__WARN__} handler. See the RT ticket for the discussion.
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -449,7 +449,9 @@ PP(pp_warn) else { exsv = newSVpvs_flags("Warning: something's wrong", SVs_TEMP); } - warn_sv(exsv); + if (SvROK(exsv) && !PL_warnhook) + Perl_warn(aTHX_ "%"SVf, SVfARG(exsv)); + else warn_sv(exsv); RETSETYES; } |