aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Reaction/UI/ViewPort/ListView.pm
diff options
context:
space:
mode:
authormatthewt <matthewt@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2008-07-24 01:42:34 +0000
committermatthewt <matthewt@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2008-07-24 01:42:34 +0000
commit8139388160b0a38002b22ff95c3fee3d8380f156 (patch)
treed7610c5db84c2c996107adb36bca1fe8a2b0b7cb /lib/Reaction/UI/ViewPort/ListView.pm
parent2a4c89335368295f0fc55f79d2c8fd5e33afd212 (diff)
downloadreaction-8139388160b0a38002b22ff95c3fee3d8380f156.tar.gz
reaction-8139388160b0a38002b22ff95c3fee3d8380f156.zip
rclass stuff ripped out of everything but widget classes
Diffstat (limited to 'lib/Reaction/UI/ViewPort/ListView.pm')
-rw-r--r--lib/Reaction/UI/ViewPort/ListView.pm42
1 files changed, 22 insertions, 20 deletions
diff --git a/lib/Reaction/UI/ViewPort/ListView.pm b/lib/Reaction/UI/ViewPort/ListView.pm
index 1c2247d..356fc18 100644
--- a/lib/Reaction/UI/ViewPort/ListView.pm
+++ b/lib/Reaction/UI/ViewPort/ListView.pm
@@ -3,27 +3,29 @@ package Reaction::UI::ViewPort::ListView;
use Reaction::Class;
use aliased 'Reaction::UI::ViewPort::Collection::Grid::Member::WithActions';
-class ListView is 'Reaction::UI::ViewPort::Collection::Grid', which {
-
- does 'Reaction::UI::ViewPort::Collection::Role::Order';
- does 'Reaction::UI::ViewPort::Collection::Role::Pager';
- does 'Reaction::UI::ViewPort::Role::Actions';
-
- #If I decide that object actions and collection actions should be
- #lumped together i oculd move these into the collection action role
- #ooor we could create a third role that does this, but gah, no?
- implements _build_member_class => as { WithActions };
-
- #You'se has to goes aways. sorry.
- #if i saved the args as an attribute i could probably get around this....
- implements object_action_count => as {
- my $self = shift;
- for ( @{ $self->members } ) {
- #pickup here, and of to the widget for listview
- return scalar @{ $_->action_prototypes };
- }
- };
+use namespace::clean -except => [ qw(meta) ];
+extends 'Reaction::UI::ViewPort::Collection::Grid';
+with 'Reaction::UI::ViewPort::Collection::Role::Order';
+with 'Reaction::UI::ViewPort::Collection::Role::Pager';
+with 'Reaction::UI::ViewPort::Role::Actions';
+
+#If I decide that object actions and collection actions should be
+#lumped together i oculd move these into the collection action role
+#ooor we could create a third role that does this, but gah, no?
+sub _build_member_class { WithActions };
+
+#You'se has to goes aways. sorry.
+#if i saved the args as an attribute i could probably get around this....
+sub object_action_count {
+ my $self = shift;
+ for ( @{ $self->members } ) {
+ #pickup here, and of to the widget for listview
+ return scalar @{ $_->action_prototypes };
+ }
};
+__PACKAGE__->meta->make_immutable;
+
+
1;