This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
SV-based interfaces for dieing and warning
authorZefram <zefram@fysh.org>
Fri, 23 Apr 2010 00:52:47 +0000 (01:52 +0100)
committerZefram <zefram@fysh.org>
Fri, 23 Apr 2010 00:52:47 +0000 (01:52 +0100)
commitc5df3096702d4a814b3774dff243e7eb74814257
tree93ec4463179fc3bf3e5ee20be2afa863b1d3a66a
parent96d9b9cd40f1d98fda790eb12b5cdbeef8b48a81
SV-based interfaces for dieing and warning

New functions croak_sv(), die_sv(), mess_sv(), and warn_sv(), each act
much like their _sv-less counterparts, but take a single SV argument
instead of sprintf-like format and args.  They will accept RVs, passing
them through as such.  This means there's no more need to clobber ERRSV
in order to throw a structured exception.

pp_warn() and pp_die() are rewritten to use the _sv interfaces.
This fixes part of [perl #74538].  It also means that a structured
warning object will be passed through to $SIG{__WARN__} instead of
being stringified, thus bringing warn in line with die with respect to
structured exception objects.

The new functions and their existing counterparts are all fully
documented.
MANIFEST
embed.fnc
embed.h
global.sym
mg.c
pp_ctl.c
pp_sys.c
proto.h
t/op/warn.t [new file with mode: 0644]
util.c