From: Rafael Garcia-Suarez Date: Sat, 5 Nov 2005 10:13:56 +0000 (+0000) Subject: Remove the obsolete KNOWN PROBLEMS sections from perlcall.pod X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8400cfc39f5aaecb3f31c92529b223aab4f98ae1;p=p5sagit%2Fp5-mst-13.2.git Remove the obsolete KNOWN PROBLEMS sections from perlcall.pod (noticed by Robin Houston) p4raw-id: //depot/perl@26012 --- diff --git a/pod/perlcall.pod b/pod/perlcall.pod index fb5ea37..4b77359 100644 --- a/pod/perlcall.pod +++ b/pod/perlcall.pod @@ -366,73 +366,6 @@ called C; in a void context it returns C instead of C. An example of using the C macro is shown in section I. -=head1 KNOWN PROBLEMS - -This section outlines all known problems that exist in the -I functions. - -=over 5 - -=item 1. - -If you are intending to make use of both the G_EVAL and G_SCALAR flags -in your code, use a version of Perl greater than 5.000. There is a bug -in version 5.000 of Perl which means that the combination of these two -flags will not work as described in the section I. - -Specifically, if the two flags are used when calling a subroutine and -that subroutine does not call I, the value returned by -I will be wrong. - - -=item 2. - -In Perl 5.000 and 5.001 there is a problem with using I if -the Perl sub you are calling attempts to trap a I. - -The symptom of this problem is that the called Perl sub will continue -to completion, but whenever it attempts to pass control back to the -XSUB, the program will immediately terminate. - -For example, say you want to call this Perl sub - - sub fred - { - eval { die "Fatal Error" ; } - print "Trapped error: $@\n" - if $@ ; - } - -via this XSUB - - void - Call_fred() - CODE: - PUSHMARK(SP) ; - call_pv("fred", G_DISCARD|G_NOARGS) ; - fprintf(stderr, "back in Call_fred\n") ; - -When C is executed it will print - - Trapped error: Fatal Error - -As control never returns to C, the C<"back in Call_fred"> -string will not get printed. - -To work around this problem, you can either upgrade to Perl 5.002 or -higher, or use the G_EVAL flag with I as shown below - - void - Call_fred() - CODE: - PUSHMARK(SP) ; - call_pv("fred", G_EVAL|G_DISCARD|G_NOARGS) ; - fprintf(stderr, "back in Call_fred\n") ; - -=back - - - =head1 EXAMPLES Enough of the definition talk, let's have a few examples.