[Rt-commit] r5655 - in Test-Dependencies/trunk: lib/Test
zev at bestpractical.com
zev at bestpractical.com
Tue Jul 25 22:38:26 EDT 2006
Author: zev
Date: Tue Jul 25 22:38:25 2006
New Revision: 5655
Modified:
Test-Dependencies/trunk/ (props changed)
Test-Dependencies/trunk/Changes
Test-Dependencies/trunk/META.yml
Test-Dependencies/trunk/Makefile.PL
Test-Dependencies/trunk/lib/Test/Dependencies.pm
Log:
r11926 at truegrounds: zev | 2006-07-25 22:37:56 -0400
* switched to using IPC::Cmd
Modified: Test-Dependencies/trunk/Changes
==============================================================================
--- Test-Dependencies/trunk/Changes (original)
+++ Test-Dependencies/trunk/Changes Tue Jul 25 22:38:25 2006
@@ -1,5 +1,8 @@
Revision history for Test-Dependencies
+0.08 Tue Jul 25 22:34:44 EDT 2006
+ * now using IPC::Cmd for subprocess communication (to avoid cross-platform issues)
+
0.07 Thu Jul 20 17:51:08 EDT 2006
* added empty dummy file because Module::Install does not package empty directories
Modified: Test-Dependencies/trunk/META.yml
==============================================================================
--- Test-Dependencies/trunk/META.yml (original)
+++ Test-Dependencies/trunk/META.yml Tue Jul 25 22:38:25 2006
@@ -13,8 +13,9 @@
requires:
B::PerlReq: 0
File::Find::Rule: 0
+ IPC::Cmd: 0
Module::CoreList: 0
PerlReq::Utils: 0
Test::Builder::Module: 0
YAML: 0
-version: 0.07
+version: 0.08
Modified: Test-Dependencies/trunk/Makefile.PL
==============================================================================
--- Test-Dependencies/trunk/Makefile.PL (original)
+++ Test-Dependencies/trunk/Makefile.PL Tue Jul 25 22:38:25 2006
@@ -7,6 +7,7 @@
requires('B::PerlReq');
requires('File::Find::Rule');
+requires('IPC::Cmd');
requires('Module::CoreList');
requires('PerlReq::Utils');
requires('Test::Builder::Module');
Modified: Test-Dependencies/trunk/lib/Test/Dependencies.pm
==============================================================================
--- Test-Dependencies/trunk/lib/Test/Dependencies.pm (original)
+++ Test-Dependencies/trunk/lib/Test/Dependencies.pm Tue Jul 25 22:38:25 2006
@@ -6,6 +6,7 @@
use B::PerlReq;
use Carp;
use File::Find::Rule;
+use IPC::Cmd qw/run/;
use Module::CoreList;
use PerlReq::Utils qw(path2mod);
use YAML qw(LoadFile);
@@ -18,11 +19,11 @@
=head1 VERSION
-Version 0.07
+Version 0.08
=cut
-our $VERSION = '0.07';
+our $VERSION = '0.08';
=head1 SYNOPSIS
@@ -113,11 +114,15 @@
my %deps;
foreach my $file (@sourcefiles) {
my $taint = _taint_flag($file);
- my $output = `$perl $taint -MO=PerlReq '$file' 2> /dev/null`;
- # path2mod sucks, but the mod2path that B::PerlReq uses sucks, too
- my @filedeps = map { s/^perl\((.+)\)$/$1/; path2mod($_) }
- split /\n/, $output;
- $deps{$_}++ foreach @filedeps;
+ 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) {
+ $line =~ m/^perl\((.+)\)$/;
+ # path2mod sucks, but the mod2path that B::PerlReq uses sucks, too
+ $deps{path2mod($1)}++;
+ }
}
return keys %deps;
}
More information about the Rt-commit
mailing list