r72670 - in /trunk/libextutils-cchecker-perl: Build.PL Changes MANIFEST META.yml README debian/changelog lib/ExtUtils/CChecker.pm t/02assert.t t/04module_build.t t/05defines_to.t

periapt-guest at users.alioth.debian.org periapt-guest at users.alioth.debian.org
Sat Apr 16 14:04:02 UTC 2011


Author: periapt-guest
Date: Sat Apr 16 14:03:38 2011
New Revision: 72670

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=72670
Log:
New upstream release

Added:
    trunk/libextutils-cchecker-perl/t/05defines_to.t
      - copied unchanged from r72669, branches/upstream/libextutils-cchecker-perl/current/t/05defines_to.t
Modified:
    trunk/libextutils-cchecker-perl/Build.PL
    trunk/libextutils-cchecker-perl/Changes
    trunk/libextutils-cchecker-perl/MANIFEST
    trunk/libextutils-cchecker-perl/META.yml
    trunk/libextutils-cchecker-perl/README
    trunk/libextutils-cchecker-perl/debian/changelog
    trunk/libextutils-cchecker-perl/lib/ExtUtils/CChecker.pm
    trunk/libextutils-cchecker-perl/t/02assert.t
    trunk/libextutils-cchecker-perl/t/04module_build.t

Modified: trunk/libextutils-cchecker-perl/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libextutils-cchecker-perl/Build.PL?rev=72670&op=diff
==============================================================================
--- trunk/libextutils-cchecker-perl/Build.PL (original)
+++ trunk/libextutils-cchecker-perl/Build.PL Sat Apr 16 14:03:38 2011
@@ -10,7 +10,7 @@
    },
    build_requires => {
       'Module::Build' => 0,
-      'Test::Exception' => 0,
+      'Test::Fatal' => 0,
       'Test::More' => 0,
    },
    license => 'perl',

Modified: trunk/libextutils-cchecker-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libextutils-cchecker-perl/Changes?rev=72670&op=diff
==============================================================================
--- trunk/libextutils-cchecker-perl/Changes (original)
+++ trunk/libextutils-cchecker-perl/Changes Sat Apr 16 14:03:38 2011
@@ -1,4 +1,9 @@
 Revision history for ExtUtils-CChecker
+
+0.07    CHANGES:
+         * Use Test::Fatal instead of Test::Exception
+         * Advise against calling it "config.h" as that gets confused with
+           core perl's file
 
 0.06    CHANGES:
          * Added 'defines_to' constructor arg for writing a "config.h" file

Modified: trunk/libextutils-cchecker-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libextutils-cchecker-perl/MANIFEST?rev=72670&op=diff
==============================================================================
--- trunk/libextutils-cchecker-perl/MANIFEST (original)
+++ trunk/libextutils-cchecker-perl/MANIFEST Sat Apr 16 14:03:38 2011
@@ -11,4 +11,5 @@
 t/02assert.t
 t/03accessors.t
 t/04module_build.t
+t/05defines_to.t
 t/99pod.t

Modified: trunk/libextutils-cchecker-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libextutils-cchecker-perl/META.yml?rev=72670&op=diff
==============================================================================
--- trunk/libextutils-cchecker-perl/META.yml (original)
+++ trunk/libextutils-cchecker-perl/META.yml Sat Apr 16 14:03:38 2011
@@ -4,7 +4,7 @@
   - 'Paul Evans <leonerd at leonerd.org.uk>'
 build_requires:
   Module::Build: 0
-  Test::Exception: 0
+  Test::Fatal: 0
   Test::More: 0
 configure_requires:
   Module::Build: 0.36
@@ -17,9 +17,9 @@
 provides:
   ExtUtils::CChecker:
     file: lib/ExtUtils/CChecker.pm
-    version: 0.06
+    version: 0.07
 requires:
   ExtUtils::CBuilder: 0
 resources:
   license: http://dev.perl.org/licenses/
-version: 0.06
+version: 0.07

Modified: trunk/libextutils-cchecker-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libextutils-cchecker-perl/README?rev=72670&op=diff
==============================================================================
--- trunk/libextutils-cchecker-perl/README (original)
+++ trunk/libextutils-cchecker-perl/README Sat Apr 16 14:03:38 2011
@@ -311,15 +311,18 @@
     including the kernel headers, which should make the constant and
     structure visible, allowing the program to compile.
 
-  Creating a config.h
+  Creating an "#include" file
     Sometimes, rather than setting defined symbols on the compiler
     commandline, it is preferrable to have them written to a C preprocessor
-    include (.h) file.
+    include (.h) file. This may be beneficial for cross-platform portability
+    concerns, as not all C compilers may take extra "-D" arguments on the
+    command line, or platforms may have small length restrictions on the
+    length of a command line.
 
      use ExtUtils::CChecker;
 
      my $cc = ExtUtils::CChecker->new(
-        defines_to => "config.h",
+        defines_to => "mymodule-config.h",
      );
 
      $cc->try_compile_run(
@@ -327,7 +330,7 @@
         source => <<'EOF' );
      #include <mango.h>
      #include <unistd.h>
-     #include "config.h"
+     #include "mymodule-config.h"
      int main(void) {
        if(mango() != 0)
          exit(1);
@@ -335,9 +338,14 @@
      }
      EOF
 
