Author: jkeenan
Date: Mon Apr 23 18:27:22 2007
New Revision: 18310

Modified:
   branches/reconfigure/t/configure/01-options.t
   branches/reconfigure/t/configure/02-messages.t
   branches/reconfigure/t/configure/03-steplist.t
   branches/reconfigure/t/configure/04-configure.t
   branches/reconfigure/t/configure/05-run_one_step.t
   branches/reconfigure/t/configure/06-bad_step.t
   branches/reconfigure/t/configure/07-verbose_two.t
   branches/reconfigure/t/configure/08-verbose_step_number.t
   branches/reconfigure/t/configure/09-verbose_step_regex.t
   branches/reconfigure/t/configure/10-verbose_step_number_not_called.t
   branches/reconfigure/t/configure/11-no_description.t
   branches/reconfigure/t/configure/12-verbose.t
   branches/reconfigure/t/configure/13-die.t
   branches/reconfigure/t/configure/14-params.t
   branches/reconfigure/t/configure/15-no_return.t
   branches/reconfigure/t/configure/16-no_return_but_result.t

Log:
Simplified 'use lib' calls along lines already implemented in trunk.


Modified: branches/reconfigure/t/configure/01-options.t
==============================================================================
--- branches/reconfigure/t/configure/01-options.t       (original)
+++ branches/reconfigure/t/configure/01-options.t       Mon Apr 23 18:27:22 2007
@@ -9,230 +9,241 @@
 BEGIN {
     use FindBin qw($Bin);
     use Cwd qw(cwd realpath);
-    realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    our $topdir = $1;
-    if ( defined $topdir ) {
-        print "\nOK:  Parrot top directory located\n";
-    }
-    else {
-        $topdir = realpath($Bin) . "/../..";
-    }
+    our $topdir = realpath($Bin) . "/../..";
     unshift @INC, qq{$topdir/lib};
 }
-use Test::More tests => 32;
+use Test::More tests => 33;
 use Carp;
-use lib ("lib");
-use_ok('Parrot::Configure::Options', qw|
-    process_options
-    get_valid_options
-| );
+use_ok(
+    'Parrot::Configure::Options', qw|
+        process_options
+        get_valid_options
+    |
+);
 use_ok("Parrot::IO::Capture::Mini");
 
-
 my %valid;
-%valid = map {$_, 1} get_valid_options();
-ok(scalar keys %valid, "non-zero quantity of valid options found");
-ok(defined $valid{debugging}, "debugging option found");
-ok(defined $valid{maintainer}, "maintainer option found");
-ok(defined $valid{help}, "help option found");
-ok(defined $valid{version}, "version option found");
-ok(defined $valid{verbose}, "verbose option found");
+my $badoption = q{samsonanddelilah};
+
+%valid = map { $_, 1 } get_valid_options();
+ok( scalar keys %valid,          "non-zero quantity of valid options found" );
+ok( defined $valid{debugging},   "debugging option found" );
+ok( defined $valid{maintainer},  "maintainer option found" );
+ok( defined $valid{help},        "help option found" );
+ok( defined $valid{version},     "version option found" );
+ok( defined $valid{verbose},     "verbose option found" );
+ok( !defined $valid{$badoption}, "invalid option not found" );
 
-open my $FH, "$main::topdir/Configure.pl"
-    or croak "Unable to open handle to Configure.pl";
+open my $FH, '<', "$main::topdir/Configure.pl"
+    or croak "Unable to open handle to $main::topdir/Configure.pl:  $!";
 my $bigstr;
 {
     local $/ = undef;
     $bigstr = <$FH>;
 }
-close $FH or croak "Unable to close handle to Configure.pl";
+close $FH or croak "Unable to close handle to Configure.pl:  $!";
 
 # Ignore any POD I have moved to an __END__ block.
 $bigstr =~ s/__END__.*//s;
