Author: jhoblitt
Date: Sat Feb 18 19:22:51 2006
New Revision: 11662

Modified:
   trunk/config/auto/aio.pm
   trunk/config/auto/alignptrs.pm
   trunk/config/auto/bc.pm
   trunk/config/auto/byteorder.pm
   trunk/config/auto/cgoto.pm
   trunk/config/auto/env.pm
   trunk/config/auto/format.pm
   trunk/config/auto/funcptr.pm
   trunk/config/auto/gc.pm
   trunk/config/auto/gcc.pm
   trunk/config/auto/gdbm.pm
   trunk/config/auto/gmp.pm
   trunk/config/auto/headers.pm
   trunk/config/auto/inline.pm
   trunk/config/auto/isreg.pm
   trunk/config/auto/jit.pm
   trunk/config/auto/m4.pm
   trunk/config/auto/memalign.pm
   trunk/config/auto/msvc.pm
   trunk/config/auto/pack.pm
   trunk/config/auto/perldoc.pm
   trunk/config/auto/python.pm
   trunk/config/auto/readline.pm
   trunk/config/auto/signal.pm
   trunk/config/auto/sizes.pm
   trunk/config/auto/snprintf.pm
   trunk/config/auto/va_ptr.pm
   trunk/config/gen/config_h.pm
   trunk/config/gen/config_pm.pm
   trunk/config/gen/core_pmcs.pm
   trunk/config/gen/cpu.pm
   trunk/config/gen/icu.pm
   trunk/config/gen/makefiles.pm
   trunk/config/gen/parrot_include.pm
   trunk/config/gen/platform.pm
   trunk/config/init/defaults.pm
   trunk/config/init/headers.pm
   trunk/config/init/hints.pm
   trunk/config/init/manifest.pm
   trunk/config/init/miniparrot.pm
   trunk/config/init/optimize.pm
   trunk/config/inter/charset.pm
   trunk/config/inter/encoding.pm
   trunk/config/inter/exp.pm
   trunk/config/inter/lex.pm
   trunk/config/inter/libparrot.pm
   trunk/config/inter/make.pm
   trunk/config/inter/ops.pm
   trunk/config/inter/pmc.pm
   trunk/config/inter/progs.pm
   trunk/config/inter/shlibs.pm
   trunk/config/inter/types.pm
   trunk/config/inter/yacc.pm
   trunk/lib/Parrot/Configure.pm
   trunk/lib/Parrot/Configure/Step/Base.pm
   trunk/t/configure/base.t
   trunk/t/configure/configure.t
