[Jifty-commit] r1581 - in jifty/branches/moose: lib/Jifty
lib/Jifty/Web t
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Fri Jul 14 21:55:38 EDT 2006
Author: audreyt
Date: Fri Jul 14 21:55:36 2006
New Revision: 1581
Modified:
jifty/branches/moose/lib/Jifty/Request.pm
jifty/branches/moose/lib/Jifty/Result.pm
jifty/branches/moose/lib/Jifty/Script/App.pm
jifty/branches/moose/lib/Jifty/Script/Plugin.pm
jifty/branches/moose/lib/Jifty/Script/Po.pm
jifty/branches/moose/lib/Jifty/Web.pm
jifty/branches/moose/lib/Jifty/Web/Form.pm
jifty/branches/moose/lib/Jifty/Web/Menu.pm
jifty/branches/moose/lib/Jifty/Web/PageRegion.pm
jifty/branches/moose/t/03-form-protocol.t
Log:
* Moosification #3 - all but form fields are moosified
Modified: jifty/branches/moose/lib/Jifty/Request.pm
==============================================================================
--- jifty/branches/moose/lib/Jifty/Request.pm (original)
+++ jifty/branches/moose/lib/Jifty/Request.pm Fri Jul 14 21:55:36 2006
@@ -846,8 +846,15 @@
}
package Jifty::Request::Action;
-use base 'Class::Accessor::Fast';
-__PACKAGE__->mk_accessors( qw/moniker arguments class order active modified has_run/);
+use Moose;
+has moniker => qw( is rw isa Str );
+has arguments => qw( is rw isa HashRef );
+has class => qw( is rw isa Str ); # Class, actually
+has order => qw( is rw isa Int );
+has active => qw( is rw isa Bool );
+has modified => qw( is rw isa Bool );
+has has_run => qw( is rw isa Bool );
+no Moose;
=head2 Jifty::Request::Action
@@ -891,8 +898,10 @@
package Jifty::Request::StateVariable;
-use base 'Class::Accessor::Fast';
-__PACKAGE__->mk_accessors (qw/key value/);
+use Moose;
+has key => qw( is rw isa Str );
+has value => qw( is rw isa Str );
+no Moose;
=head2 Jifty::Request::StateVariable
Modified: jifty/branches/moose/lib/Jifty/Result.pm
==============================================================================
--- jifty/branches/moose/lib/Jifty/Result.pm (original)
+++ jifty/branches/moose/lib/Jifty/Result.pm Fri Jul 14 21:55:36 2006
@@ -17,9 +17,14 @@
use Jifty::Everything;
-use base qw/Jifty::Object Class::Accessor::Fast/;
+use base qw/Jifty::Object/;
-__PACKAGE__->mk_accessors(qw(failure action_class message _content));
+use Moose;
+has failure => qw( is rw isa Bool );
+has action_class => qw( is rw isa Str ); # Class
+has message => qw( is rw isa Str );
+has _content => qw( is rw isa HashRef );
+no Moose;
=head2 new
Modified: jifty/branches/moose/lib/Jifty/Script/App.pm
==============================================================================
--- jifty/branches/moose/lib/Jifty/Script/App.pm (original)
+++ jifty/branches/moose/lib/Jifty/Script/App.pm Fri Jul 14 21:55:36 2006
@@ -2,14 +2,18 @@
use strict;
package Jifty::Script::App;
-use base qw'App::CLI::Command Class::Accessor::Fast';
+use base qw/App::CLI::Command/;
use File::Copy;
use Jifty::Config;
use Jifty::YAML;
use File::Basename;
-__PACKAGE__->mk_accessors(qw/prefix dist_name mod_name/);
+use Moose;
+has prefix => qw( is rw isa Str );
+has dist_name => qw( is rw isa Str );
+has mod_name => qw( is rw isa Str );
+no Moose;
=head1 NAME
Modified: jifty/branches/moose/lib/Jifty/Script/Plugin.pm
==============================================================================
--- jifty/branches/moose/lib/Jifty/Script/Plugin.pm (original)
+++ jifty/branches/moose/lib/Jifty/Script/Plugin.pm Fri Jul 14 21:55:36 2006
@@ -2,14 +2,19 @@
use strict;
package Jifty::Script::Plugin;
-use base qw'App::CLI::Command Class::Accessor::Fast';
+use base qw/App::CLI::Command/;
use File::Copy;
use Jifty::Config;
use Jifty::YAML;
use File::Basename;
-__PACKAGE__->mk_accessors(qw/prefix dist_name mod_name lib_dir/);
+use Moose;
+has prefix => qw( is rw isa Str );
+has dist_name => qw( is rw isa Str );
+has mod_name => qw( is rw isa Str );
+has lib_dir => qw( is rw isa Str );
+no Moose;
=head1 NAME
Modified: jifty/branches/moose/lib/Jifty/Script/Po.pm
==============================================================================
--- jifty/branches/moose/lib/Jifty/Script/Po.pm (original)
+++ jifty/branches/moose/lib/Jifty/Script/Po.pm Fri Jul 14 21:55:36 2006
@@ -2,7 +2,7 @@
use strict;
package Jifty::Script::Po;
-use base qw'App::CLI::Command Class::Accessor::Fast';
+use base qw/App::CLI::Command/;
use File::Copy;
use Jifty::Config;
@@ -14,7 +14,9 @@
our $LMExtract = Locale::Maketext::Extract->new;
use constant USE_GETTEXT_STYLE => 1;
-__PACKAGE__->mk_accessors(qw/language/);
+use Moose;
+has language => qw( is rw isa Str );
+no Moosep;
=head1 NAME
Modified: jifty/branches/moose/lib/Jifty/Web.pm
==============================================================================
--- jifty/branches/moose/lib/Jifty/Web.pm (original)
+++ jifty/branches/moose/lib/Jifty/Web.pm Fri Jul 14 21:55:36 2006
@@ -19,10 +19,14 @@
use base qw/Class::Accessor::Fast Class::Data::Inheritable Jifty::Object/;
use vars qw/$SERIAL @JS_INCLUDES/;
-
-__PACKAGE__->mk_accessors(
- qw(next_page request response session temporary_current_user _current_user)
-);
+use Moose;
+has next_page => qw( is rw isa Str );
+has request => qw( is rw isa Jifty::Request );
+has response => qw( is rw isa Jifty::Response );
+has session => qw( is rw isa Jifty::Web::Session );
+has temporary_current_user => qw( is rw isa Object );
+has _current_user => qw( is rw isa Object );
+no Moose;
__PACKAGE__->mk_classdata($_)
for qw(cached_css cached_css_digest
Modified: jifty/branches/moose/lib/Jifty/Web/Form.pm
==============================================================================
--- jifty/branches/moose/lib/Jifty/Web/Form.pm (original)
+++ jifty/branches/moose/lib/Jifty/Web/Form.pm Fri Jul 14 21:55:36 2006
@@ -5,7 +5,13 @@
use base qw/Jifty::Object Class::Accessor::Fast/;
-__PACKAGE__->mk_accessors(qw(actions printed_actions name call is_open));
+use Moose;
+has actions => qw( is rw isa Any );
+has printed_actions => qw( is rw isa Any );
+has name => qw( is rw isa Str );
+has call => qw( is rw isa Str );
+has is_open => qw( is rw isa Bool );
+no Moose;
=head2 new ARGS
Modified: jifty/branches/moose/lib/Jifty/Web/Menu.pm
==============================================================================
--- jifty/branches/moose/lib/Jifty/Web/Menu.pm (original)
+++ jifty/branches/moose/lib/Jifty/Web/Menu.pm Fri Jul 14 21:55:36 2006
@@ -1,9 +1,14 @@
package Jifty::Web::Menu;
-use base qw/Class::Accessor::Fast/;
use URI;
-__PACKAGE__->mk_accessors(qw(label parent sort_order link escape_label class));
+use Moose;
+has label => qw( is rw isa Str );
+has parent => qw( is rw isa Jifty::Web::Menu );
+has sort_order => qw( is rw isa Int );
+has link => qw( is rw isa Jifty::Web::Link );
+has escape_label => qw( is rw isa Bool );
+no Moose;
=head2 new PARAMHASH
Modified: jifty/branches/moose/lib/Jifty/Web/PageRegion.pm
==============================================================================
--- jifty/branches/moose/lib/Jifty/Web/PageRegion.pm (original)
+++ jifty/branches/moose/lib/Jifty/Web/PageRegion.pm Fri Jul 14 21:55:36 2006
@@ -14,9 +14,15 @@
=cut
-use base qw/Jifty::Object Class::Accessor::Fast/;
-__PACKAGE__->mk_accessors(qw(name default_path default_arguments qualified_name parent region_wrapper));
-use Jifty::JSON;
+use base qw/Jifty::Object/;
+use Moose;
+has name => qw( is rw isa Str );
+has default_path => qw( is rw isa Str );
+has default_arguments => qw( is rw isa HashRef );
+has qualified_name => qw( is rw isa Str );
+has parent => qw( is rw isa Jifty::Web::PageRegion );
+has region_wrapper => qw( is rw isa Bool ); # XXX - bad name
+no Moose;
=head2 new PARAMHASH
Modified: jifty/branches/moose/t/03-form-protocol.t
==============================================================================
--- jifty/branches/moose/t/03-form-protocol.t (original)
+++ jifty/branches/moose/t/03-form-protocol.t Fri Jul 14 21:55:36 2006
@@ -18,6 +18,8 @@
class: DoSomething
active: 1
has_run: 0
+ order: ~
+ modified: ~
arguments:
id: 23
something: else
@@ -45,6 +47,8 @@
class: DoSomething
active: 1
has_run: 0
+ order: ~
+ modified: ~
arguments:
id: 23
something: else
@@ -53,6 +57,8 @@
class: DoSomething
active: 1
has_run: 0
+ order: ~
+ modified: ~
arguments:
id: 42
something: bla
@@ -83,6 +89,8 @@
class: DoSomething
active: 1
has_run: 0
+ order: ~
+ modified: ~
arguments:
id: 23
something: else
@@ -91,6 +99,8 @@
class: DoThat
active: 1
has_run: 0
+ order: ~
+ modified: ~
arguments:
id: 42
something: bla
@@ -120,6 +130,8 @@
class: DoSomething
active: 1
has_run: 0
+ order: ~
+ modified: ~
arguments:
id: 23
something: else
@@ -149,6 +161,8 @@
class: DoSomething
active: 0
has_run: 0
+ order: ~
+ modified: ~
arguments:
id: 23
something: else
@@ -157,6 +171,8 @@
class: DoThat
active: 1
has_run: 0
+ order: ~
+ modified: ~
arguments:
id: 42
something: bla
@@ -186,6 +202,8 @@
class: DoSomething
active: 1
has_run: 0
+ order: ~
+ modified: ~
arguments:
id: 23
something: else
@@ -194,6 +212,8 @@
class: DoThat
active: 1
has_run: 0
+ order: ~
+ modified: ~
arguments:
id: 42
something: bla
@@ -226,6 +246,8 @@
class: DoSomething
active: 1
has_run: 0
+ order: ~
+ modified: ~
arguments:
id: 23
something: else
@@ -234,6 +256,8 @@
class: DoThat
active: 1
has_run: 0
+ order: ~
+ modified: ~
arguments:
id: 42
something: bla
@@ -266,6 +290,8 @@
class: DoSomething
active: 1
has_run: 0
+ order: ~
+ modified: ~
arguments:
id: 23
something: else
@@ -274,6 +300,8 @@
class: DoThat
active: 1
has_run: 0
+ order: ~
+ modified: ~
arguments:
id: 42
something: bla
@@ -301,6 +329,8 @@
class: DoSomething
active: 1
has_run: 0
+ order: ~
+ modified: ~
arguments:
id: 23
something: else
@@ -327,6 +357,8 @@
class: DoSomething
active: 1
has_run: 0
+ order: ~
+ modified: ~
arguments:
id: 23
something: else
@@ -352,6 +384,8 @@
class: DoSomething
active: 1
has_run: 0
+ order: ~
+ modified: ~
arguments:
id: 96
something: else
@@ -380,6 +414,8 @@
class: DoSomething
active: 1
has_run: 0
+ order: ~
+ modified: ~
arguments:
id: 23
something: else
@@ -388,6 +424,8 @@
class: DoThat
active: 1
has_run: 0
+ order: ~
+ modified: ~
arguments:
id: 42
something: feepy
@@ -420,6 +458,8 @@
class: DoSomething
active: 1
has_run: 0
+ order: ~
+ modified: ~
arguments:
id: 23
something: else
@@ -428,6 +468,8 @@
class: DoSomething
active: 1
has_run: 0
+ order: ~
+ modified: ~
arguments:
id: 42
something: bla
More information about the Jifty-commit
mailing list