Changeset 544

Show
Ignore:
Timestamp:
05/05/07 00:19:26 (2 years ago)
Author:
hachi
Message:

ExtUtils::Constant usage updates.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/api/xs/Cache-Memcached-GetParserXS/MANIFEST

    r304 r544  
    66README 
    77t/Cache-Memcached-GetParserXS.t 
    8 fallback/const-c.inc 
    9 fallback/const-xs.inc 
    108lib/Cache/Memcached/GetParserXS.pm 
  • trunk/api/xs/Cache-Memcached-GetParserXS/Makefile.PL

    r542 r544  
    11use 5.006; 
     2use ExtUtils::Constant; 
    23use ExtUtils::MakeMaker; 
    34# See lib/ExtUtils/MakeMaker.pm for details of how to influence 
     
    910              PREREQ_PM         => { 
    1011                  'Cache::Memcached' => 1.21, 
     12                  'ExtUtils::Constant' => 0, 
    1113              }, # e.g., Module::Name => 1.1 
    1214              ABSTRACT_FROM  => 'lib/Cache/Memcached/GetParserXS.pm', # retrieve abstract from module 
     
    1921              ); 
    2022 
    21 if  (eval {require ExtUtils::Constant; 1}) { 
    22   # If you edit these definitions to change the constants used by this module, 
    23   # you will need to use the generated const-c.inc and const-xs.inc 
    24   # files to replace their "fallback" counterparts before distributing your 
    25   # changes. 
    26   my @names = (qw(DEST NSLEN ON_ITEM BUF STATE OFFSET FLAGS KEY FINISHED)); 
    27   ExtUtils::Constant::WriteConstants( 
    28                                      NAME         => 'Cache::Memcached::GetParserXS', 
    29                                      NAMES        => \@names, 
    30                                      DEFAULT_TYPE => 'IV', 
    31                                      C_FILE       => 'const-c.inc', 
    32                                      XS_FILE      => 'const-xs.inc', 
    33                                   ); 
     23my @names = (qw(DEST NSLEN ON_ITEM BUF STATE OFFSET FLAGS KEY FINISHED)); 
     24ExtUtils::Constant::WriteConstants( 
     25                                   NAME         => 'Cache::Memcached::GetParserXS', 
     26                                   NAMES        => \@names, 
     27                                   DEFAULT_TYPE => 'IV', 
     28                                   C_FILE       => 'const-c.inc', 
     29                                   XS_FILE      => 'const-xs.inc', 
     30                                ); 
    3431 
    35 } 
    36 else { 
    37   use File::Copy; 
    38   use File::Spec; 
    39   foreach my $file ('const-c.inc', 'const-xs.inc') { 
    40     my $fallback = File::Spec->catfile('fallback', $file); 
    41     copy ($fallback, $file) or die "Can't copy $fallback to $file: $!"; 
    42   } 
    43 }