-my (@lines, @possible_methods);
[EMAIL PROTECTED] = grep { /^=item/ } (split /\n/, $bigstr);
+my ( @lines, @possible_methods );
[EMAIL PROTECTED] = grep { /^=item/ } ( split /\n/, $bigstr );
 foreach my $l (@lines) {
     my $method;
-    if ($l =~ /^=item C<--([-_\w]+)(?:[=>])/) {
+    if ( $l =~ /^=item C<--([-_\w]+)(?:[=>])/ ) {
         $method = $1;
         push @possible_methods, $method;
     }
 }
 my $invalid = 0;
 foreach my $m (@possible_methods) {
-    unless (defined $valid{$m}) {
+    unless ( defined $valid{$m} ) {
         carp "Possibly invalid method: $m";
         $invalid++;
     }
 }
-ok(! $invalid, "No invalid methods described in POD");
+ok( !$invalid, "No invalid methods described in POD" );
 
 my $parrot_version = '0.4.10';
-my $svnid = '$Id$';
+my $svnid          = '$Id$';
 my ($args);
-$args = process_options( {
-    argv            => [],
-    script          => $0,
-    parrot_version  => $parrot_version,
-    svnid           => $svnid,
-} );
-ok(defined $args, "process_options() returned successfully");
-ok($args->{debugging}, "debugging turned on by default");
-
-eval {
-    $args = process_options( {
-        argv            => [],
-        script          => $0,
-        svnid           => $svnid,
-    } );
-};
-like($@, qr/Must provide argument 'parrot_version'/,
-    "process_options() failed due to lack of argument 'parrot_version'");
+$args = process_options(
+    {
+        argv           => [],
+        script         => $0,
+        parrot_version => $parrot_version,
+        svnid          => $svnid,
+    }
+);
+ok( defined $args, "process_options() returned successfully" );
+ok( $args->{debugging}, "debugging turned on by default" );
+
+eval { $args = process_options( { argv => [], script => $0, svnid => $svnid, } 
); };
+like(
+    $@,
+    qr/Must provide argument 'parrot_version'/,
+    "process_options() failed due to lack of argument 'parrot_version'"
+);
 
 eval {
-    $args = process_options( {
-        argv            => [],
-        script          => $0,
-        parrot_version  => $parrot_version,
-    } );
+    $args = process_options(
+        {
+            argv           => [],
+            script         => $0,
+            parrot_version => $parrot_version,
+        }
+    );
 };
-like($@, qr/Must provide argument 'svnid'/,
-    "process_options() failed due to lack of argument 'svnid'");
-
-$args = process_options( {
-    script          => $0,
-    parrot_version  => $parrot_version,
-    svnid           => $svnid,
-} );
-ok(defined $args,
-    "process_options() returned successfully even though no explicit 'argv' 
key was provided");
-
-$args = process_options( {
-    argv            => [],
-    parrot_version  => $parrot_version,
-    svnid           => $svnid,
-} );
-ok(defined $args,
-    "process_options() returned successfully even though no explicit 'scripts' 
key was provided");
+like(
+    $@,
+    qr/Must provide argument 'svnid'/,
+    "process_options() failed due to lack of argument 'svnid'"
+);
+
+$args = process_options(
+    {
+        script         => $0,
+        parrot_version => $parrot_version,
+        svnid          => $svnid,
+    }
+);
+ok( defined $args,
+    "process_options() returned successfully even though no explicit 'argv' 
key was provided" );
+
+$args = process_options(
+    {
+        argv           => [],
+        parrot_version => $parrot_version,
+        svnid          => $svnid,
+    }
+);
+ok( defined $args,
+    "process_options() returned successfully even though no explicit 'scripts' 
key was provided" );
 
 my $CC = "/usr/bin/gcc-3.3";
 my $CX = "/usr/bin/g++-3.3";
-$args = process_options( {
-    argv            => [
-        q{--cc=$CC},
-        q{--cxx=$CX},
-        q{--link=$CX},
-        q{--ld=$CX},
-        q{--without-icu},
-        q{--without-gmp},
-    ],
-    script          => $0,
-    parrot_version  => $parrot_version,
-    svnid           => $svnid,
-} );
-ok(defined $args,
-    "process_options() returned successfully when options were specified");
+$args = process_options(
+    {
+        argv => [
+            q{--cc=$CC},      q{--cxx=$CX}, q{--link=$CX}, q{--ld=$CX},
+            q{--without-icu}, q{--without-gmp},
+        ],
+        script         => $0,
+        parrot_version => $parrot_version,
+        svnid          => $svnid,
+    }
+);
+ok( defined $args, "process_options() returned successfully when options were 
specified" );
 
-my $badoption = q{samsonanddelilah};
 eval {
-    $args = process_options( {
-        argv            => [ qq<--${badoption}=72> ],
-        script          => $0,
-        parrot_version  => $parrot_version,
-        svnid           => $svnid,
-    } );
+    $args = process_options(
+        {
+            argv           => [qq<--${badoption}=72>],
+            script         => $0,
+            parrot_version => $parrot_version,
+            svnid          => $svnid,
+        }
+    );
 };
-like($@, qr/^Invalid option $badoption/,
-    "process_options() failed due to bad option '$badoption'");
+like(
+    $@,
+    qr/^Invalid option $badoption/,
+    "process_options() failed due to bad option '$badoption'"
+);
 
 {
-    my ($tie, $rv, $msg);
+    my ( $tie, $rv, $msg );
     $tie = tie *STDOUT, "Parrot::IO::Capture::Mini"
-            or croak "Unable to tie";
-    $args = process_options( {
-        argv            => [ q{--help} ],
-        script          => $0,
-        parrot_version  => $parrot_version,
-        svnid           => $svnid,
-    } );
-    ok(! defined $args,
-        "process_options() returned undef after 'help' option");
+        or croak "Unable to tie";
+    $args = process_options(
+        {
+            argv           => [q{--help}],
+            script         => $0,
+            parrot_version => $parrot_version,
+            svnid          => $svnid,
+        }
+    );
+    ok( !defined $args, "process_options() returned undef after 'help' option" 
);
     $msg = $tie->READLINE;
-    like($msg, qr/--help/i,
-        "got correct message after 'version' option");
+    like( $msg, qr/--help/i, "got correct message after 'version' option" );
 }
 
 {
-    my ($tie, $rv, $msg);
+    my ( $tie, $rv, $msg );
     $tie = tie *STDOUT, "Parrot::IO::Capture::Mini"
-            or croak "Unable to tie";
-    $args = process_options( {
-        argv            => [ q{--} ],
-        script          => $0,
-        parrot_version  => $parrot_version,
-        svnid           => $svnid,
-    } );
-    ok(! defined $args,
-        "process_options() returned undef after 'help' option: case '--'");
+        or croak "Unable to tie";
+    $args = process_options(
+        {
+            argv           => [q{--}],
+            script         => $0,
+            parrot_version => $parrot_version,
+            svnid          => $svnid,
+        }
+    );
+    ok( !defined $args, "process_options() returned undef after 'help' option: 
case '--'" );
     $msg = $tie->READLINE;
-    like($msg, qr/--help/i,
-        "got correct message after 'version' option");
+    like( $msg, qr/--help/i, "got correct message after 'version' option" );
 }
 
 {
-    my ($tie, $rv, $msg);
+    my ( $tie, $rv, $msg );
     $tie = tie *STDOUT, "Parrot::IO::Capture::Mini"
-            or croak "Unable to tie";
-    $args = process_options( {
-        argv            => [ q{--version} ],
-        script          => $0,
-        parrot_version  => $parrot_version,
-        svnid           => $svnid,
-    } );
-    ok(! defined $args,
-        "process_options() returned undef after 'version' option");
+        or croak "Unable to tie";
+    $args = process_options(
+        {
+            argv           => [q{--version}],
+            script         => $0,
+            parrot_version => $parrot_version,
+            svnid          => $svnid,
+        }
+    );
+    ok( !defined $args, "process_options() returned undef after 'version' 
option" );
     $msg = $tie->READLINE;
-    like($msg, qr/Parrot Version/i,
-        "got correct message after 'version' option");
+    like( $msg, qr/Parrot Version/i, "got correct message after 'version' 
option" );
 }
 
-$args = process_options( {
-    argv            => [ q{--lex}, ],
-    script          => $0,
-    parrot_version  => $parrot_version,
-    svnid           => $svnid,
-} );
-ok(defined $args,
-    "process_options() returned successfully after 'lex' option");
-ok($args->{maintainer}, "'maintainer' attribute is true after 'lex' option");
-
-$args = process_options( {
-    argv            => [ q{--yacc}, ],
-    script          => $0,
-    parrot_version  => $parrot_version,
-    svnid           => $svnid,
-} );
-ok(defined $args,
-    "process_options() returned successfully after 'yacc' option");
-ok($args->{maintainer}, "'maintainer' attribute is true after 'yacc' option");
-
-$args = process_options( {
-    argv            => [ q{--debugging=1} ],
-    script          => $0,
-    parrot_version  => $parrot_version,
-    svnid           => $svnid,
-} );
-ok(defined $args, "process_options() returned successfully");
-ok($args->{debugging}, "debugging turned on explicitly");
-
-$args = process_options( {
-    argv            => [ q{--debugging=0} ],
-    script          => $0,
-    parrot_version  => $parrot_version,
-    svnid           => $svnid,
-} );
-ok(defined $args, "process_options() returned successfully");
-ok(! $args->{debugging}, "debugging explicitly turned off");
+$args = process_options(
+    {
+        argv           => [ q{--lex}, ],
+        script         => $0,
+        parrot_version => $parrot_version,
+        svnid          => $svnid,
+    }
+);
+ok( defined $args, "process_options() returned successfully after 'lex' 
option" );
+ok( $args->{maintainer}, "'maintainer' attribute is true after 'lex' option" );
+
+$args = process_options(
+    {
+        argv           => [ q{--yacc}, ],
+        script         => $0,
+        parrot_version => $parrot_version,
+        svnid          => $svnid,
+    }
+);
+ok( defined $args, "process_options() returned successfully after 'yacc' 
option" );
+ok( $args->{maintainer}, "'maintainer' attribute is true after 'yacc' option" 
);
+
+$args = process_options(
+    {
+        argv           => [q{--debugging=1}],
+        script         => $0,
+        parrot_version => $parrot_version,
+        svnid          => $svnid,
+    }
+);
+ok( defined $args, "process_options() returned successfully" );
+ok( $args->{debugging}, "debugging turned on explicitly" );
+
+$args = process_options(
+    {
+        argv           => [q{--debugging=0}],
+        script         => $0,
+        parrot_version => $parrot_version,
+        svnid          => $svnid,
+    }
+);
+ok( defined $args, "process_options() returned successfully" );
+ok( !$args->{debugging}, "debugging explicitly turned off" );
 
 pass("Completed all tests in $0");
 

Modified: branches/reconfigure/t/configure/02-messages.t
==============================================================================
--- branches/reconfigure/t/configure/02-messages.t      (original)
+++ branches/reconfigure/t/configure/02-messages.t      Mon Apr 23 18:27:22 2007
@@ -5,65 +5,50 @@
 
 use strict;
 use warnings;
-
-BEGIN {
-    use FindBin qw($Bin);
-    use Cwd qw(cwd realpath);
-    realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    our $topdir = $1;
-    if ( defined $topdir ) {
-        print "\nOK:  Parrot top directory located\n";
-    }
-    else {
-        $topdir = realpath($Bin) . "/../..";
-    }
-    unshift @INC, qq{$topdir/lib};
-}
-use Test::More tests => 10;
 use Carp;
-use_ok('Parrot::Configure::Messages', qw|
-    print_introduction
-    print_conclusion
-| );
+use Test::More tests => 10;
+use lib qw( . lib ../lib ../../lib );
+use_ok(
+    'Parrot::Configure::Messages', qw|
+        print_introduction
+        print_conclusion
+        |
+);
 use_ok("Parrot::IO::Capture::Mini");
 
 my $parrot_version = '0.4.10';
-my $make_version = 'gnu make';
+my $make_version   = 'gnu make';
 
 {
-    my ($tie, $rv, $msg);
+    my ( $tie, $rv, $msg );
     $tie = tie *STDOUT, "Parrot::IO::Capture::Mini"
-            or croak "Unable to tie";
+        or croak "Unable to tie";
     $rv = print_introduction($parrot_version);
-    ok($rv, "print_introduction() returned true");
+    ok( $rv, "print_introduction() returned true" );
     $msg = $tie->READLINE;
 
     # Following test is definitive.
-    like($msg, qr/$parrot_version/,
-        "Message included Parrot version number supplied as argument");
+    like( $msg, qr/$parrot_version/,
+        "Message included Parrot version number supplied as argument" );
 
     # Following tests are NOT definitive.  They will break if content of
     # strings printed by function is changed.
-    like($msg, qr/Parrot\sVersion/i,
-        "Message included string 'Parrot version'");
-    like($msg, qr/Configure/i,
-        "Message included string 'Configure'");
-    like($msg, qr/Copyright/i,
-        "Message included copyright notice");
+    like( $msg, qr/Parrot\sVersion/i, "Message included string 'Parrot 
version'" );
+    like( $msg, qr/Configure/i,       "Message included string 'Configure'" );
+    like( $msg, qr/Copyright/i,       "Message included copyright notice" );
     undef $tie;
 }
 
 {
-    my ($tie, $rv, $msg);
+    my ( $tie, $rv, $msg );
     $tie = tie *STDOUT, "Parrot::IO::Capture::Mini"
-            or croak "Unable to tie";
+        or croak "Unable to tie";
     $rv = print_conclusion($make_version);
-    ok($rv, "print_conclusion() returned true");
+    ok( $rv, "print_conclusion() returned true" );
     $msg = $tie->READLINE;
 
     # Following test is definitive.
-    like($msg, qr/$make_version/,
-        "Message included make version supplied as argument");
+    like( $msg, qr/$make_version/, "Message included make version supplied as 
argument" );
 
     undef $tie;
 }
@@ -80,7 +65,7 @@
 
 =head1 SYNOPSIS
 
-    % prove t/configure02-messages.t
+    % prove t/configure/components/02-messages.t
 
 =head1 DESCRIPTION
 

Modified: branches/reconfigure/t/configure/03-steplist.t
==============================================================================
--- branches/reconfigure/t/configure/03-steplist.t      (original)
+++ branches/reconfigure/t/configure/03-steplist.t      Mon Apr 23 18:27:22 2007
@@ -5,22 +5,9 @@
 
 use strict;
 use warnings;
-
-BEGIN {
-    use FindBin qw($Bin);
-    use Cwd qw(cwd realpath);
-    realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    our $topdir = $1;
-    if ( defined $topdir ) {
-        print "\nOK:  Parrot top directory located\n";
-    }
-    else {
-        $topdir = realpath($Bin) . "/../..";
-    }
-    unshift @INC, qq{$topdir/lib};
-}
 use Test::More tests =>  4;
 use Carp;
+use lib qw( . lib ../lib ../../lib );
 use_ok('Parrot::Configure::Step::List', qw|
     get_steps_list
 | );
@@ -43,7 +30,7 @@
 
 =head1 SYNOPSIS
 
-    % prove t/configure03-steplist.t
+    % prove t/configure/03-steplist.t
 
 =head1 DESCRIPTION
 
@@ -61,10 +48,3 @@
 Parrot::Configure::Step::List, F<Configure.pl>.
 
 =cut
-
-# Local Variables:
-#   mode: cperl
-#   cperl-indent-level: 4
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:

Modified: branches/reconfigure/t/configure/04-configure.t
==============================================================================
--- branches/reconfigure/t/configure/04-configure.t     (original)
+++ branches/reconfigure/t/configure/04-configure.t     Mon Apr 23 18:27:22 2007
@@ -6,23 +6,9 @@
 use strict;
 use warnings;
 
-BEGIN {
-    use FindBin qw($Bin);
-    use Cwd qw(cwd realpath);
-    realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    our $topdir = $1;
-    if ( defined $topdir ) {
-        print "\nOK:  Parrot top directory located\n";
-    }
-    else {
-        $topdir = realpath($Bin) . "/../..";
-    }
-    unshift @INC, qq{$topdir/lib};
-}
 use Test::More tests => 30;
 use Carp;
-use Data::Dumper;
-$Data::Dumper::Indent=1;
+use lib qw( . lib ../lib ../../lib );
 use Parrot::BuildUtil;
 use Parrot::Configure;
 use Parrot::Configure::Options qw( process_options );

Modified: branches/reconfigure/t/configure/05-run_one_step.t
==============================================================================
--- branches/reconfigure/t/configure/05-run_one_step.t  (original)
+++ branches/reconfigure/t/configure/05-run_one_step.t  Mon Apr 23 18:27:22 2007
@@ -6,28 +6,13 @@
 use strict;
 use warnings;
 
-BEGIN {
-    use FindBin qw($Bin);
-    use Cwd qw(cwd realpath);
-    realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    our $topdir = $1;
-    if ( defined $topdir ) {
-        print "\nOK:  Parrot top directory located\n";
-    }
-    else {
-        $topdir = realpath($Bin) . "/../..";
-    }
-    unshift @INC, qq{$topdir/lib};
-}
 use Test::More tests => 23;
 use Carp;
-#use Data::Dumper;
-#$Data::Dumper::Indent=1;
+use lib qw( . lib ../lib ../../lib t/configure/testlib );
 use Parrot::BuildUtil;
 use Parrot::Configure;
 use Parrot::Configure::Options qw( process_options );
 use Parrot::IO::Capture::Mini;
-use lib ("t/configure/testlib");
 
 my $parrot_version = Parrot::BuildUtil::parrot_version();
 like($parrot_version, qr/\d+\.\d+\.\d+/,

Modified: branches/reconfigure/t/configure/06-bad_step.t
==============================================================================
--- branches/reconfigure/t/configure/06-bad_step.t      (original)
+++ branches/reconfigure/t/configure/06-bad_step.t      Mon Apr 23 18:27:22 2007
@@ -6,23 +6,9 @@
 use strict;
 use warnings;
 
-BEGIN {
-    use FindBin qw($Bin);
-    use Cwd qw(cwd realpath);
-    realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    our $topdir = $1;
-    if ( defined $topdir ) {
-        print "\nOK:  Parrot top directory located\n";
-    }
-    else {
-        $topdir = realpath($Bin) . "/../..";
-    }
-    unshift @INC, qq{$topdir/lib};
-}
 use Test::More tests => 13;
 use Carp;
-#use Data::Dumper;
-#$Data::Dumper::Indent=1;
+use lib qw( . lib ../lib ../../lib );
 use Parrot::BuildUtil;
 use Parrot::Configure;
 use Parrot::Configure::Options qw( process_options );

Modified: branches/reconfigure/t/configure/07-verbose_two.t
==============================================================================
--- branches/reconfigure/t/configure/07-verbose_two.t   (original)
+++ branches/reconfigure/t/configure/07-verbose_two.t   Mon Apr 23 18:27:22 2007
@@ -6,28 +6,13 @@
 use strict;
 use warnings;
 
-BEGIN {
-    use FindBin qw($Bin);
-    use Cwd qw(cwd realpath);
-    realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    our $topdir = $1;
-    if ( defined $topdir ) {
-        print "\nOK:  Parrot top directory located\n";
-    }
-    else {
-        $topdir = realpath($Bin) . "/../..";
-    }
-    unshift @INC, qq{$topdir/lib};
-}
 use Test::More tests => 14;
 use Carp;
-#use Data::Dumper;
-#$Data::Dumper::Indent=1;
+use lib qw( . lib ../lib ../../lib t/configure/testlib );
 use Parrot::BuildUtil;
 use Parrot::Configure;
 use Parrot::Configure::Options qw( process_options );
 use Parrot::IO::Capture::Mini;
-use lib ("t/configure/testlib");
 
 my $parrot_version = Parrot::BuildUtil::parrot_version();
 like($parrot_version, qr/\d+\.\d+\.\d+/,

Modified: branches/reconfigure/t/configure/08-verbose_step_number.t
==============================================================================
--- branches/reconfigure/t/configure/08-verbose_step_number.t   (original)
+++ branches/reconfigure/t/configure/08-verbose_step_number.t   Mon Apr 23 
18:27:22 2007
@@ -6,28 +6,13 @@
 use strict;
 use warnings;
 
-BEGIN {
-    use FindBin qw($Bin);
-    use Cwd qw(cwd realpath);
-    realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    our $topdir = $1;
-    if ( defined $topdir ) {
-        print "\nOK:  Parrot top directory located\n";
-    }
-    else {
-        $topdir = realpath($Bin) . "/../..";
-    }
-    unshift @INC, qq{$topdir/lib};
-}
 use Test::More tests => 14;
 use Carp;
-use Data::Dumper;
-$Data::Dumper::Indent=1;
+use lib qw( . lib ../lib ../../lib t/configure/testlib );
 use Parrot::BuildUtil;
 use Parrot::Configure;
 use Parrot::Configure::Options qw( process_options );
 use Parrot::IO::Capture::Mini;
-use lib ("t/configure/testlib");
 
 my $parrot_version = Parrot::BuildUtil::parrot_version();
 like($parrot_version, qr/\d+\.\d+\.\d+/,

Modified: branches/reconfigure/t/configure/09-verbose_step_regex.t
==============================================================================
--- branches/reconfigure/t/configure/09-verbose_step_regex.t    (original)
+++ branches/reconfigure/t/configure/09-verbose_step_regex.t    Mon Apr 23 
18:27:22 2007
@@ -6,28 +6,13 @@
 use strict;
 use warnings;
 
-BEGIN {
-    use FindBin qw($Bin);
-    use Cwd qw(cwd realpath);
-    realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    our $topdir = $1;
-    if ( defined $topdir ) {
-        print "\nOK:  Parrot top directory located\n";
-    }
-    else {
-        $topdir = realpath($Bin) . "/../..";
-    }
-    unshift @INC, qq{$topdir/lib};
-}
 use Test::More tests => 14;
 use Carp;
-use Data::Dumper;
-$Data::Dumper::Indent=1;
+use lib qw( . lib ../lib ../../lib t/configure/testlib );
 use Parrot::BuildUtil;
 use Parrot::Configure;
 use Parrot::Configure::Options qw( process_options );
 use Parrot::IO::Capture::Mini;
-use lib ("t/configure/testlib");
 
 my $parrot_version = Parrot::BuildUtil::parrot_version();
 like($parrot_version, qr/\d+\.\d+\.\d+/,

Modified: branches/reconfigure/t/configure/10-verbose_step_number_not_called.t
==============================================================================
--- branches/reconfigure/t/configure/10-verbose_step_number_not_called.t        
(original)
+++ branches/reconfigure/t/configure/10-verbose_step_number_not_called.t        
Mon Apr 23 18:27:22 2007
@@ -6,28 +6,13 @@
 use strict;
 use warnings;
 
-BEGIN {
-    use FindBin qw($Bin);
-    use Cwd qw(cwd realpath);
-    realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    our $topdir = $1;
-    if ( defined $topdir ) {
-        print "\nOK:  Parrot top directory located\n";
-    }
-    else {
-        $topdir = realpath($Bin) . "/../..";
-    }
-    unshift @INC, qq{$topdir/lib};
-}
 use Test::More tests => 14;
 use Carp;
-use Data::Dumper;
-$Data::Dumper::Indent=1;
+use lib qw( . lib ../lib ../../lib t/configure/testlib );
 use Parrot::BuildUtil;
 use Parrot::Configure;
 use Parrot::Configure::Options qw( process_options );
 use Parrot::IO::Capture::Mini;
-use lib ("t/configure/testlib");
 
 my $parrot_version = Parrot::BuildUtil::parrot_version();
 like($parrot_version, qr/\d+\.\d+\.\d+/,

Modified: branches/reconfigure/t/configure/11-no_description.t
==============================================================================
--- branches/reconfigure/t/configure/11-no_description.t        (original)
+++ branches/reconfigure/t/configure/11-no_description.t        Mon Apr 23 
18:27:22 2007
@@ -6,28 +6,13 @@
 use strict;
 use warnings;
 
-BEGIN {
-    use FindBin qw($Bin);
-    use Cwd qw(cwd realpath);
-    realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    our $topdir = $1;
-    if ( defined $topdir ) {
-        print "\nOK:  Parrot top directory located\n";
-    }
-    else {
-        $topdir = realpath($Bin) . "/../..";
-    }
-    unshift @INC, qq{$topdir/lib};
-}
 use Test::More tests => 14;
 use Carp;
-#use Data::Dumper;
-#$Data::Dumper::Indent=1;
+use lib qw( . lib ../lib ../../lib t/configure/testlib );
 use Parrot::BuildUtil;
 use Parrot::Configure;
 use Parrot::Configure::Options qw( process_options );
 use Parrot::IO::Capture::Mini;
-use lib ("t/configure/testlib");
 
 my $parrot_version = Parrot::BuildUtil::parrot_version();
 like($parrot_version, qr/\d+\.\d+\.\d+/,

Modified: branches/reconfigure/t/configure/12-verbose.t
==============================================================================
--- branches/reconfigure/t/configure/12-verbose.t       (original)
+++ branches/reconfigure/t/configure/12-verbose.t       Mon Apr 23 18:27:22 2007
@@ -6,28 +6,13 @@
 use strict;
 use warnings;
 
-BEGIN {
-    use FindBin qw($Bin);
-    use Cwd qw(cwd realpath);
-    realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    our $topdir = $1;
-    if ( defined $topdir ) {
-        print "\nOK:  Parrot top directory located\n";
-    }
-    else {
-        $topdir = realpath($Bin) . "/../..";
-    }
-    unshift @INC, qq{$topdir/lib};
-}
 use Test::More tests => 14;
 use Carp;
-#use Data::Dumper;
-#$Data::Dumper::Indent=1;
+use lib qw( . lib ../lib ../../lib t/configure/testlib );
 use Parrot::BuildUtil;
 use Parrot::Configure;
 use Parrot::Configure::Options qw( process_options );
 use Parrot::IO::Capture::Mini;
-use lib ("t/configure/testlib");
 
 my $parrot_version = Parrot::BuildUtil::parrot_version();
 like($parrot_version, qr/\d+\.\d+\.\d+/,

Modified: branches/reconfigure/t/configure/13-die.t
==============================================================================
--- branches/reconfigure/t/configure/13-die.t   (original)
+++ branches/reconfigure/t/configure/13-die.t   Mon Apr 23 18:27:22 2007
@@ -6,28 +6,13 @@
 use strict;
 use warnings;
 
-BEGIN {
-    use FindBin qw($Bin);
-    use Cwd qw(cwd realpath);
-    realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    our $topdir = $1;
-    if ( defined $topdir ) {
-        print "\nOK:  Parrot top directory located\n";
-    }
-    else {
-        $topdir = realpath($Bin) . "/../..";
-    }
-    unshift @INC, qq{$topdir/lib};
-}
 use Test::More qw(no_plan); # tests => 14;
 use Carp;
-use Data::Dumper;
-$Data::Dumper::Indent=1;
+use lib qw( . lib ../lib ../../lib t/configure/testlib );
 use Parrot::BuildUtil;
 use Parrot::Configure;
 use Parrot::Configure::Options qw( process_options );
 use Parrot::IO::Capture::Mini;
-use lib ("t/configure/testlib");
 
 my $parrot_version = Parrot::BuildUtil::parrot_version();
 like($parrot_version, qr/\d+\.\d+\.\d+/,

Modified: branches/reconfigure/t/configure/14-params.t
==============================================================================
--- branches/reconfigure/t/configure/14-params.t        (original)
+++ branches/reconfigure/t/configure/14-params.t        Mon Apr 23 18:27:22 2007
@@ -6,28 +6,13 @@
 use strict;
 use warnings;
 
-BEGIN {
-    use FindBin qw($Bin);
-    use Cwd qw(cwd realpath);
-    realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    our $topdir = $1;
-    if ( defined $topdir ) {
-        print "\nOK:  Parrot top directory located\n";
-    }
-    else {
-        $topdir = realpath($Bin) . "/../..";
-    }
-    unshift @INC, qq{$topdir/lib};
-}
 use Test::More tests => 14;
 use Carp;
-use Data::Dumper;
-$Data::Dumper::Indent=1;
+use lib qw( . lib ../lib ../../lib t/configure/testlib );
 use Parrot::BuildUtil;
 use Parrot::Configure;
 use Parrot::Configure::Options qw( process_options );
 use Parrot::IO::Capture::Mini;
-use lib ("t/configure/testlib");
 
 my $parrot_version = Parrot::BuildUtil::parrot_version();
 like($parrot_version, qr/\d+\.\d+\.\d+/,

Modified: branches/reconfigure/t/configure/15-no_return.t
==============================================================================
--- branches/reconfigure/t/configure/15-no_return.t     (original)
+++ branches/reconfigure/t/configure/15-no_return.t     Mon Apr 23 18:27:22 2007
@@ -6,29 +6,13 @@
 use strict;
 use warnings;
 
-BEGIN {
-    use FindBin qw($Bin);
-    use Cwd qw(cwd realpath);
-    realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    our $topdir = $1;
-    if ( defined $topdir ) {
-        print "\nOK:  Parrot top directory located\n";
-    }
-    else {
-        $topdir = realpath($Bin) . "/../..";
-    }
-    unshift @INC, qq{$topdir/lib};
-}
 use Test::More tests => 15;
-
 use Carp;
-#use Data::Dumper;
-#$Data::Dumper::Indent=1;
+use lib qw( . lib ../lib ../../lib t/configure/testlib );
 use Parrot::BuildUtil;
 use Parrot::Configure;
 use Parrot::Configure::Options qw( process_options );
 use Parrot::IO::Capture::Mini;
-use lib ("t/configure/testlib");
 
 my $parrot_version = Parrot::BuildUtil::parrot_version();
 like($parrot_version, qr/\d+\.\d+\.\d+/,

Modified: branches/reconfigure/t/configure/16-no_return_but_result.t
==============================================================================
--- branches/reconfigure/t/configure/16-no_return_but_result.t  (original)
+++ branches/reconfigure/t/configure/16-no_return_but_result.t  Mon Apr 23 
18:27:22 2007
@@ -6,29 +6,13 @@
 use strict;
 use warnings;
 
-BEGIN {
-    use FindBin qw($Bin);
-    use Cwd qw(cwd realpath);
-    realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$};
-    our $topdir = $1;
-    if ( defined $topdir ) {
-        print "\nOK:  Parrot top directory located\n";
-    }
-    else {
-        $topdir = realpath($Bin) . "/../..";
-    }
-    unshift @INC, qq{$topdir/lib};
-}
 use Test::More qw(no_plan); # tests => 15;
-
 use Carp;
-#use Data::Dumper;
-#$Data::Dumper::Indent=1;
+use lib qw( . lib ../lib ../../lib t/configure/testlib );
 use Parrot::BuildUtil;
 use Parrot::Configure;
 use Parrot::Configure::Options qw( process_options );
 use Parrot::IO::Capture::Mini;
-use lib ("t/configure/testlib");
 
 my $parrot_version = Parrot::BuildUtil::parrot_version();
 like($parrot_version, qr/\d+\.\d+\.\d+/,

Reply via email to