In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/748cc03cd5ccfe4fb015da434bcb7dfb6125253b?hp=8753f506cef14f551777d67a7a9759c96c1e89ff>

- Log -----------------------------------------------------------------
commit 748cc03cd5ccfe4fb015da434bcb7dfb6125253b
Author: Colin Kuskie <[email protected]>
Date:   Tue Oct 2 17:13:02 2012 -0700

    Refactor ext/Pod-Functions/Functions_pm.PL to use Test::More instead of 
making TAP by hand.

M       ext/Pod-Functions/Functions_pm.PL

commit ea61db2856f3706b0b3684e779a2b8c6a76230b9
Author: Tony Cook <[email protected]>
Date:   Mon Jul 29 16:04:29 2013 +1000

    [perl #52000] use PL_exit_flags in the test so it works non-threaded

M       lib/ExtUtils/t/Embed.t
-----------------------------------------------------------------------

Summary of changes:
 ext/Pod-Functions/Functions_pm.PL | 28 +++++++++++++---------------
 lib/ExtUtils/t/Embed.t            |  2 +-
 2 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/ext/Pod-Functions/Functions_pm.PL 
b/ext/Pod-Functions/Functions_pm.PL
index 7cf0b51..578ec89 100644
--- a/ext/Pod-Functions/Functions_pm.PL
+++ b/ext/Pod-Functions/Functions_pm.PL
@@ -4,7 +4,13 @@ use Pod::Simple::SimpleTree;
 
 my ($tap, $test, %Missing);
 
-@ARGV = grep { not($_ eq '--tap' and $tap = 1) } @ARGV;
+BEGIN {
+    @ARGV = grep { not($_ eq '--tap' and $tap = 1) } @ARGV;
+    if ($tap) {
+        require Test::More;
+        Test::More->import;
+    }
+}
 
 my (%Kinds, %Flavor, @Types);
 my %Omit;
@@ -95,34 +101,26 @@ sub sort_funcs {
 
 if ($tap) {
     foreach my $func (sort_funcs(keys %Flavor)) {
-       ++$test;
-       my $ok = $Type{$func} ? 'ok' : 'not ok';
-       print "$ok $test - $func is mentioned in at least one category group\n";
+       ok ( $Type{$func}, "$func is mentioned in at least one category group");
     }
     foreach (sort keys %Missing) {
         # Ignore anything that looks like an alternative for a function we've
         # already seen;
         s!(?: [A-Z].*| \(\)|\( LIST \)| /PATTERN/.*)!!;
         next if $Flavor{$_};
-        ++$test;
         if (/^[_a-z]/) {
-            print "not ok $test - function '$_' has no summary for 
Pod::Functions\n";
+            fail( "function '$_' has no summary for Pod::Functions" );
         } else {
-            print "not ok $test - section '$_' has no type for 
Pod::Functions\n";
+            fail( "for Pod::Functions" );
         }
     }
     foreach my $kind (sort keys %Kinds) {
         my $funcs = $Kinds{$kind};
         ++$test;
         my $want = join ' ', sort_funcs(@$funcs);
-        if ("@$funcs" eq $want) {
-            print "ok $test - category $kind is correctly sorted\n";
-        } else {
-            print "not ok $test - category $kind is correctly sorted\n";
-            print STDERR "# Have @$funcs\n# Want $want\n";
-        }
+        is ("@$funcs", $want, "category $kind is correctly sorted" );
     }
-    print "1..$test\n";
+    done_testing();
     exit;
 }
 
@@ -198,7 +196,7 @@ L<perlfunc/"Perl Functions by Category"> section.
 
 =cut
 
-our $VERSION = '1.07';
+our $VERSION = '1.08';
 
 require Exporter;
 
diff --git a/lib/ExtUtils/t/Embed.t b/lib/ExtUtils/t/Embed.t
index f47d036..861c7b8 100644
--- a/lib/ExtUtils/t/Embed.t
+++ b/lib/ExtUtils/t/Embed.t
@@ -184,7 +184,7 @@ int main(int argc, char **argv, char **env) {
     my_puts("ok 2");
 
     perl_construct(my_perl);
-    my_perl->Iexit_flags |= PERL_EXIT_WARN;
+    PL_exit_flags |= PERL_EXIT_WARN;
 
     my_puts("ok 3");
 

--
Perl5 Master Repository

Reply via email to