Log:
remove $result as a package variable from config/*.pm
change Parrot::Configure::Step::Base->result() to an object method
change Parrot::Configure::Step::Base->set_result() to an object method
change Parrot::Configure::Step::Base->description() to also work as object 
method (that still returns class data)
change Parrot::Configure::Step::Base->args() to also work as object method 
(that still returns class data)
change Parrot::Configure->runsteps() to call ->description() as an object method
change Parrot::Configure->runsteps() to report step errors with the name of the 
step

Modified: trunk/config/auto/aio.pm
==============================================================================
--- trunk/config/auto/aio.pm    (original)
+++ trunk/config/auto/aio.pm    Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Determines whether the platform supports
 package auto::aio;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/alignptrs.pm
==============================================================================
--- trunk/config/auto/alignptrs.pm      (original)
+++ trunk/config/auto/alignptrs.pm      Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Determine the minimum pointer alignment.
 package auto::alignptrs;
 
 use strict;
-use vars qw($description $result $result @args);
+use vars qw($description $result @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/bc.pm
==============================================================================
--- trunk/config/auto/bc.pm     (original)
+++ trunk/config/auto/bc.pm     Sat Feb 18 19:22:51 2006
@@ -16,7 +16,7 @@ bc.
 package auto::bc;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/byteorder.pm
==============================================================================
--- trunk/config/auto/byteorder.pm      (original)
+++ trunk/config/auto/byteorder.pm      Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Computes the native byteorder for Parrot
 package auto::byteorder;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use Parrot::Configure::Step qw(:auto);
 use base qw(Parrot::Configure::Step::Base);

Modified: trunk/config/auto/cgoto.pm
==============================================================================
--- trunk/config/auto/cgoto.pm  (original)
+++ trunk/config/auto/cgoto.pm  Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Determines whether the compiler supports
 package auto::cgoto;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/env.pm
==============================================================================
--- trunk/config/auto/env.pm    (original)
+++ trunk/config/auto/env.pm    Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Determining if the C library has C<seten
 package auto::env;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/format.pm
==============================================================================
--- trunk/config/auto/format.pm (original)
+++ trunk/config/auto/format.pm Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Figures out what formats should be used 
 package auto::format;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/funcptr.pm
==============================================================================
--- trunk/config/auto/funcptr.pm        (original)
+++ trunk/config/auto/funcptr.pm        Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Verifies that the compiler supports func
 package auto::funcptr;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/gc.pm
==============================================================================
--- trunk/config/auto/gc.pm     (original)
+++ trunk/config/auto/gc.pm     Sat Feb 18 19:22:51 2006
@@ -37,7 +37,7 @@ Use the malloc in F<src/res_lea.c> with 
 package auto::gc;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/gcc.pm
==============================================================================
--- trunk/config/auto/gcc.pm    (original)
+++ trunk/config/auto/gcc.pm    Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Determines whether the C compiler is act
 package auto::gcc;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/gdbm.pm
==============================================================================
--- trunk/config/auto/gdbm.pm   (original)
+++ trunk/config/auto/gdbm.pm   Sat Feb 18 19:22:51 2006
@@ -15,7 +15,7 @@ GDBMHash PMC.
 package auto::gdbm;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/gmp.pm
==============================================================================
--- trunk/config/auto/gmp.pm    (original)
+++ trunk/config/auto/gmp.pm    Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Determines whether the platform supports
 package auto::gmp;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/headers.pm
==============================================================================
--- trunk/config/auto/headers.pm        (original)
+++ trunk/config/auto/headers.pm        Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Probes for various C headers.
 package auto::headers;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/inline.pm
==============================================================================
--- trunk/config/auto/inline.pm (original)
+++ trunk/config/auto/inline.pm Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Determines whether the compiler supports
 package auto::inline;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/isreg.pm
==============================================================================
--- trunk/config/auto/isreg.pm  (original)
+++ trunk/config/auto/isreg.pm  Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Determines if the C library has a workin
 package auto::isreg;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/jit.pm
==============================================================================
--- trunk/config/auto/jit.pm    (original)
+++ trunk/config/auto/jit.pm    Sat Feb 18 19:22:51 2006
@@ -15,7 +15,7 @@ capability available.
 package auto::jit;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/m4.pm
==============================================================================
--- trunk/config/auto/m4.pm     (original)
+++ trunk/config/auto/m4.pm     Sat Feb 18 19:22:51 2006
@@ -15,7 +15,7 @@ Currently GNU m4 is only used for double
 package auto::m4;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/memalign.pm
==============================================================================
--- trunk/config/auto/memalign.pm       (original)
+++ trunk/config/auto/memalign.pm       Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Determines if the C library supports C<m
 package auto::memalign;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/msvc.pm
==============================================================================
--- trunk/config/auto/msvc.pm   (original)
+++ trunk/config/auto/msvc.pm   Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Determines whether the C compiler is act
 package auto::msvc;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/pack.pm
==============================================================================
--- trunk/config/auto/pack.pm   (original)
+++ trunk/config/auto/pack.pm   Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Figures out how to C<pack()> Parrot's ty
 package auto::pack;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/perldoc.pm
==============================================================================
--- trunk/config/auto/perldoc.pm        (original)
+++ trunk/config/auto/perldoc.pm        Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Determines whether perldoc exists on the
 package auto::perldoc;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/python.pm
==============================================================================
--- trunk/config/auto/python.pm (original)
+++ trunk/config/auto/python.pm Sat Feb 18 19:22:51 2006
@@ -18,7 +18,7 @@ Store version of Python.
 package auto::python;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/readline.pm
==============================================================================
--- trunk/config/auto/readline.pm       (original)
+++ trunk/config/auto/readline.pm       Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Determines whether the platform supports
 package auto::readline;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/signal.pm
==============================================================================
--- trunk/config/auto/signal.pm (original)
+++ trunk/config/auto/signal.pm Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Determines some signal stuff.
 package auto::signal;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/sizes.pm
==============================================================================
--- trunk/config/auto/sizes.pm  (original)
+++ trunk/config/auto/sizes.pm  Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Determines the sizes of various types.
 package auto::sizes;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/snprintf.pm
==============================================================================
--- trunk/config/auto/snprintf.pm       (original)
+++ trunk/config/auto/snprintf.pm       Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Tests if snprintf is present and if it's
 package auto::snprintf;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/auto/va_ptr.pm
==============================================================================
--- trunk/config/auto/va_ptr.pm (original)
+++ trunk/config/auto/va_ptr.pm Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Tests which kind of PARROT_VA_TO_VAPTR t
 package auto::va_ptr;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/gen/config_h.pm
==============================================================================
--- trunk/config/gen/config_h.pm        (original)
+++ trunk/config/gen/config_h.pm        Sat Feb 18 19:22:51 2006
@@ -17,7 +17,7 @@ features.
 package gen::config_h;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/gen/config_pm.pm
==============================================================================
--- trunk/config/gen/config_pm.pm       (original)
+++ trunk/config/gen/config_pm.pm       Sat Feb 18 19:22:51 2006
@@ -16,7 +16,7 @@ file.
 package gen::config_pm;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/gen/core_pmcs.pm
==============================================================================
--- trunk/config/gen/core_pmcs.pm       (original)
+++ trunk/config/gen/core_pmcs.pm       Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Generates the core PMC list F<include/pa
 package gen::core_pmcs;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/gen/cpu.pm
==============================================================================
--- trunk/config/gen/cpu.pm     (original)
+++ trunk/config/gen/cpu.pm     Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Runs C<&run_cpu()> in F<config/gen/cpu/$
 package gen::cpu;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/gen/icu.pm
==============================================================================
--- trunk/config/gen/icu.pm     (original)
+++ trunk/config/gen/icu.pm     Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Configures ICU and add appropriate targe
 package gen::icu;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/gen/makefiles.pm
==============================================================================
--- trunk/config/gen/makefiles.pm       (original)
+++ trunk/config/gen/makefiles.pm       Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Generates the various F<Makefile>s and o
 package gen::makefiles;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/gen/parrot_include.pm
==============================================================================
--- trunk/config/gen/parrot_include.pm  (original)
+++ trunk/config/gen/parrot_include.pm  Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Generates the F<runtime/parrot/include> 
 package gen::parrot_include;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/gen/platform.pm
==============================================================================
--- trunk/config/gen/platform.pm        (original)
+++ trunk/config/gen/platform.pm        Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Moves the various platform-specific file
 package gen::platform;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/init/defaults.pm
==============================================================================
--- trunk/config/init/defaults.pm       (original)
+++ trunk/config/init/defaults.pm       Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Sets up the configuration system's defau
 package init::defaults;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/init/headers.pm
==============================================================================
--- trunk/config/init/headers.pm        (original)
+++ trunk/config/init/headers.pm        Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Uses C<ExtUtils::Manifest> to determine 
 package init::headers;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/init/hints.pm
==============================================================================
--- trunk/config/init/hints.pm  (original)
+++ trunk/config/init/hints.pm  Sat Feb 18 19:22:51 2006
@@ -15,7 +15,7 @@ F<config/init/default.pm>.
 package init::hints;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/init/manifest.pm
==============================================================================
--- trunk/config/init/manifest.pm       (original)
+++ trunk/config/init/manifest.pm       Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Uses C<ExtUtils::Manifest> to check that
 package init::manifest;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/init/miniparrot.pm
==============================================================================
--- trunk/config/init/miniparrot.pm     (original)
+++ trunk/config/init/miniparrot.pm     Sat Feb 18 19:22:51 2006
@@ -19,7 +19,7 @@ from using  Configure at all for minipar
 package init::miniparrot;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/init/optimize.pm
==============================================================================
--- trunk/config/init/optimize.pm       (original)
+++ trunk/config/init/optimize.pm       Sat Feb 18 19:22:51 2006
@@ -15,7 +15,7 @@ the C<CCFLAGS>. Should this be part of c
 package init::optimize;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/inter/charset.pm
==============================================================================
--- trunk/config/inter/charset.pm       (original)
+++ trunk/config/inter/charset.pm       Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Asks the user to select which charset fi
 package inter::charset;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/inter/encoding.pm
==============================================================================
--- trunk/config/inter/encoding.pm      (original)
+++ trunk/config/inter/encoding.pm      Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Asks the user to select which encoding f
 package inter::encoding;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/inter/exp.pm
==============================================================================
--- trunk/config/inter/exp.pm   (original)
+++ trunk/config/inter/exp.pm   Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Asks the user whether to set up experime
 package inter::exp;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/inter/lex.pm
==============================================================================
--- trunk/config/inter/lex.pm   (original)
+++ trunk/config/inter/lex.pm   Sat Feb 18 19:22:51 2006
@@ -15,7 +15,7 @@ package inter::lex;
 
 use strict;
 
-use vars qw( $description $result @args $prompt $util );
+use vars qw( $description @args $prompt $util );
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/inter/libparrot.pm
==============================================================================
--- trunk/config/inter/libparrot.pm     (original)
+++ trunk/config/inter/libparrot.pm     Sat Feb 18 19:22:51 2006
@@ -15,7 +15,7 @@ step determines whether it should be bui
 package inter::libparrot;

 

 use strict;

-use vars qw($description $result @args);

+use vars qw($description @args);

 

 use base qw(Parrot::Configure::Step::Base);

 


Modified: trunk/config/inter/make.pm
==============================================================================
--- trunk/config/inter/make.pm  (original)
+++ trunk/config/inter/make.pm  Sat Feb 18 19:22:51 2006
@@ -15,7 +15,7 @@ package inter::make;
 
 use strict;
 
-use vars qw( $description $result @args $prompt $util );
+use vars qw( $description @args $prompt $util );
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/inter/ops.pm
==============================================================================
--- trunk/config/inter/ops.pm   (original)
+++ trunk/config/inter/ops.pm   Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Asks the user to select which ops files 
 package inter::ops;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/inter/pmc.pm
==============================================================================
--- trunk/config/inter/pmc.pm   (original)
+++ trunk/config/inter/pmc.pm   Sat Feb 18 19:22:51 2006
@@ -14,7 +14,7 @@ Asks the user to select which PMC files 
 package inter::pmc;
 
 use strict;
-use vars qw($description $result @args %PMC_PARENTS);
+use vars qw($description @args %PMC_PARENTS);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/inter/progs.pm
==============================================================================
--- trunk/config/inter/progs.pm (original)
+++ trunk/config/inter/progs.pm Sat Feb 18 19:22:51 2006
@@ -16,7 +16,7 @@ should be enabled.
 package inter::progs;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/inter/shlibs.pm
==============================================================================
--- trunk/config/inter/shlibs.pm        (original)
+++ trunk/config/inter/shlibs.pm        Sat Feb 18 19:22:51 2006
@@ -19,7 +19,7 @@ on which compiler is in use.  Thus it sh
 package inter::shlibs;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/inter/types.pm
==============================================================================
--- trunk/config/inter/types.pm (original)
+++ trunk/config/inter/types.pm Sat Feb 18 19:22:51 2006
@@ -15,7 +15,7 @@ be.
 package inter::types;
 
 use strict;
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/config/inter/yacc.pm
==============================================================================
--- trunk/config/inter/yacc.pm  (original)
+++ trunk/config/inter/yacc.pm  Sat Feb 18 19:22:51 2006
@@ -15,7 +15,7 @@ package inter::yacc;
 
 use strict;
 
-use vars qw( $description $result @args $prompt $util );
+use vars qw( $description @args $prompt $util );
 
 use base qw(Parrot::Configure::Step::Base);
 

Modified: trunk/lib/Parrot/Configure.pm
==============================================================================
--- trunk/lib/Parrot/Configure.pm       (original)
+++ trunk/lib/Parrot/Configure.pm       Sat Feb 18 19:22:51 2006
@@ -208,7 +208,7 @@ sub runsteps
 
         # XXX This works. but is propably not a good design.
         # Using $step->description() would be nicer   
-        my $description = $step_name->description();
+        my $description = $step->description();
         $description = "" unless defined $description;
 
         # set per step verbosity
@@ -240,7 +240,7 @@ sub runsteps
             }
         };
         if ($@) {
-            carp "\nstep $step died during execution: [EMAIL PROTECTED]";
+            carp "\nstep $step_name died during execution: [EMAIL PROTECTED]";
             return;
         }
 
@@ -249,7 +249,7 @@ sub runsteps
         # if not, report the result and return
         if ($@) {
             my $result = $step->result || 'no result returned';
-            carp "\nstep $step failed: " . $result;
+            carp "\nstep $step_name failed: " . $result;
             return;
         }
 

Modified: trunk/lib/Parrot/Configure/Step/Base.pm
==============================================================================
--- trunk/lib/Parrot/Configure/Step/Base.pm     (original)
+++ trunk/lib/Parrot/Configure/Step/Base.pm     Sat Feb 18 19:22:51 2006
@@ -52,26 +52,10 @@ sub new
 
 =back
 
-=head3 Class Methods
+=head3 Object Methods
 
 =over 4
 
-=item * C<description()>
-
-Accepts no arguments and returns the value of C<$description> from the
-inheriting classes namespace.
-
-=cut
-
-sub description
-{
-    my $class = shift;
-    {
-        no strict 'refs';
-        ${$class . "::description"}
-    }
-}
-
 =item * C<result()>
 
 Accepts no arguments and returns the value of C<$result> from the inheriting
@@ -81,11 +65,9 @@ classes namespace.
 
 sub result
 {
-    my $class = shift;
-    {
-        no strict 'refs';
-        ${$class . "::result"}
-    }
+    my $self = shift;
+
+    return $self->{result};
 }
 
 =item * C<set_result()>
@@ -97,13 +79,36 @@ variable.  Returns the inheriting classe
 
 sub set_result
 {
-    my ($class, $result) = @_;
+    my ($self, $result) = @_;
+
+    $self->{result} = $result;
+
+    return $self;
+}
+
+=back
+
+=head3 Class Methods
+
+=over 4
+
+=item * C<description()>
+
+Accepts no arguments and returns the value of C<$description> from the
+inheriting classes namespace.
+
+This method also works as an object method.
+
+=cut
+
+sub description
+{
+    my $class = shift;
+    $class = ref $class || $class;
     {
         no strict 'refs';
-        ${$class . "::result"} = $result;
+        return ${$class . "::description"};
     }
-
-    return $class;
 }
 
 =item * C<args()>
@@ -111,14 +116,17 @@ sub set_result
 Accepts no arguments and returns the value of C<@args> from the inheriting
 classes namespace.
 
+This method also works as an object method.
+
 =cut
 
 sub args
 {
     my $class = shift;
+    $class = ref $class || $class;
     {
         no strict 'refs';
-        @{$class . "::args"}
+        return @{$class . "::args"};
     }
 }
 

Modified: trunk/t/configure/base.t
==============================================================================
--- trunk/t/configure/base.t    (original)
+++ trunk/t/configure/base.t    Sat Feb 18 19:22:51 2006
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 
 use lib qw( . lib ../lib ../../lib );
-use Test::More tests => 7;
+use Test::More tests => 10;
 
 =head1 NAME
 
@@ -29,21 +29,39 @@ package Test::Parrot::Configure::Step::B
 
 use base qw(Parrot::Configure::Step::Base);
 
-use vars qw($description $result @args);
+use vars qw($description @args);
 
 $description    = "foo";
-$result         = "bar";
 @args           = qw(foo bar baz);
 
 package main;
 
 my $testpkg = 'Test::Parrot::Configure::Step::Base';
 
-can_ok($testpkg, qw(description result set_result args));
+can_ok($testpkg, qw(new description args result set_result));
 
+# class methods
 is($testpkg->description, 'foo', "->description() returns the proper value");
-is($testpkg->result, 'bar', "->result() returns the proper value");
-is($testpkg->set_result('baz'), $testpkg, "->set_result() returns the class");
-is($testpkg->result, 'baz', "->set_result() changed the result value");
 is_deeply([$testpkg->args], [qw(foo bar baz)],
     "->args() returns the proper value");
+
+# object methods
+
+isa_ok($testpkg->new, $testpkg);
+
+# ->description() & ->args() work as object methods too
+{
+    my $teststep = $testpkg->new;
+
+    is($teststep->description, 'foo', "->description() returns the proper 
value");
+    is_deeply([$teststep->args], [qw(foo bar baz)],
+        "->args() returns the proper value");
+}
+
+{
+    my $teststep = $testpkg->new;
+
+    is($teststep->result('baz'), undef, "->set_result() returns the class");
+    isa_ok($teststep->set_result('baz'), $testpkg);
+    is($teststep->result, 'baz', "->set_result() changed the result value");
+}

Modified: trunk/t/configure/configure.t
==============================================================================
--- trunk/t/configure/configure.t       (original)
+++ trunk/t/configure/configure.t       Sat Feb 18 19:22:51 2006
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 
 use lib qw( . lib ../lib ../../lib );
-use Test::More tests => 31;
+use Test::More tests => 32;
 
 =head1 NAME
 

Reply via email to