[Bps-public-commit] r12505 - in Prophet/branches/moose: . lib/Prophet/Test

sartak at bestpractical.com sartak at bestpractical.com
Sun May 18 06:12:39 EDT 2008


Author: sartak
Date: Sun May 18 06:12:39 2008
New Revision: 12505

Modified:
   Prophet/branches/moose/   (props changed)
   Prophet/branches/moose/lib/Prophet/App.pm
   Prophet/branches/moose/lib/Prophet/Test/Participant.pm

Log:
 r56284 at onn:  sartak | 2008-05-18 06:12:33 -0400
 Moosify Prophet::Test::Participant


Modified: Prophet/branches/moose/lib/Prophet/App.pm
==============================================================================
--- Prophet/branches/moose/lib/Prophet/App.pm	(original)
+++ Prophet/branches/moose/lib/Prophet/App.pm	Sun May 18 06:12:39 2008
@@ -33,7 +33,7 @@
     isa     => 'Prophet::Config',
     lazy    => 1,
     default => sub {
-        require Prophet::Config;
+        Prophet::Config->require;
         return Prophet::Config->new;
     },
 );

Modified: Prophet/branches/moose/lib/Prophet/Test/Participant.pm
==============================================================================
--- Prophet/branches/moose/lib/Prophet/Test/Participant.pm	(original)
+++ Prophet/branches/moose/lib/Prophet/Test/Participant.pm	Sun May 18 06:12:39 2008
@@ -1,22 +1,19 @@
-use warnings;
-use strict;
-
 package Prophet::Test::Participant;
-use base qw/Class::Accessor/;
-__PACKAGE__->mk_accessors(qw/name arena/);
+use Moose;
 use Prophet::Test;
-use Scalar::Util qw/weaken/;
-
-sub new {
 
-    my $self = shift->SUPER::new(@_);
-    $self->_setup();
-    weaken( $self->{'arena'} );
+has name => (
+    is  => 'rw',
+    isa => 'Str',
+);
+
+has arena => (
+    is       => 'rw',
+    isa      => 'Prophet::Test::Arena',
+    weak_ref => 1,
+);
 
-    return $self;
-}
-
-sub _setup {
+sub BUILD {
     my $self = shift;
     as_user( $self->name, sub { call_func_ok( [qw(search --type Bug --regex .)] ) } );
 
@@ -199,4 +196,7 @@
     return ( $ret, $str, undef );
 }
 
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
 1;



More information about the Bps-public-commit mailing list