[Rt-commit] r6948 - rt/branches/3.6-RELEASE/sbin

ruz at bestpractical.com ruz at bestpractical.com
Tue Feb 6 18:27:48 EST 2007


Author: ruz
Date: Tue Feb  6 18:27:46 2007
New Revision: 6948

Modified:
   rt/branches/3.6-RELEASE/sbin/rt-test-dependencies.in

Log:
* backport from 3.7: convert 'sub _' to 'sub text_to_hash'

Modified: rt/branches/3.6-RELEASE/sbin/rt-test-dependencies.in
==============================================================================
--- rt/branches/3.6-RELEASE/sbin/rt-test-dependencies.in	(original)
+++ rt/branches/3.6-RELEASE/sbin/rt-test-dependencies.in	Tue Feb  6 18:27:46 2007
@@ -158,11 +158,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
@@ -195,7 +202,7 @@
 Calendar::Simple
 .
 
-$deps{'MASON'} = [ _( << '.') ];
+$deps{'MASON'} = [ text_to_hash( << '.') ];
 HTML::Mason 1.23
 MLDBM
 Errno
@@ -210,12 +217,12 @@
 Text::WikiFormat 0.76
 .
 
-$deps{'STANDALONE'} = [ _( << '.') ];
+$deps{'STANDALONE'} = [ text_to_hash( << '.') ];
 HTTP::Server::Simple 0.07
 HTTP::Server::Simple::Mason 0.09
 .
 
-$deps{'MAILGATE'} = [ _( << '.') ];
+$deps{'MAILGATE'} = [ text_to_hash( << '.') ];
 HTML::TreeBuilder
 HTML::FormatText
 Getopt::Long
@@ -223,7 +230,7 @@
 Pod::Usage
 .
 
-$deps{'CLI'} = [ _( << '.') ];
+$deps{'CLI'} = [ text_to_hash( << '.') ];
 Getopt::Long 2.24
 LWP
 HTTP::Request::Common
@@ -232,7 +239,7 @@
 Term::ReadKey
 .
 
-$deps{'DEV'} = [ _( << '.') ];
+$deps{'DEV'} = [ text_to_hash( << '.') ];
 Test::Inline 
 Apache::Test
 HTML::Form
@@ -245,41 +252,41 @@
 File::Find
 .
 
-$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