From 1d088ed8a1eb69310feb11b29d0e7602666238b4 Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Fri, 21 Jul 2006 17:56:39 +0000 Subject: [PATCH] Upgrade to Devel::PPPort 3.09_01 p4raw-id: //depot/perl@28605 --- ext/Devel/PPPort/Changes | 4 ++++ ext/Devel/PPPort/HACKERS | 11 +++++------ ext/Devel/PPPort/PPPort_pm.PL | 2 +- ext/Devel/PPPort/PPPort_xs.PL | 10 +++++----- ext/Devel/PPPort/mktests.PL | 6 +++--- ext/Devel/PPPort/parts/ppptools.pl | 24 +++++++++++++++++++++--- ext/Devel/PPPort/soak | 2 +- 7 files changed, 40 insertions(+), 19 deletions(-) diff --git a/ext/Devel/PPPort/Changes b/ext/Devel/PPPort/Changes index db402e9..9af7b01 100755 --- a/ext/Devel/PPPort/Changes +++ b/ext/Devel/PPPort/Changes @@ -1,3 +1,7 @@ +3.09_01 - 2006-07-21 + + * avoid using 'glob' when running under miniperl + 3.09 - 2006-07-08 * fix Makefile.PL's c_o override diff --git a/ext/Devel/PPPort/HACKERS b/ext/Devel/PPPort/HACKERS index aed6e93..7a5e0a4 100644 --- a/ext/Devel/PPPort/HACKERS +++ b/ext/Devel/PPPort/HACKERS @@ -159,15 +159,14 @@ functions in F. The scripts F, F and F all use the information in F to generate the main module -F, the XS code in F and various test files +F, the XS code in F and various test files in F. All of these files could be generated on the fly while building -C, but not having the tests in C and not having -F will confuse Configure and TEST/harness in the core. -Not having F will be bad for viewing the docs on -C. So unfortunately, it's unavoidable to put -some redundancy into the package. +C, but not having the tests in C will confuse +TEST/harness in the core. Not having F will be bad for +viewing the docs on C. So unfortunately, it's +unavoidable to put some redundancy into the package. =head2 Adding stuff to Devel::PPPort diff --git a/ext/Devel/PPPort/PPPort_pm.PL b/ext/Devel/PPPort/PPPort_pm.PL index a74aa38..cff5558 100644 --- a/ext/Devel/PPPort/PPPort_pm.PL +++ b/ext/Devel/PPPort/PPPort_pm.PL @@ -498,7 +498,7 @@ package Devel::PPPort; use strict; use vars qw($VERSION $data); -$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.09 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; +$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.09_01 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; sub _init_data { diff --git a/ext/Devel/PPPort/PPPort_xs.PL b/ext/Devel/PPPort/PPPort_xs.PL index 3ea1ee5..6edb75e 100644 --- a/ext/Devel/PPPort/PPPort_xs.PL +++ b/ext/Devel/PPPort/PPPort_xs.PL @@ -4,9 +4,9 @@ # ################################################################################ # -# $Revision: 10 $ +# $Revision: 11 $ # $Author: mhx $ -# $Date: 2006/07/03 21:48:33 +0200 $ +# $Date: 2006/07/21 19:21:40 +0200 $ # ################################################################################ # @@ -40,7 +40,7 @@ END my $file; my $sec; -for $file (glob 'parts/inc/*') { +for $file (all_files_in_dir('parts/inc')) { my $spec = parse_partspec($file); my $msg = 0; @@ -85,9 +85,9 @@ __DATA__ * ******************************************************************************** * -* $Revision: 10 $ +* $Revision: 11 $ * $Author: mhx $ -* $Date: 2006/07/03 21:48:33 +0200 $ +* $Date: 2006/07/21 19:21:40 +0200 $ * ******************************************************************************** * diff --git a/ext/Devel/PPPort/mktests.PL b/ext/Devel/PPPort/mktests.PL index 8b26c84..4d97607 100644 --- a/ext/Devel/PPPort/mktests.PL +++ b/ext/Devel/PPPort/mktests.PL @@ -4,9 +4,9 @@ # ################################################################################ # -# $Revision: 25 $ +# $Revision: 26 $ # $Author: mhx $ -# $Date: 2006/06/25 06:30:35 +0200 $ +# $Date: 2006/07/21 19:21:39 +0200 $ # ################################################################################ # @@ -32,7 +32,7 @@ sub generate_tests my @tests; my $file; - for $file (glob 'parts/inc/*') { + for $file (all_files_in_dir('parts/inc')) { my($testfile) = $file =~ /(\w+)\.?$/; # VMS has a trailing dot $testfile = "t/$testfile.t"; diff --git a/ext/Devel/PPPort/parts/ppptools.pl b/ext/Devel/PPPort/parts/ppptools.pl index 6283a0b..225ced5 100644 --- a/ext/Devel/PPPort/parts/ppptools.pl +++ b/ext/Devel/PPPort/parts/ppptools.pl @@ -4,9 +4,9 @@ # ################################################################################ # -# $Revision: 16 $ +# $Revision: 17 $ # $Author: mhx $ -# $Date: 2006/01/14 18:07:58 +0100 $ +# $Date: 2006/07/21 19:21:40 +0200 $ # ################################################################################ # @@ -19,6 +19,24 @@ # ################################################################################ +sub cat_file +{ + eval { require File::Spec }; + return $@ ? join('/', @_) : File::Spec->catfile(@_); +} + +sub all_files_in_dir +{ + my $dir = shift; + local *DIR; + + opendir DIR, $dir or die "cannot open directory $dir: $!\n"; + my @files = grep { !-d && !/^\./ } readdir DIR; # no dirs or hidden files + closedir DIR; + + return map { cat_file($dir, $_) } @files; +} + sub parse_todo { my $dir = shift || 'parts/todo'; @@ -26,7 +44,7 @@ sub parse_todo my %todo; my $todo; - for $todo (glob "$dir/*") { + for $todo (all_files_in_dir($dir)) { open TODO, $todo or die "cannot open $todo: $!\n"; my $perl = ; chomp $perl; diff --git a/ext/Devel/PPPort/soak b/ext/Devel/PPPort/soak index 99d41ec..f597dc5 100644 --- a/ext/Devel/PPPort/soak +++ b/ext/Devel/PPPort/soak @@ -33,7 +33,7 @@ use File::Find; use List::Util qw(max); use Config; -my $VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.09 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; +my $VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.09_01 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; $| = 1; my %OPT = ( -- 2.7.4