develooper Front page | perl.perl5.porters | Postings from February 2004

[PATCH] Improved perlapi documentation for croak

From:
Mark Fowler
Date:
February 25, 2004 14:47
Subject:
[PATCH] Improved perlapi documentation for croak
Message ID:
Pine.LNX.4.55.0402252242510.32152@gan.twoshortplanks.com
Hi.

I couldn't work out from the perlapi documentation if XS's croak returned
control to Perl, or if I still  had to return function.  After writing
some tests to work out it does, I patched perlapi.pod.  Patch below.

-- 
#!/usr/bin/perl -T
use strict;
use warnings;
print q{Mark Fowler, mark@twoshortplanks.com, http://twoshortplanks.com/};


--- pod/perlapi.pod.old	Mon Feb  9 00:19:43 2004
+++ pod/perlapi.pod	Wed Feb 25 22:26:07 2004
@@ -5400,8 +5400,9 @@
 =item croak

 This is the XSUB-writer's interface to Perl's C<die> function.
-Normally use this function the same way you use the C C<printf>
-function.  See C<warn>.
+Normally call this function the same way you call the C C<printf>
+function.  Calling C<croak> returns control directly to Perl,
+sidestepping the normal C order of executiion. See C<warn>.

 If you want to throw an exception object, assign the object to
 C<$@> and then pass C<Nullch> to croak():
@@ -5417,8 +5418,8 @@

 =item warn

-This is the XSUB-writer's interface to Perl's C<warn> function.  Use this
-function the same way you use the C C<printf> function.  See
+This is the XSUB-writer's interface to Perl's C<warn> function.  Call this
+function the same way you call the C C<printf> function.  See
 C<croak>.

 	void	warn(const char* pat, ...)



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About