From: Jarkko Hietaniemi Date: Mon, 26 Nov 2001 10:35:56 +0000 (+0000) Subject: PROPAGATE documentation from Tony Cook. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ad216e6526a9bc3ea5c5c7d22d293d0f80d48c5a;p=p5sagit%2Fp5-mst-13.2.git PROPAGATE documentation from Tony Cook. p4raw-id: //depot/perl@13280 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index b6e6312..7823d4b 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -1076,6 +1076,12 @@ This is useful for propagating exceptions: eval { ... }; die unless $@ =~ /Expected exception/; +If LIST is empty and C<$@> contains an object reference that has a +C method, that method will be called with additional file +and line number parameters. The return value replaces the value in +C<$@>. ie. as if C<<$@ = eval { $@->PROPAGATE(__FILE__, __LINE__) };>> +were called. + If C<$@> is empty then the string C<"Died"> is used. die() can also be called with a reference argument. If this happens to be