X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlcall.pod;h=2b837808a19ad9c398e4321e919dbfb8afdc72d3;hb=2b5ab1e742ea1b1374dcea7f6f90ef5c5cf29914;hp=7c94d377c7df97986d0afac93d35d0a08a00e9e1;hpb=9cde0e7fb9816f759feaabc0f640403a7cdbc5c6;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlcall.pod b/pod/perlcall.pod index 7c94d37..2b83780 100644 --- a/pod/perlcall.pod +++ b/pod/perlcall.pod @@ -72,7 +72,7 @@ Each of the functions will now be discussed in turn. =over 5 -=item B +=item perl_call_sv I takes two parameters, the first, C, is an SV*. This allows you to specify the Perl subroutine to be called either as a @@ -80,7 +80,7 @@ C string (which has first been converted to an SV) or a reference to a subroutine. The section, I, shows how you can make use of I. -=item B +=item perl_call_pv The function, I, is similar to I except it expects its first parameter to be a C char* which identifies the Perl @@ -88,7 +88,7 @@ subroutine you want to call, e.g., C. If the subroutine you want to call is in another package, just include the package name in the string, e.g., C<"pkg::fred">. -=item B +=item perl_call_method The function I is used to call a method from a Perl class. The parameter C corresponds to the name of the method @@ -99,7 +99,7 @@ object (for a virtual method). See L for more information on static and virtual methods and L for an example of using I. -=item B +=item perl_call_argv I calls the Perl subroutine specified by the C string stored in the C parameter. It also takes the usual C @@ -279,8 +279,8 @@ belongs to C. It is possible for the Perl subroutine you are calling to terminate abnormally, e.g., by calling I explicitly or by not actually -existing. By default, when either of these of events occurs, the -process will terminate immediately. If though, you want to trap this +existing. By default, when either of these events occurs, the +process will terminate immediately. If you want to trap this type of event, specify the G_EVAL flag. It will put an I around the subroutine call. @@ -971,7 +971,8 @@ and some C to call it /* Check the eval first */ if (SvTRUE(ERRSV)) { - printf ("Uh oh - %s\n", SvPV(ERRSV, PL_na)) ; + STRLEN n_a; + printf ("Uh oh - %s\n", SvPV(ERRSV, n_a)) ; POPs ; } else @@ -1013,7 +1014,8 @@ The code if (SvTRUE(ERRSV)) { - printf ("Uh oh - %s\n", SvPV(ERRSV, PL_na)) ; + STRLEN n_a; + printf ("Uh oh - %s\n", SvPV(ERRSV, n_a)) ; POPs ; } @@ -1923,8 +1925,8 @@ refers to the last. =head2 Creating and calling an anonymous subroutine in C As we've already shown, C can be used to invoke an -anonymous subroutine. However, our example showed how Perl script -invoking an XSUB to preform this operation. Let's see how it can be +anonymous subroutine. However, our example showed a Perl script +invoking an XSUB to perform this operation. Let's see how it can be done inside our C code: ...