aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Reaction/UI/ViewPort/Role
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/Role
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/Role')
-rw-r--r--lib/Reaction/UI/ViewPort/Role/Actions.pm48
1 files changed, 24 insertions, 24 deletions
diff --git a/lib/Reaction/UI/ViewPort/Role/Actions.pm b/lib/Reaction/UI/ViewPort/Role/Actions.pm
index f11b7a2..7da0072 100644
--- a/lib/Reaction/UI/ViewPort/Role/Actions.pm
+++ b/lib/Reaction/UI/ViewPort/Role/Actions.pm
@@ -3,32 +3,32 @@ package Reaction::UI::ViewPort::Role::Actions;
use Reaction::Role;
use Reaction::UI::ViewPort::Action::Link;
-role Actions, which {
-
- has actions => (is => 'ro', isa => 'ArrayRef', lazy_build => 1);
- has action_prototypes => (is => 'ro', isa => 'ArrayRef', lazy_build => 1);
- implements _build_action_prototypes => as { [] };
-
- implements _build_actions => as {
- my ($self) = @_;
- my (@act, $i);
- my $ctx = $self->ctx;
- my $loc = $self->location;
- foreach my $proto (@{ $self->action_prototypes }) {
- my $action = Reaction::UI::ViewPort::Action::Link->new
- (
- ctx => $ctx,
- target => $self->model,
- location => join ('-', $loc, 'action', $i++),
- %$proto,
- );
- push(@act, $action);
- }
- return \@act;
- };
-
+use namespace::clean -except => [ qw(meta) ];
+
+
+has actions => (is => 'ro', isa => 'ArrayRef', lazy_build => 1);
+has action_prototypes => (is => 'ro', isa => 'ArrayRef', lazy_build => 1);
+sub _build_action_prototypes { [] };
+sub _build_actions {
+ my ($self) = @_;
+ my (@act, $i);
+ my $ctx = $self->ctx;
+ my $loc = $self->location;
+ foreach my $proto (@{ $self->action_prototypes }) {
+ my $action = Reaction::UI::ViewPort::Action::Link->new
+ (
+ ctx => $ctx,
+ target => $self->model,
+ location => join ('-', $loc, 'action', $i++),
+ %$proto,
+ );
+ push(@act, $action);
+ }
+ return \@act;
};
+
+
1;
__END__;