From ad216e6526a9bc3ea5c5c7d22d293d0f80d48c5a Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Mon, 26 Nov 2001 10:35:56 +0000 Subject: [PATCH] PROPAGATE documentation from Tony Cook. p4raw-id: //depot/perl@13280 --- pod/perlfunc.pod | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.7.4