Upgrade to Locale::Codes 2.02.
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / Constant.pm
index cb39318..8e6bf24 100644 (file)
@@ -1,6 +1,6 @@
 package ExtUtils::Constant;
 use vars qw (@ISA $VERSION %XS_Constant %XS_TypeSet @EXPORT_OK %EXPORT_TAGS);
-$VERSION = '0.10';
+$VERSION = '0.11';
 
 =head1 NAME
 
@@ -12,8 +12,6 @@ ExtUtils::Constant - generate XS code to import C header constants
     WriteConstants(
         NAME => 'Foo',
         NAMES => [qw(FOO BAR BAZ)],
-        C_FILE => 'constants.c',
-        XS_FILE => 'constants.xs',
     );
     # Generates wrapper code to make the values of the constants FOO BAR BAZ
     #  available to perl
@@ -30,11 +28,11 @@ constants.
 
 Generally one only needs to call the C<WriteConstants> function, and then
 
-    #include "constants.c"
+    #include "const-c.inc"
 
 in the C section of C<Foo.xs>
 
-    INCLUDE constants.xs
+    INCLUDE const-xs.inc
 
 in the XS section of C<Foo.xs>.
 
@@ -300,7 +298,7 @@ I<VALUE> when not defined.  If I<TYPE> is aggregate (eg I<PVN> expects both
 pointer and length) then I<VALUE> should be a reference to an array of
 values in the order expected by the type.  C<C_constant> will always call
 this function with I<MACRO> defined, defaulting to the constant's name.
-I<DEFAULT> if defined is an array reference giving default type and and
+I<DEFAULT> if defined is an array reference giving default type and
 value(s) if the clause generated by I<MACRO> doesn't evaluate to true.
 The two pairs I<PRE> and I<POST> if defined give C code snippets to proceed
 and follow the value, and the default value.
@@ -853,7 +851,7 @@ be the same list of types as C<C_constant> was given.
 the number of parameters passed to the C function C<constant>]
 
 You can call the perl visible subroutine something other than C<constant> if
-you give the parameter I<SUBNAME>. The C subroutine it calls defaults to the
+you give the parameter I<SUBNAME>. The C subroutine it calls defaults to
 the name of the perl visible subroutine, unless you give the parameter
 I<C_SUBNAME>.
 
@@ -1047,7 +1045,7 @@ END
 
 WriteMakefileSnippet ATTRIBUTE =E<gt> VALUE [, ...] 
 
-An function to generate perl code for Makefile.PL that will regenerate
+A function to generate perl code for Makefile.PL that will regenerate
 the constant subroutines.  Parameters are named as passed to C<WriteConstants>,
 with the addition of C<INDENT> to specify the number of leading spaces
 (default 2).
@@ -1113,12 +1111,15 @@ as detailed in L<"C_constant">.
 =item C_FILE
 
 The name of the file to write containing the C code.  The default is
-C<constants.c>.
+C<const-c.inc>.  The C<-> in the name ensures that the file can't be
+mistaken for anything related to a legitimate perl package name, and
+not naming the file C<.c> avoids having to override Makefile.PL's
+C<.xs> to C<.c> rules.
 
 =item XS_FILE
 
 The name of the file to write containing the XS code.  The default is
-C<constants.xs>.
+C<const-xs.inc>.
 
 =item SUBNAME
 
@@ -1139,8 +1140,8 @@ C<constant_10> with the default I<XS_SUBNAME>.
 sub WriteConstants {
   my %ARGS =
     ( # defaults
-     C_FILE =>       'constants.c',
-     XS_FILE =>      'constants.xs',
+     C_FILE =>       'const-c.inc',
+     XS_FILE =>      'const-xs.inc',
      SUBNAME =>      'constant',
      DEFAULT_TYPE => 'IV',
      @_);