Document what the backtick returns if the command fails.
[p5sagit/p5-mst-13.2.git] / pod / perlxs.pod
index a2755b8..c696e19 100644 (file)
@@ -72,7 +72,7 @@ See L<perlxstut> for a tutorial on the whole extension creation process.
 
 Note: For some extensions, Dave Beazley's SWIG system may provide a
 significantly more convenient mechanism for creating the extension glue
-code. See L<http://www.cs.utah.edu/~beazley/SWIG> for more 
+code. See L<http://www.swig.org> for more 
 information.
 
 =head2 On The Road
@@ -502,9 +502,9 @@ C<ST(1)>.
 
 =head2 Default Parameter Values
 
-Default values for XSUB arguments can be specified by
-placing an assignment statement in the parameter list.  The
-default value may be a number or a string.  Defaults should
+Default values for XSUB arguments can be specified by placing an
+assignment statement in the parameter list.  The default value may
+be a number, a string or the special string C<NO_INIT>.  Defaults should
 always be used on the right-most parameters only.
 
 To allow the XSUB for rpcb_gettime() to have a default host
@@ -534,7 +534,7 @@ the parameters in the correct order for that function.
 =head2 The PREINIT: Keyword
 
 The PREINIT: keyword allows extra variables to be declared immediately
-before or after the declartions of the parameters from the INPUT: section
+before or after the declarations of the parameters from the INPUT: section
 are emitted.
 
 If a variable is declared inside a CODE: section it will follow any typemap
@@ -1314,6 +1314,19 @@ methods will be called as this:
 
      THIS->set_blue( val );
 
+You could also write a single get/set method using an optional argument:
+
+     int
+     color::blue( val = NO_INIT )
+         int val
+         PROTOTYPE $;$
+         CODE:
+             if (items > 1)
+                 THIS->set_blue( val );
+             RETVAL = THIS->blue();
+         OUTPUT:
+             RETVAL
+
 If the function's name is B<DESTROY> then the C++ C<delete> function will be
 called and C<THIS> will be given as its parameter.  The generated C++ code for