[Bps-public-commit] r10130 - in Test-Dependencies/trunk: lib/Test
zev at bestpractical.com
zev at bestpractical.com
Wed Dec 26 22:56:24 EST 2007
Author: zev
Date: Wed Dec 26 22:56:21 2007
New Revision: 10130
Modified:
Test-Dependencies/trunk/ (props changed)
Test-Dependencies/trunk/lib/Test/Dependencies.pm
Log:
r10353 at cliffjumper: zev | 2007-12-26 19:26:36 -0500
* work around bug in IPC::Cmd that prevented module from working
Modified: Test-Dependencies/trunk/lib/Test/Dependencies.pm
==============================================================================
--- Test-Dependencies/trunk/lib/Test/Dependencies.pm (original)
+++ Test-Dependencies/trunk/lib/Test/Dependencies.pm Wed Dec 26 22:56:21 2007
@@ -112,13 +112,21 @@
my @sourcefiles = _get_files_in(@dirs);
my $perl = $^X;
my %deps;
- foreach my $file (@sourcefiles) {
+ foreach my $file (sort @sourcefiles) {
+ print "# source file $file\n";
my $taint = _taint_flag($file);
my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf) =
run(command => [$perl, $taint, '-MO=PerlReq', $file]);
die "Could not compile '$file': error code: $error_code"
unless $success;
- foreach my $line (@$stdout_buf) {
+
+ # for some reason IPC::Run doesn't always split lines correctly
+ my @lines;
+ push @lines, split /\n/ foreach @$stdout_buf;
+
+ foreach my $line (@lines) {
+ chomp $line;
+ my $x = $line;
$line =~ m/^perl\((.+)\)$/;
# path2mod sucks, but the mod2path that B::PerlReq uses sucks, too
$deps{path2mod($1)}++;
More information about the Bps-public-commit
mailing list