-    Because the config.h file is written and flushed after every define
-    operation, it will still be useable in later C fragments to test for
-    features detected in earlier ones.
+    Because the mymodule-config.h file is written and flushed after every
+    define operation, it will still be useable in later C fragments to test
+    for features detected in earlier ones.
+
+    It is suggested not to name the file simply config.h, as the core of
+    Perl itself has a file of that name containing its own compile-time
+    detected configuration. A confusion between the two could lead to
+    surprising results.
 
 AUTHOR
     Paul Evans <leonerd at leonerd.org.uk>

Modified: trunk/libextutils-cchecker-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libextutils-cchecker-perl/debian/changelog?rev=72670&op=diff
==============================================================================
--- trunk/libextutils-cchecker-perl/debian/changelog (original)
+++ trunk/libextutils-cchecker-perl/debian/changelog Sat Apr 16 14:03:38 2011
@@ -1,3 +1,9 @@
+libextutils-cchecker-perl (0.07-1) UNRELEASED; urgency=low
+
+  * New upstream release
+
+ -- Nicholas Bamber <nicholas at periapt.co.uk>  Sat, 16 Apr 2011 15:06:27 +0100
+
 libextutils-cchecker-perl (0.06-1) unstable; urgency=low
 
   * Added myself to Uploaders 

Modified: trunk/libextutils-cchecker-perl/lib/ExtUtils/CChecker.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libextutils-cchecker-perl/lib/ExtUtils/CChecker.pm?rev=72670&op=diff
==============================================================================
--- trunk/libextutils-cchecker-perl/lib/ExtUtils/CChecker.pm (original)
+++ trunk/libextutils-cchecker-perl/lib/ExtUtils/CChecker.pm Sat Apr 16 14:03:38 2011
@@ -8,7 +8,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.06';
+our $VERSION = '0.07';
 
 use Carp;
 
@@ -527,11 +527,6 @@
    return Module::Build->new( %args );
 }
 
-# Keep perl happy; keep Britain tidy
-1;
-
-__END__
-
 =head1 EXAMPLES
 
 =head2 Socket Libraries
@@ -657,15 +652,18 @@
 including the kernel headers, which should make the constant and structure
 visible, allowing the program to compile.
 
-=head2 Creating a F<config.h>
+=head2 Creating an C<#include> file
 
 Sometimes, rather than setting defined symbols on the compiler commandline, it
 is preferrable to have them written to a C preprocessor include (F<.h>) file.
+This may be beneficial for cross-platform portability concerns, as not all C
+compilers may take extra C<-D> arguments on the command line, or platforms may
+have small length restrictions on the length of a command line.
 
  use ExtUtils::CChecker;
 
  my $cc = ExtUtils::CChecker->new(
-    defines_to => "config.h",
+    defines_to => "mymodule-config.h",
  );
 
  $cc->try_compile_run(
@@ -673,7 +671,7 @@
     source => <<'EOF' );
  #include <mango.h>
  #include <unistd.h>
- #include "config.h"
+ #include "mymodule-config.h"
  int main(void) {
    if(mango() != 0)
      exit(1);
@@ -681,10 +679,18 @@
  }
  EOF
 
-Because the F<config.h> file is written and flushed after every define
-operation, it will still be useable in later C fragments to test for features
-detected in earlier ones.
+Because the F<mymodule-config.h> file is written and flushed after every
+define operation, it will still be useable in later C fragments to test for
+features detected in earlier ones.
+
+It is suggested not to name the file simply F<config.h>, as the core of Perl
+itself has a file of that name containing its own compile-time detected
+configuration. A confusion between the two could lead to surprising results.
 
 =head1 AUTHOR
 
 Paul Evans <leonerd at leonerd.org.uk>
+
+=cut
+
+0x55AA;

Modified: trunk/libextutils-cchecker-perl/t/02assert.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libextutils-cchecker-perl/t/02assert.t?rev=72670&op=diff
==============================================================================
--- trunk/libextutils-cchecker-perl/t/02assert.t (original)
+++ trunk/libextutils-cchecker-perl/t/02assert.t Sat Apr 16 14:03:38 2011
@@ -2,19 +2,19 @@
 
 use strict;
 use Test::More tests => 2;
-use Test::Exception;
+use Test::Fatal;
 
 use ExtUtils::CChecker;
 
 my $cc = ExtUtils::CChecker->new;
 
-lives_ok(
-   sub { $cc->assert_compile_run( source => "int main(void) { return 0; }\n", diag => "OK source" ); },
+ok(
+   !exception { $cc->assert_compile_run( source => "int main(void) { return 0; }\n", diag => "OK source" ); },
    'Trivial C program'
 );
 
-throws_ok(
-   sub { $cc->assert_compile_run( source => "int foo bar splot\n", diag => "broken source" ); },
+like(
+   exception { $cc->assert_compile_run( source => "int foo bar splot\n", diag => "broken source" ); },
    qr/^OS unsupported - broken source$/,
    'Broken C program does not compile and run'
 );

Modified: trunk/libextutils-cchecker-perl/t/04module_build.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libextutils-cchecker-perl/t/04module_build.t?rev=72670&op=diff
==============================================================================
--- trunk/libextutils-cchecker-perl/t/04module_build.t (original)
+++ trunk/libextutils-cchecker-perl/t/04module_build.t Sat Apr 16 14:03:38 2011
@@ -2,7 +2,6 @@
 
 use strict;
 use Test::More tests => 4;
-use Test::Exception;
 
 use ExtUtils::CChecker;
 




More information about the Pkg-perl-cvs-commits mailing list