[Rt-commit] r5868 - in rt/branches/3.7-EXPERIMENTAL: .
schwern at bestpractical.com
schwern at bestpractical.com
Wed Sep 6 02:29:21 EDT 2006
Author: schwern
Date: Wed Sep 6 02:29:21 2006
New Revision: 5868
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/sbin/rt-test-dependencies.in
Log:
r17957 at ool-182e7cea: schwern | 2006-09-05 15:46:45 -0400
The _ subroutine was interfering with stat's _ causing CPAN.pm to get
confused and think I had weird direntries in my local file:/// CPAN mirror.
Do not name functions _() without a really evil reason. Even then, beat
yourself with a stick a few times for good measure.
Modified: rt/branches/3.7-EXPERIMENTAL/sbin/rt-test-dependencies.in
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/sbin/rt-test-dependencies.in (original)
+++ rt/branches/3.7-EXPERIMENTAL/sbin/rt-test-dependencies.in Wed Sep 6 02:29:21 2006
@@ -149,11 +149,18 @@
}
-sub _ {
- map { /(\S+)\s*(\S*)/; $1 => ($2 ? $2 :'') } split ( /\n/, $_[0] );
+sub text_to_hash {
+ my %hash;
+ for my $line ( split /\n/, $_[0] ) {
+ my($key, $value) = $line =~ /(\S+)\s*(\S*)/;
+ $value ||= '';
+ $hash{$key} = $value;
+ }
+
+ return %hash;
}
-$deps{'CORE'} = [ _( << '.') ];
+$deps{'CORE'} = [ text_to_hash( << '.') ];
Digest::base
Digest::MD5 2.27
DBI 1.37
@@ -187,7 +194,7 @@
Calendar::Simple
.
-$deps{'MASON'} = [ _( << '.') ];
+$deps{'MASON'} = [ text_to_hash( << '.') ];
Params::Validate 0.02
Cache::Cache
Exception::Class 1.14
@@ -208,18 +215,18 @@
Text::WikiFormat 0.76
.
-$deps{'MAILGATE'} = [ _( << '.') ];
+$deps{'MAILGATE'} = [ text_to_hash( << '.') ];
HTML::TreeBuilder
HTML::FormatText
Getopt::Long
LWP::UserAgent
.
-$deps{'CLI'} = [ _( << '.') ];
+$deps{'CLI'} = [ text_to_hash( << '.') ];
Getopt::Long 2.24
.
-$deps{'DEV'} = [ _( << '.') ];
+$deps{'DEV'} = [ text_to_hash( << '.') ];
Regexp::Common
Test::Inline
Apache::Test
@@ -231,41 +238,41 @@
Test::Expect 0.30
.
-$deps{'FASTCGI'} = [ _( << '.') ];
+$deps{'FASTCGI'} = [ text_to_hash( << '.') ];
CGI 2.92
FCGI
CGI::Fast
.
-$deps{'SPEEDYCGI'} = [ _( << '.') ];
+$deps{'SPEEDYCGI'} = [ text_to_hash( << '.') ];
CGI 2.92
CGI::SpeedyCGI
.
-$deps{'MODPERL1'} = [ _( << '.') ];
+$deps{'MODPERL1'} = [ text_to_hash( << '.') ];
CGI 2.92
Apache::Request
Apache::DBI 0.92
.
-$deps{'MODPERL2'} = [ _( << '.') ];
+$deps{'MODPERL2'} = [ text_to_hash( << '.') ];
CGI 2.92
Apache::DBI
HTML::Mason 1.31
.
-$deps{'MYSQL'} = [ _( << '.') ];
+$deps{'MYSQL'} = [ text_to_hash( << '.') ];
DBD::mysql 2.1018
.
-$deps{'ORACLE'} = [ _( << '.') ];
+$deps{'ORACLE'} = [ text_to_hash( << '.') ];
DBD::Oracle
.
-$deps{'POSTGRESQL'} = [ _( << '.') ];
+$deps{'POSTGRESQL'} = [ text_to_hash( << '.') ];
DBD::Pg 1.43
.
-$deps{'SQLITE'} = [ _( << '.') ];
+$deps{'SQLITE'} = [ text_to_hash( << '.') ];
DBD::SQLite 1.00
.
More information about the Rt-commit
mailing list