Author: bernhard
Date: Sat Apr 16 02:04:20 2005
New Revision: 7849

Modified:
   trunk/config/auto/antlr.pl
   trunk/config/auto/perldoc.pl
   trunk/config/auto/python.pl
Log:
Use the shiny new Parrot::Configure::Step::capture_output()
from Jens Rieks.


Modified: trunk/config/auto/antlr.pl
==============================================================================
--- trunk/config/auto/antlr.pl  (original)
+++ trunk/config/auto/antlr.pl  Sat Apr 16 02:04:20 2005
@@ -12,7 +12,7 @@
 
 When antlr is not found, then something like
 
-  export 
CLASSPATH=/home/bernhard/devel/antlr/antlr-2.7.5:/home/bernhard/devel/antlr/antlr-2.7.5/antlr-2.7.5.jar
+  export 
CLASSPATH=/home/myself/devel/antlr/antlr-2.7.5:/home/myself/devel/antlr/antlr-2.7.5/antlr-2.7.5.jar
 
 might help.
 
@@ -22,15 +22,14 @@
 
 use strict;
 use vars qw($description @args);
-use Parrot::Configure::Step ':auto';
+use Parrot::Configure::Step ':auto', 'capture_output';
 
 $description = "Determining whether antlr is installed...";
 
 @args = qw(verbose);
 
 sub runstep {
-    my $a = `antlr -h 2>&1`;
-    $a = 'nada' unless defined $a;
+    my $a = capture_output( 'antlr -h' ) || '';
     my $has_antlr = ($a =~ m/ANTLR Parser Generator/) ? 1 : 0;
 
     Configure::Data->set(has_antlr => $has_antlr);
@@ -38,7 +37,7 @@
     my $has_antlr_with_python = 0;
     if ( $has_antlr ) {
         unlink <config/auto/antlr/*.py>;
-        my $a = `antlr -o config/auto/antlr config/auto/antlr/test_python.g 
2>&1`;
+        my $a = capture_output( 'antlr -o config/auto/antlr 
config/auto/antlr/test_python.g' ) || '';
         $has_antlr_with_python = 1 if -e 'config/auto/antlr/test_python_l.py';
         $Configure::Step::result = $has_antlr_with_python ?
                                        'yes, with python' :

Modified: trunk/config/auto/perldoc.pl
==============================================================================
--- trunk/config/auto/perldoc.pl        (original)
+++ trunk/config/auto/perldoc.pl        Sat Apr 16 02:04:20 2005
@@ -15,14 +15,14 @@
 
 use strict;
 use vars qw($description @args);
-use Parrot::Configure::Step ':auto';
+use Parrot::Configure::Step ':auto', 'capture_output';
 
 $description = "Determining whether perldoc is installed...";
 
 @args = qw(verbose);
 
 sub runstep {
-    my $a = `perldoc perldoc` || '';
+    my $a = capture_output( 'perldoc perldoc' ) || '';
     my $has_perldoc = ($a =~ m/perldoc/) ? 1 : 0;
 
     Configure::Data->set(has_perldoc => $has_perldoc);

Modified: trunk/config/auto/python.pl
==============================================================================
--- trunk/config/auto/python.pl (original)
+++ trunk/config/auto/python.pl Sat Apr 16 02:04:20 2005
@@ -27,7 +27,7 @@
 @args = qw(verbose);
 
 sub runstep {
-    my $a = `python -V 2>&1` || '';
+    my $a = capture_output( 'python -V' ) || '';
     my ($python, $major, $minor, $revision) = 
         $a =~ m/(Python)\s+(\d+).(\d+)(?:.(\d+))?/;
     $revision = 0 unless defined $revision;

Reply via email to