# New Ticket Created by James Keenan
# Please include the string: [perl #45737]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=45737 >
This patch is submitted in response to a question which I posed in
http://rt.perl.org/rt3/Ticket/Display.html?id=45523 over the weekend,
viz., "What do we gain by having some configuration step classes'
runstep() methods return $self (the step object itself)? Why can't we
simply have a step return 1 upon success and undef otherwise?"
The answer is: There is no good reason why some of the configuration
steps' runstep() methods return $self instead of 1. It's totally
unnecessary. The patch demonstrates this and proposes:
1. Change in the specification for a step's runstep() method in docs/
configuration.pod.
2. In all config/*/*.pm modules, wherever a runstep() method
returned $self, it now returns 1. Each such method continues to
return undef upon failure -- failure in the sense of "the step didn't
accomplish what you wanted it to do."
3. Several test files are modified to reflect the new interface.
4. Parrot::Configure::_run_this_step() is modified to reflect the
new interface from the caller's point of view.
This is a significant revision both for the number of files it
affects and also for the fact that this will help us get to --fatal-
step options and logging of unsuccessful steps (two other recently
created RT tickets).
This was tested on Linux with both 'perl Configure.pl --test' and
'make test'. All tests passed.
Please review and comment. Thank you very much.
kid51
Index: docs/configuration.pod
===================================================================
--- docs/configuration.pod (revision 21533)
+++ docs/configuration.pod (working copy)
@@ -149,11 +149,12 @@
=item L<runstep>
This method is called to actually execute the step. The global
-L<Parrot::Configure> is passed in as the first parameter. The return value is
-undefined.
+L<Parrot::Configure> is passed in as the first parameter. The return
+value should be C<1> if the step accomplishes what it is intended to do.
+Otherwise, the step should simply C<return>, I<i.e.>, return an
+undefined value.
-I<XXX> In the near future the return value of this method will be significant
-and there will be a means of passing additional parameters.
+I<XXX> In the near future there will be a means of passing additional
parameters.
=back
Index: MANIFEST
===================================================================
--- MANIFEST (revision 21533)
+++ MANIFEST (working copy)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Mon Sep 24 13:09:40 2007 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Tue Sep 25 02:16:39 2007 UT
#
# See tools/dev/install_files.pl for documentation on the
# format of this file.
@@ -2988,9 +2988,11 @@
t/configure/testlib/init/beta.pm []
t/configure/testlib/init/delta.pm []
t/configure/testlib/init/epsilon.pm []
+t/configure/testlib/init/eta.pm []
t/configure/testlib/init/foobar.pm []
t/configure/testlib/init/gamma.pm []
t/configure/testlib/init/zeta.pm []
+t/configure/testlib/inter/theta.pm []
t/distro/file_metadata.t []
t/distro/manifest.t []
t/distro/test_file_coverage.t []
Index: lib/Parrot/Configure.pm
===================================================================
--- lib/Parrot/Configure.pm (revision 21533)
+++ lib/Parrot/Configure.pm (working copy)
@@ -186,7 +186,8 @@
C<runstep()> method, followed by any parameters that were registered for that
step.
-Accepts no arguments and modifies the data structure within the
L<Parrot::Configure> object.
+Accepts no arguments and modifies the data structure within the
+L<Parrot::Configure> object.
=cut
@@ -194,19 +195,18 @@
my $conf = shift;
my $n = 0; # step number
- my ( $verbose, $verbose_step, $ask ) = $conf->options->get(qw( verbose
verbose-step ask ));
+ my ( $verbose, $verbose_step, $ask ) =
+ $conf->options->get(qw( verbose verbose-step ask ));
foreach my $task ( $conf->steps ) {
$n++;
- $conf->_run_this_step(
- {
- task => $task,
- verbose => $verbose,
- verbose_step => $verbose_step,
- ask => $ask,
- n => $n,
- }
- );
+ my $rv = $conf->_run_this_step( {
+ task => $task,
+ verbose => $verbose,
+ verbose_step => $verbose_step,
+ ask => $ask,
+ n => $n,
+ } );
}
return 1;
}
@@ -225,21 +225,22 @@
my $conf = shift;
my $taskname = shift;
- my ( $verbose, $verbose_step, $ask ) = $conf->options->get(qw( verbose
verbose-step ask ));
-
- for my $task ( $conf->steps() ) {
- if ( $task->{"Parrot::Configure::Task::step"} eq $taskname ) {
- $conf->_run_this_step(
- {
- task => $task,
- verbose => $verbose,
- verbose_step => $verbose_step,
- ask => $ask,
- n => 1,
- }
- );
- }
+ my ( $verbose, $verbose_step, $ask ) =
+ $conf->options->get(qw( verbose verbose-step ask ));
+
+ my $task = ( $conf->steps() )[0];
+ if ( $task->{"Parrot::Configure::Task::step"} eq $taskname ) {
+ $conf->_run_this_step( {
+ task => $task,
+ verbose => $verbose,
+ verbose_step => $verbose_step,
+ ask => $ask,
+ n => 1,
+ } );
}
+ else {
+ die "Mangled task in run_single_step";
+ }
}
sub _run_this_step {
@@ -295,7 +296,9 @@
print "\n", $description, '...';
print "\n" if $args->{verbose} && $args->{verbose} == 2;
- my $ret; # step return value
+ my $ret;
+ # When successful, a Parrot configuration step returns itself,
+ # i.e., returns its own object.
eval {
if (@step_params)
{
@@ -308,42 +311,70 @@
if ($@) {
carp "\nstep $step_name died during execution: [EMAIL PROTECTED]";
return;
+ } else {
+ # A Parrot configuration step can run successfully, but if it fails to
+ # achieve its objective it is supposed to return an undefined status.
+ if ( $ret ) {
+ _finish_printing_result( {
+ step => $step,
+ args => $args,
+ description => $description,
+ } );
+ # reset verbose value for the next step
+ $conf->options->set( verbose => $args->{verbose} );
+
+ if ($conf->options->get(q{configure_trace}) ) {
+ _update_conftrace( {
+ conftrace => $conftrace,
+ step_name => $step_name,
+ conf => $conf,
+ sto => $sto,
+ } );
+ }
+ return 1;
+ } else {
+ _failure_message($step, $step_name);
+ return;
+ }
}
+}
- # did the step return itself?
- eval { $ret->can('result'); };
+sub _failure_message {
+ my ($step, $step_name) = @_;
+ my $result = $step->result || 'no result returned';
+ carp "\nstep $step_name failed: " . $result;
+}
- # if not, report the result and return
- if ($@) {
- my $result = $step->result || 'no result returned';
- carp "\nstep $step_name failed: " . $result;
- return;
+
+sub _finish_printing_result {
+ my $argsref = shift;
+ my $result = $argsref->{step}->result || 'done';
+ if ($argsref->{args}->{verbose} && $argsref->{args}->{verbose} == 2) {
+ print "...";
}
+ print "." x ( 71 - length($argsref->{description}) - length($result) );
+ unless ($argsref->{step} =~ m{^inter/} && $argsref->{args}->{ask}) {
+ print "$result.";
+ }
+ return 1;
+}
- my $result = $step->result || 'done';
-
- print "..." if $args->{verbose} && $args->{verbose} == 2;
- print "." x ( 71 - length($description) - length($result) );
- print "$result." unless $step =~ m{^inter/} && $args->{ask};
-
- # reset verbose value for the next step
- $conf->options->set( verbose => $args->{verbose} );
-
- if ( $conf->options->get(q{configure_trace}) ) {
- if ( !defined $conftrace->[0] ) {
- $conftrace->[0] = [];
- }
- push @{ $conftrace->[0] }, $step_name;
- my $evolved_data = {
- options => $conf->{options},
- data => $conf->{data},
- };
- push @{$conftrace}, $evolved_data;
- {
- local $Storable::Deparse = 1;
- nstore( $conftrace, $sto );
- }
+sub _update_conftrace {
+ my $argsref = shift;
+ if (! defined $argsref->{conftrace}->[0]) {
+ $argsref->{conftrace}->[0] = [];
}
+ push @{$argsref->{conftrace}->[0]}, $argsref->{step_name};
+ my $evolved_data = {
+ options => $argsref->{conf}->{options},
+ data => $argsref->{conf}->{data},
+ };
+ push @{$argsref->{conftrace}}, $evolved_data;
+ {
+ local $Storable::Deparse = 1;
+ nstore($argsref->{conftrace}, $argsref->{sto});
+ }
+ return 1;
}
=item * C<option_or_data($arg)>
Index: t/configure/101-init_manifest.01.t
===================================================================
--- t/configure/101-init_manifest.01.t (revision 21533)
+++ t/configure/101-init_manifest.01.t (working copy)
@@ -5,7 +5,7 @@
use strict;
use warnings;
-use Test::More tests => 7;
+use Test::More tests => 8;
use Carp;
use Data::Dumper;
use lib qw( lib );
@@ -38,9 +38,11 @@
ok( defined $step, "$step_name constructor returned defined value" );
isa_ok( $step, $step_name );
ok( $step->description(), "$step_name has description" );
+ok(! defined ($step->result), "result not yet defined");
my $ret = $step->runstep($conf);
-ok( defined $ret, "$step_name runstep() returned defined value" );
-is( $ret->result, q{skipped}, "Because of --nomanicheck, result is 'skipped'."
);
+ok(defined $ret, "$step_name runstep() returned defined value");
+is($step->result, q{skipped},
+ "Because of --nomanicheck, result is 'skipped'.");
pass("Completed all tests in $0");
Index: t/configure/015-no_return.t
===================================================================
--- t/configure/015-no_return.t (revision 21533)
+++ t/configure/015-no_return.t (working copy)
@@ -14,70 +14,68 @@
use Parrot::IO::Capture::Mini;
$| = 1;
-is( $|, 1, "output autoflush is set" );
+is($|, 1, "output autoflush is set");
-my $args = process_options(
- {
- argv => [],
- mode => q{configure},
- }
-);
-ok( defined $args, "process_options returned successfully" );
+my $args = process_options( {
+ argv => [ ],
+ mode => q{configure},
+} );
+ok(defined $args, "process_options returned successfully");
my %args = %$args;
my $conf = Parrot::Configure->new;
-ok( defined $conf, "Parrot::Configure->new() returned okay" );
+ok(defined $conf, "Parrot::Configure->new() returned okay");
-my $step = q{init::epsilon};
+my $step = q{init::epsilon};
my $description = 'Determining if your computer does epsilon';
-$conf->add_steps($step);
-my @confsteps = @{ $conf->steps };
-isnt( scalar @confsteps, 0,
- "Parrot::Configure object 'steps' key holds non-empty array reference" );
-is( scalar @confsteps, 1, "Parrot::Configure object 'steps' key holds ref to
1-element array" );
+$conf->add_steps( $step );
+my @confsteps = @{$conf->steps};
+isnt(scalar @confsteps, 0,
+ "Parrot::Configure object 'steps' key holds non-empty array reference");
+is(scalar @confsteps, 1,
+ "Parrot::Configure object 'steps' key holds ref to 1-element array");
my $nontaskcount = 0;
foreach my $k (@confsteps) {
$nontaskcount++ unless $k->isa("Parrot::Configure::Task");
}
-is( $nontaskcount, 0, "Each step is a Parrot::Configure::Task object" );
-is( $confsteps[0]->step, $step, "'step' element of Parrot::Configure::Task
struct identified" );
-is( ref( $confsteps[0]->params ),
- 'ARRAY', "'params' element of Parrot::Configure::Task struct is array ref"
);
-ok( !ref( $confsteps[0]->object ),
- "'object' element of Parrot::Configure::Task struct is not yet a ref" );
+is($nontaskcount, 0, "Each step is a Parrot::Configure::Task object");
+is($confsteps[0]->step, $step,
+ "'step' element of Parrot::Configure::Task struct identified");
+is(ref($confsteps[0]->params), 'ARRAY',
+ "'params' element of Parrot::Configure::Task struct is array ref");
+ok(! ref($confsteps[0]->object),
+ "'object' element of Parrot::Configure::Task struct is not yet a ref");
$conf->options->set(%args);
-is( $conf->options->{c}->{debugging},
- 1, "command-line option '--debugging' has been stored in object" );
+is($conf->options->{c}->{debugging}, 1,
+ "command-line option '--debugging' has been stored in object");
-my $rv;
-my ( $tie, @lines, $errstr );
{
+ my $rv;
+ my ($tie, @lines);
$tie = tie *STDOUT, "Parrot::IO::Capture::Mini"
or croak "Unable to tie";
- local $SIG{__WARN__} = \&_capture;
- $rv = $conf->runsteps;
+ $rv = $conf->runsteps;
@lines = $tie->READLINE;
+ ok($rv, "runsteps successfully ran $step");
+ my $bigmsg = join q{}, @lines;
+ like($bigmsg,
+ qr/$description/s,
+ "Got correct description for $step");
+ like($bigmsg, qr/done\.\z/,
+ "got 'done' in lieu of result set by step");
}
-ok( $rv, "runsteps successfully ran $step" );
-my $bigmsg = join q{}, @lines;
-like( $bigmsg, qr/$description/s, "Got message expected upon running $step" );
-like(
- $errstr,
- qr/step $step failed:\s*no result returned/s,
- "Got error message expected when config module did not return object"
-);
+untie *STDOUT;
pass("Completed all tests in $0");
-sub _capture { $errstr = $_[0]; }
-
################### DOCUMENTATION ###################
=head1 NAME
-015-no_return.t - see what happens when configuration step does not return
object
+015-no_return.t - see what happens when configuration step implicitly returns
+true value but does not set a result
=head1 SYNOPSIS
Index: t/configure/016-no_return_but_result.t
===================================================================
--- t/configure/016-no_return_but_result.t (revision 21533)
+++ t/configure/016-no_return_but_result.t (working copy)
@@ -6,7 +6,7 @@
use strict;
use warnings;
-use Test::More tests => 11;
+use Test::More qw(no_plan); # tests => 14;
use Carp;
use lib qw( lib t/configure/testlib );
use Parrot::Configure;
@@ -14,72 +14,74 @@
use Parrot::IO::Capture::Mini;
$| = 1;
-is( $|, 1, "output autoflush is set" );
+is($|, 1, "output autoflush is set");
-my $args = process_options(
- {
- argv => [],
- mode => q{configure},
- }
-);
-ok( defined $args, "process_options returned successfully" );
+my $args = process_options( {
+ argv => [ ],
+ mode => q{configure},
+} );
+ok(defined $args, "process_options returned successfully");
my %args = %$args;
my $conf = Parrot::Configure->new;
-ok( defined $conf, "Parrot::Configure->new() returned okay" );
+ok(defined $conf, "Parrot::Configure->new() returned okay");
-my $step = q{init::epsilon};
-my $description = 'Determining if your computer does epsilon';
+my $step = q{init::zeta};
+my $description = 'Determining if your computer does zeta';
-$conf->add_steps($step);
-my @confsteps = @{ $conf->steps };
-isnt( scalar @confsteps, 0,
- "Parrot::Configure object 'steps' key holds non-empty array reference" );
-is( scalar @confsteps, 1, "Parrot::Configure object 'steps' key holds ref to
1-element array" );
+$conf->add_steps( $step );
+my @confsteps = @{$conf->steps};
+isnt(scalar @confsteps, 0,
+ "Parrot::Configure object 'steps' key holds non-empty array reference");
+is(scalar @confsteps, 1,
+ "Parrot::Configure object 'steps' key holds ref to 1-element array");
my $nontaskcount = 0;
foreach my $k (@confsteps) {
$nontaskcount++ unless $k->isa("Parrot::Configure::Task");
}
-is( $nontaskcount, 0, "Each step is a Parrot::Configure::Task object" );
-is( $confsteps[0]->step, $step, "'step' element of Parrot::Configure::Task
struct identified" );
-is( ref( $confsteps[0]->params ),
- 'ARRAY', "'params' element of Parrot::Configure::Task struct is array ref"
);
-ok( !ref( $confsteps[0]->object ),
- "'object' element of Parrot::Configure::Task struct is not yet a ref" );
+is($nontaskcount, 0, "Each step is a Parrot::Configure::Task object");
+is($confsteps[0]->step, $step,
+ "'step' element of Parrot::Configure::Task struct identified");
+is(ref($confsteps[0]->params), 'ARRAY',
+ "'params' element of Parrot::Configure::Task struct is array ref");
+ok(! ref($confsteps[0]->object),
+ "'object' element of Parrot::Configure::Task struct is not yet a ref");
$conf->options->set(%args);
-is( $conf->options->{c}->{debugging},
- 1, "command-line option '--debugging' has been stored in object" );
+is($conf->options->{c}->{debugging}, 1,
+ "command-line option '--debugging' has been stored in object");
my $rv;
-my ( $tie, @lines, $errstr );
+my ($tie, @lines, $errtie, @errlines);
+{
+ $tie = tie *STDOUT, "Parrot::IO::Capture::Mini"
+ or croak "Unable to tie";
+ $errtie = tie *STDERR, "Parrot::IO::Capture::Mini"
+ or croak "Unable to tie";
+ $rv = $conf->runsteps;
+ @lines = $tie->READLINE;
+ @errlines = $errtie->READLINE;
+}
+untie *STDOUT;
+untie *STDERR;
+ok($rv, "runsteps successfully ran $step");
+my $bigmsg = join q{}, @lines;
+like($bigmsg,
+ qr/$description/s,
+ "Got correct description for $step");
+my $errmsg = join q{}, @errlines;
+like($errmsg,
+ qr/step $step failed:\sGoodbye, cruel world/,
+ "Got error message expected upon running $step");
-#{
-# $tie = tie *STDOUT, "Parrot::IO::Capture::Mini"
-# or croak "Unable to tie";
-## local $SIG{__WARN__} = \&_capture;
-# $rv = $conf->runsteps;
-# @lines = $tie->READLINE;
-#}
-#ok($rv, "runsteps successfully ran $step");
-#my $bigmsg = join q{}, @lines;
-#like($bigmsg,
-# qr/$description/s,
-# "Got message expected upon running $step");
-#like($errstr,
-# qr/step $step failed:\s*Hello world/s,
-# "Got error message expected when config module did not return object");
-
pass("Completed all tests in $0");
-sub _capture { $errstr = $_[0]; }
-
################### DOCUMENTATION ###################
=head1 NAME
016-no_return_but_result.t - see what happens when configuration step returns
-something other than object but has a defined result method
+undefined value but has a defined result method
=head1 SYNOPSIS
Index: t/configure/testlib/inter/theta.pm
===================================================================
--- t/configure/testlib/inter/theta.pm (revision 0)
+++ t/configure/testlib/inter/theta.pm (revision 0)
@@ -0,0 +1,45 @@
+# Copyright (C) 2001-2003, The Perl Foundation.
+# $Id$
+
+=head1 NAME
+
+t/configure/testlib/inter/theta.pm - Module used in configuration tests
+
+=cut
+
+package inter::theta;
+
+use strict;
+use warnings;
+use vars qw($description @args);
+
+use File::Basename qw/basename/;
+
+use base qw(Parrot::Configure::Step::Base);
+
+use Parrot::Configure::Step ':inter';
+
+$description = 'Determining if your computer does theta';
[EMAIL PROTECTED] = qw(ask theta);
+
+sub runstep {
+ my ( $self, $conf ) = @_;
+
+ my $ask = $conf->options->get('ask');
+
+ my $question = 'Will Perl 6 be out before Christmas?';
+ my $response;
+ if ($ask) {
+ $response = prompt( $question, q{Y/n} );
+ }
+ return $self;
+}
+
+1;
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Property changes on: t/configure/testlib/inter/theta.pm
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Index: t/configure/testlib/init/eta.pm
===================================================================
--- t/configure/testlib/init/eta.pm (revision 0)
+++ t/configure/testlib/init/eta.pm (revision 0)
@@ -0,0 +1,38 @@
+# Copyright (C) 2001-2003, The Perl Foundation.
+# $Id$
+
+=head1 NAME
+
+t/configure/testlib/init/eta.pm - Module used in configuration tests
+
+=cut
+
+package init::eta;
+use strict;
+use warnings;
+use vars qw($description @args);
+
+use base qw(Parrot::Configure::Step::Base);
+
+use Parrot::Configure::Step;
+
+$description = 'Determining if your computer does eta';
[EMAIL PROTECTED] = ();
+
+my $result = q|Hello world|;
+
+sub runstep {
+ my ( $self, $conf ) = @_;
+ $self->set_result( $result );
+ return;
+}
+
+1;
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
+
Property changes on: t/configure/testlib/init/eta.pm
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Index: t/configure/testlib/init/zeta.pm
===================================================================
--- t/configure/testlib/init/zeta.pm (revision 21533)
+++ t/configure/testlib/init/zeta.pm (working copy)
@@ -12,8 +12,6 @@
use warnings;
use vars qw($description @args);
-# use vars qw($description @args $step);
-
use base qw(Parrot::Configure::Step::Base);
use Parrot::Configure::Step;
@@ -21,14 +19,13 @@
$description = 'Determining if your computer does zeta';
@args = ();
-my $result = q|Hello world|;
+my $result = q|Goodbye, cruel world|;
+
sub runstep {
my ( $self, $conf ) = @_;
$self->set_result($result);
- return $self;
-
- # $self->result();
+ return;
}
1;
Index: t/configure/036_config_steps.t
===================================================================
--- t/configure/036_config_steps.t (revision 21533)
+++ t/configure/036_config_steps.t (working copy)
@@ -32,11 +32,16 @@
@steps = grep { $_ !~ /win32/i } @steps;
}
-plan tests => scalar @steps;
+my $testcount = @steps + 1;
+# my $testcount = @steps;
+
+plan tests => $testcount;
foreach my $step (@steps) {
require_ok($step);
}
+pass("Completed all tests in $0");
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
Index: t/configure/101-init_manifest.02.t
===================================================================
--- t/configure/101-init_manifest.02.t (revision 21533)
+++ t/configure/101-init_manifest.02.t (working copy)
@@ -62,6 +62,8 @@
}
chdir $cwd or croak "Unable to change back";
}
+untie *STDERR;
+untie *STDOUT;
pass("Completed all tests in $0");
Index: t/configure/028-option_or_data.t
===================================================================
--- t/configure/028-option_or_data.t (revision 21533)
+++ t/configure/028-option_or_data.t (working copy)
@@ -6,11 +6,11 @@
use strict;
use warnings;
-use Test::More tests => 15;
+use Test::More tests => 13;
use Carp;
use lib qw( lib );
-use_ok('config::init::defaults');
-use_ok('config::init::install');
+use config::init::defaults;
+use config::init::install;
use Parrot::Configure;
use Parrot::Configure::Options qw( process_options );
use Parrot::Configure::Test qw( test_step_thru_runstep);
Index: config/inter/shlibs.pm
===================================================================
--- config/inter/shlibs.pm (revision 21533)
+++ config/inter/shlibs.pm (working copy)
@@ -42,7 +42,7 @@
$conf->data->set( cc_shared => $cc_shared );
$self->set_result( ( $cc_shared =~ m/^ ?$/ ) ? 'done' : $cc_shared );
- return $self;
+ return 1;
}
1;
Index: config/inter/types.pm
===================================================================
--- config/inter/types.pm (revision 21533)
+++ config/inter/types.pm (working copy)
@@ -46,7 +46,7 @@
opcode_t => $opcode
);
- return $self;
+ return 1;
}
1;
Index: config/inter/encoding.pm
===================================================================
--- config/inter/encoding.pm (revision 21533)
+++ config/inter/encoding.pm (working copy)
@@ -78,7 +78,7 @@
TEMP_encoding_build => $TEMP_encoding_build,
);
- return $self;
+ return 1;
}
1;
Index: config/inter/lex.pm
===================================================================
--- config/inter/lex.pm (revision 21533)
+++ config/inter/lex.pm (working copy)
@@ -46,7 +46,7 @@
unless ( $conf->options->get('maintainer') ) {
$conf->data->set( $util => 'echo' );
$self->set_result('skipped');
- return $self;
+ return 1;
}
# precedence of sources for the program:
@@ -61,7 +61,7 @@
if ( defined $prog ) {
$conf->data->set( $util => $prog );
$self->set_result('user defined');
- return $self;
+ return 1;
}
else {
$prog = check_progs( [EMAIL PROTECTED], $verbose );
@@ -125,7 +125,7 @@
$conf->data->set( flex_version => $prog_version );
$self->set_result("flex $prog_version");
$conf->data->set( $util => $prog );
- return $self;
+ return 1;
}
else {
$self->set_result('lex program does not exist or does not
understand --version');
Index: config/inter/charset.pm
===================================================================
--- config/inter/charset.pm (revision 21533)
+++ config/inter/charset.pm (working copy)
@@ -78,7 +78,7 @@
TEMP_charset_build => $TEMP_charset_build,
);
- return $self;
+ return 1;
}
1;
Index: config/inter/progs.pm
===================================================================
--- config/inter/progs.pm (revision 21533)
+++ config/inter/progs.pm (working copy)
@@ -126,7 +126,7 @@
test_compiler($cc);
- return $self;
+ return 1;
}
sub test_compiler {
Index: config/inter/make.pm
===================================================================
--- config/inter/make.pm (revision 21533)
+++ config/inter/make.pm (working copy)
@@ -56,7 +56,7 @@
# fall back to default
$self->set_result('no');
- return $self;
+ return 1;
}
}
@@ -72,7 +72,7 @@
# fall back to default
$self->set_result('no');
- return $self;
+ return 1;
}
# if '--version' returns a string assume that this is gmake.
@@ -100,7 +100,7 @@
$conf->data->set( make_c => $make_c );
}
- return $self;
+ return 1;
}
1;
Index: config/inter/libparrot.pm
===================================================================
--- config/inter/libparrot.pm (revision 21533)
+++ config/inter/libparrot.pm (working copy)
@@ -72,7 +72,7 @@
$self->set_result( $parrot_is_shared ? 'yes' : 'no' );
- return $self;
+ return 1;
}
1;
Index: config/inter/pmc.pm
===================================================================
--- config/inter/pmc.pm (revision 21533)
+++ config/inter/pmc.pm (working copy)
@@ -229,7 +229,7 @@
TEMP_pmc_classes_pmc => $TEMP_pmc_classes_pmc,
);
- return $self;
+ return 1;
}
1;
Index: config/inter/yacc.pm
===================================================================
--- config/inter/yacc.pm (revision 21533)
+++ config/inter/yacc.pm (working copy)
@@ -46,7 +46,7 @@
unless ( $conf->options->get('maintainer') ) {
$conf->data->set( $util => 'echo' );
$self->set_result('skipped');
- return $self;
+ return 1;
}
# precedence of sources for the program:
@@ -61,7 +61,7 @@
if ( defined $prog ) {
$conf->data->set( $util => $prog );
$self->set_result('user defined');
- return $self;
+ return 1;
}
else {
@@ -128,7 +128,7 @@
$conf->data->set( bison_version => $prog_version );
$self->set_result("bison $prog_version");
$conf->data->set( $util => $prog );
- return $self;
+ return 1;
}
else {
$self->set_result('yacc program does not exist or does not
understand --version');
Index: config/inter/ops.pm
===================================================================
--- config/inter/ops.pm (revision 21533)
+++ config/inter/ops.pm (working copy)
@@ -62,7 +62,7 @@
$conf->data->set( ops => $ops );
- return $self;
+ return 1;
}
1;
Index: config/init/miniparrot.pm
===================================================================
--- config/init/miniparrot.pm (revision 21533)
+++ config/init/miniparrot.pm (working copy)
@@ -35,7 +35,7 @@
unless ( $conf->options->get('miniparrot') ) {
$self->set_result('skipped');
- return $self;
+ return 1;
}
$conf->data->set(
@@ -80,7 +80,7 @@
$conf->data->set( "i_$_" => 1 );
}
- return $self;
+ return 1;
}
1;
Index: config/init/hints.pm
===================================================================
--- config/init/hints.pm (revision 21533)
+++ config/init/hints.pm (working copy)
@@ -60,7 +60,7 @@
print "]" if $verbose;
- return $self;
+ return 1;
}
1;
Index: config/init/install.pm
===================================================================
--- config/init/install.pm (revision 21533)
+++ config/init/install.pm (working copy)
@@ -130,7 +130,7 @@
doc_dir => $datadir . "/doc/parrot",
);
- return $self;
+ return 1;
}
sub assign_dir {
Index: config/init/manifest.pm
===================================================================
--- config/init/manifest.pm (revision 21533)
+++ config/init/manifest.pm (working copy)
@@ -31,7 +31,7 @@
if ( $conf->options->get('nomanicheck') ) {
$self->set_result('skipped');
- return $self;
+ return 1;
}
my @missing = ExtUtils::Manifest::manicheck();
@@ -48,7 +48,7 @@
return;
}
- return $self;
+ return 1;
}
1;
Index: config/init/defaults.pm
===================================================================
--- config/init/defaults.pm (revision 21533)
+++ config/init/defaults.pm (working copy)
@@ -231,7 +231,7 @@
# remember corrected archname - jit.pm was using $Config('archname')
$conf->data->set( 'archname', $archname );
- return $self;
+ return 1;
}
sub find_perl_headers {
Index: config/init/headers.pm
===================================================================
--- config/init/headers.pm (revision 21533)
+++ config/init/headers.pm (working copy)
@@ -44,7 +44,7 @@
TEMP_nongen_headers => $TEMP_nongen_headers,
);
- return $self;
+ return 1;
}
1;
Index: config/init/optimize.pm
===================================================================
--- config/init/optimize.pm (revision 21533)
+++ config/init/optimize.pm (working copy)
@@ -65,7 +65,7 @@
print "(none requested) " if $conf->options->get('verbose');
}
- return $self;
+ return 1;
}
1;
Index: config/auto/msvc.pm
===================================================================
--- config/auto/msvc.pm (revision 21533)
+++ config/auto/msvc.pm (working copy)
@@ -45,7 +45,7 @@
unless ( defined $msvc{_MSC_VER} ) {
$self->set_result('no');
$conf->data->set( msvcversion => undef );
- return $self;
+ return 1;
}
my $major = int( $msvc{_MSC_VER} / 100 );
@@ -54,7 +54,7 @@
print " (no) " if $verbose;
$self->set_result('no');
$conf->data->set( msvcversion => undef );
- return $self;
+ return 1;
}
my $msvcversion = "$major.$minor";
@@ -75,7 +75,7 @@
$conf->data->add( " ", "ccflags", "-D_CRT_SECURE_NO_DEPRECATE" );
}
- return $self;
+ return 1;
}
1;
Index: config/auto/aio.pm
===================================================================
--- config/auto/aio.pm (revision 21533)
+++ config/auto/aio.pm (working copy)
@@ -64,7 +64,7 @@
$self->set_result('no');
}
- return $self;
+ return 1;
}
1;
Index: config/auto/gdbm.pm
===================================================================
--- config/auto/gdbm.pm (revision 21533)
+++ config/auto/gdbm.pm (working copy)
@@ -35,7 +35,7 @@
if ($without) {
$conf->data->set( has_gdbm => 0 );
$self->set_result('no');
- return $self;
+ return 1;
}
my $cc = $conf->data->get('cc');
@@ -90,7 +90,7 @@
}
$conf->data->set( has_gdbm => $has_gdbm ); # for gdbmhash.t and
dynpmc.in
- return $self;
+ return 1;
}
1;
Index: config/auto/cgoto.pm
===================================================================
--- config/auto/cgoto.pm (revision 21533)
+++ config/auto/cgoto.pm (working copy)
@@ -29,7 +29,7 @@
if ( $conf->options->get('miniparrot') ) {
$self->set_result('skipped');
- return $self;
+ return 1;
}
my ( $cgoto, $verbose ) = $conf->options->get(qw(cgoto verbose));
@@ -84,7 +84,7 @@
$self->set_result('no');
}
- return $self;
+ return 1;
}
1;
Index: config/auto/headers.pm
===================================================================
--- config/auto/headers.pm (revision 21533)
+++ config/auto/headers.pm (working copy)
@@ -31,7 +31,7 @@
if ( $conf->options->get('miniparrot') ) {
$self->set_result('skipped');
- return $self;
+ return 1;
}
# perl5's Configure system doesn't call this by its full name, which may
@@ -96,7 +96,7 @@
$conf->data->set( $flag => $pass ? 'define' : undef );
}
- return $self;
+ return 1;
}
1;
Index: config/auto/inline.pm
===================================================================
--- config/auto/inline.pm (revision 21533)
+++ config/auto/inline.pm (working copy)
@@ -64,7 +64,7 @@
$conf->data->set( inline => $test );
- return $self;
+ return 1;
}
1;
Index: config/auto/backtrace.pm
===================================================================
--- config/auto/backtrace.pm (revision 21533)
+++ config/auto/backtrace.pm (working copy)
@@ -52,7 +52,7 @@
$self->set_result("no");
}
- return $self;
+ return 1;
}
1;
Index: config/auto/funcptr.pm
===================================================================
--- config/auto/funcptr.pm (revision 21533)
+++ config/auto/funcptr.pm (working copy)
@@ -54,7 +54,7 @@
$self->set_result('yes');
}
- return $self;
+ return 1;
}
1;
Index: config/auto/socklen_t.pm
===================================================================
--- config/auto/socklen_t.pm (revision 21533)
+++ config/auto/socklen_t.pm (working copy)
@@ -36,7 +36,7 @@
$self->set_result( $has_socklen_t ? 'yes' : 'no' );
$conf->data->set( has_socklen_t => $has_socklen_t, );
- return $self;
+ return 1;
}
1;
Index: config/auto/python.pm
===================================================================
--- config/auto/python.pm (revision 21533)
+++ config/auto/python.pm (working copy)
@@ -50,7 +50,7 @@
}
$conf->data->set( has_python_2_4 => $has_python_2_4 );
- return $self;
+ return 1;
}
1;
Index: config/auto/jit.pm
===================================================================
--- config/auto/jit.pm (revision 21533)
+++ config/auto/jit.pm (working copy)
@@ -32,7 +32,7 @@
if ( $conf->options->get('miniparrot') ) {
$self->set_result('skipped');
- return $self;
+ return 1;
}
my $verbose = $conf->options->get('verbose');
@@ -232,7 +232,7 @@
);
}
- return $self;
+ return 1;
}
1;
Index: config/auto/cpu.pm
===================================================================
--- config/auto/cpu.pm (revision 21533)
+++ config/auto/cpu.pm (working copy)
@@ -31,7 +31,7 @@
if ( $conf->options->get('miniparrot') ) {
$self->set_result('skipped');
- return $self;
+ return 1;
}
my $verbose = $conf->options->get('verbose');
@@ -50,7 +50,7 @@
print "(no cpu specific hints)" if $verbose;
}
- return $self;
+ return 1;
}
1;
Index: config/auto/perldoc.pm
===================================================================
--- config/auto/perldoc.pm (revision 21533)
+++ config/auto/perldoc.pm (working copy)
@@ -64,7 +64,7 @@
new_perldoc => $version == 2 ? 1 : 0
);
- return $self;
+ return 1;
}
1;
Index: config/auto/format.pm
===================================================================
--- config/auto/format.pm (revision 21533)
+++ config/auto/format.pm (working copy)
@@ -67,7 +67,7 @@
nvsize => $nvsize
);
- return $self;
+ return 1;
}
1;
Index: config/auto/isreg.pm
===================================================================
--- config/auto/isreg.pm (revision 21533)
+++ config/auto/isreg.pm (working copy)
@@ -41,7 +41,7 @@
print( $test ? " (Yep) " : " (no) " ) if $conf->options->get('verbose');
$self->set_result( $test ? 'yes' : 'no' );
- return $self;
+ return 1;
}
1;
Index: config/auto/signal.pm
===================================================================
--- config/auto/signal.pm (revision 21533)
+++ config/auto/signal.pm (working copy)
@@ -38,7 +38,7 @@
);
if ( defined $conf->options->get('miniparrot') ) {
$self->set_result('skipped');
- return $self;
+ return 1;
}
cc_gen('config/auto/signal/test_1.in');
@@ -88,7 +88,7 @@
}
close $O;
- return $self;
+ return 1;
}
1;
Index: config/auto/pack.pm
===================================================================
--- config/auto/pack.pm (revision 21533)
+++ config/auto/pack.pm (working copy)
@@ -100,7 +100,7 @@
AARGH
}
- return $self;
+ return 1;
}
1;
Index: config/auto/m4.pm
===================================================================
--- config/auto/m4.pm (revision 21533)
+++ config/auto/m4.pm (working copy)
@@ -54,7 +54,7 @@
$conf->data->set( has_gnu_m4 => $has_gnu_m4 );
$self->set_result( $has_gnu_m4 ? 'yes' : 'no' );
- return $self;
+ return 1;
}
1;
Index: config/auto/gmp.pm
===================================================================
--- config/auto/gmp.pm (revision 21533)
+++ config/auto/gmp.pm (working copy)
@@ -34,7 +34,7 @@
if ($without) {
$conf->data->set( has_gmp => 0 );
$self->set_result('no');
- return $self;
+ return 1;
}
my $cc = $conf->data->get('cc');
@@ -96,7 +96,7 @@
$self->set_result('no');
}
- return $self;
+ return 1;
}
1;
Index: config/auto/readline.pm
===================================================================
--- config/auto/readline.pm (revision 21533)
+++ config/auto/readline.pm (working copy)
@@ -91,7 +91,7 @@
$self->set_result('no');
}
- return $self;
+ return 1;
}
1;
Index: config/auto/attributes.pm
===================================================================
--- config/auto/attributes.pm (revision 21533)
+++ config/auto/attributes.pm (working copy)
@@ -51,7 +51,7 @@
for my $maybe_attr (@potential_attributes) {
$self->try_attr( $conf, $maybe_attr );
}
- return $self;
+ return 1;
}
sub try_attr {
Index: config/auto/env.pm
===================================================================
--- config/auto/env.pm (revision 21533)
+++ config/auto/env.pm (working copy)
@@ -66,7 +66,7 @@
$self->set_result('no');
}
- return $self;
+ return 1;
}
1;
Index: config/auto/warnings.pm
===================================================================
--- config/auto/warnings.pm (revision 21533)
+++ config/auto/warnings.pm (working copy)
@@ -96,7 +96,7 @@
for my $maybe_warning (@potential_warnings) {
$self->try_warning( $conf, $maybe_warning );
}
- return $self;
+ return 1;
}
=item C<try_warning>
Index: config/auto/gc.pm
===================================================================
--- config/auto/gc.pm (revision 21533)
+++ config/auto/gc.pm (working copy)
@@ -123,7 +123,7 @@
}
print(" ($gc) ") if $conf->options->get('verbose');
- return $self;
+ return 1;
}
1;
Index: config/auto/memalign.pm
===================================================================
--- config/auto/memalign.pm (revision 21533)
+++ config/auto/memalign.pm (working copy)
@@ -33,14 +33,14 @@
if ( $conf->options->get('miniparrot') ) {
$conf->data->set( memalign => '' );
$self->set_result('skipped');
- return $self;
+ return 1;
}
if ( defined $conf->data->get('memalign') ) {
# already set; leave it alone
$self->set_result('already set');
- return $self;
+ return 1;
}
my $test = 0;
@@ -84,7 +84,7 @@
print( $test ? " (Yep:$f) " : " (no) " ) if $verbose;
$self->set_result( $test ? 'yes' : 'no' );
- return $self;
+ return 1;
}
1;
Index: config/auto/va_ptr.pm
===================================================================
--- config/auto/va_ptr.pm (revision 21533)
+++ config/auto/va_ptr.pm (working copy)
@@ -46,7 +46,7 @@
$self->set_result($va_type);
$conf->data->set( va_ptr_type => $va_type );
- return $self;
+ return 1;
}
1;
Index: config/auto/gcc.pm
===================================================================
--- config/auto/gcc.pm (revision 21533)
+++ config/auto/gcc.pm (working copy)
@@ -48,7 +48,7 @@
# which should have been caught by the 'die' above.
unless ( exists $gnuc{__GNUC__} ) {
$conf->data->set( gccversion => undef );
- return $self;
+ return 1;
}
my $major = $gnuc{__GNUC__};
@@ -59,7 +59,7 @@
print " (no) " if $verbose;
$self->set_result('no');
$conf->data->set( gccversion => undef );
- return $self;
+ return 1;
}
if ( $major =~ tr/0-9//c ) {
undef $major; # Don't use it
@@ -379,7 +379,7 @@
gccversion => undef
);
- return $self;
+ return 1;
}
$conf->data->set(
@@ -391,7 +391,7 @@
$conf->data->set( HAS_aligned_funcptr => 0 )
if $^O eq 'hpux';
- return $self;
+ return 1;
}
1;
Index: config/auto/sizes.pm
===================================================================
--- config/auto/sizes.pm (revision 21533)
+++ config/auto/sizes.pm (working copy)
@@ -50,7 +50,7 @@
float8_t => 'double',
);
$self->set_result('using miniparrot defaults');
- return $self;
+ return 1;
}
cc_gen('config/auto/sizes/test_c.in');
@@ -198,7 +198,7 @@
cc_clean();
- return $self;
+ return 1;
}
1;
Index: config/auto/byteorder.pm
===================================================================
--- config/auto/byteorder.pm (revision 21533)
+++ config/auto/byteorder.pm (working copy)
@@ -52,7 +52,7 @@
die "Unsupported byte-order [$byteorder]!";
}
- return $self;
+ return 1;
}
1;
Index: config/auto/alignptrs.pm
===================================================================
--- config/auto/alignptrs.pm (revision 21533)
+++ config/auto/alignptrs.pm (working copy)
@@ -31,7 +31,7 @@
if ( $conf->options->get('miniparrot') ) {
$self->set_result('skipped');
- return $self;
+ return 1;
}
$self->set_result('');
@@ -67,7 +67,7 @@
$self->set_result( $self->result . " $align byte" );
$self->set_result( $self->result . 's' ) unless $align == 1;
- return $self;
+ return 1;
}
1;
Index: config/auto/snprintf.pm
===================================================================
--- config/auto/snprintf.pm (revision 21533)
+++ config/auto/snprintf.pm (working copy)
@@ -44,7 +44,7 @@
}
print " ($res) " if $conf->options->get('verbose');
- return $self;
+ return 1;
}
1;
Index: config/gen/languages.pm
===================================================================
--- config/gen/languages.pm (revision 21533)
+++ config/gen/languages.pm (working copy)
@@ -46,7 +46,7 @@
expand_gmake_syntax => 1,
);
- return $self;
+ return 1;
}
1;
Index: config/gen/parrot_include.pm
===================================================================
--- config/gen/parrot_include.pm (revision 21533)
+++ config/gen/parrot_include.pm (working copy)
@@ -176,7 +176,7 @@
}
$conf->data->set( TEMP_gen_pasm_includes => join( "\t\\\n\t", @generated )
);
- return $self;
+ return 1;
}
1;
Index: config/gen/core_pmcs.pm
===================================================================
--- config/gen/core_pmcs.pm (revision 21533)
+++ config/gen/core_pmcs.pm (working copy)
@@ -30,7 +30,7 @@
$self->generate_c($conf);
$self->generate_pm($conf);
- return $self;
+ return 1;
}
sub generate_h {
Index: config/gen/config_h.pm
===================================================================
--- config/gen/config_h.pm (revision 21533)
+++ config/gen/config_h.pm (working copy)
@@ -139,7 +139,7 @@
move_if_diff( "$hh.tmp", $hh );
- return $self;
+ return 1;
}
1;
Index: config/gen/icu.pm
===================================================================
--- config/gen/icu.pm (revision 21533)
+++ config/gen/icu.pm (working copy)
@@ -98,7 +98,7 @@
icu_dir => '',
);
$self->set_result("no") unless defined $self->result;
- return $self;
+ return 1;
}
my $ok = 1;
@@ -166,7 +166,7 @@
$self->set_result("yes");
- return $self;
+ return 1;
}
1;
Index: config/gen/platform.pm
===================================================================
--- config/gen/platform.pm (revision 21533)
+++ config/gen/platform.pm (working copy)
@@ -280,7 +280,7 @@
copy_if_diff( "config/gen/platform/platform_interface.h",
"include/parrot/platform_interface.h" );
- return $self;
+ return 1;
}
1;
Index: config/gen/cpu.pm
===================================================================
--- config/gen/cpu.pm (revision 21533)
+++ config/gen/cpu.pm (working copy)
@@ -31,7 +31,7 @@
if ( $conf->options->get('miniparrot') ) {
$self->set_result('skipped');
- return $self;
+ return 1;
}
my $verbose = $conf->options->get('verbose');
@@ -48,7 +48,7 @@
print "(no cpu specific hints)" if $verbose;
}
- return $self;
+ return 1;
}
1;
Index: config/gen/PodText.pm
===================================================================
--- config/gen/PodText.pm (revision 21533)
+++ config/gen/PodText.pm (working copy)
@@ -87,7 +87,7 @@
$self->set_result( $count ? 'done' : 'no files to process' );
- return $self;
+ return 1;
}
1;
Index: config/gen/revision.pm
===================================================================
--- config/gen/revision.pm (revision 21533)
+++ config/gen/revision.pm (working copy)
@@ -38,7 +38,7 @@
$self->set_result("done");
}
- return $self;
+ return 1;
}
1;
Index: config/gen/makefiles.pm
===================================================================
--- config/gen/makefiles.pm (revision 21533)
+++ config/gen/makefiles.pm (working copy)
@@ -71,7 +71,7 @@
$self->makefiles($conf);
$self->cflags($conf);
- return $self;
+ return 1;
}
sub cflags {
Index: config/gen/config_pm.pm
===================================================================
--- config/gen/config_pm.pm (revision 21533)
+++ config/gen/config_pm.pm (working copy)
@@ -94,7 +94,7 @@
close $IN or die "Can't close config_lib.in: $!";
close $OUT or die "Can't close config_lib.pasm: $!";
- return $self;
+ return 1;
}
1;