From: wreis Date: Wed, 4 Nov 2009 19:37:47 +0000 (+0000) Subject: undo r1236 X-Git-Tag: v0.002000~22 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FReaction.git;a=commitdiff_plain;h=fce142bbcc216ecb8a9e906000be683e9b4ccff9 undo r1236 --- diff --git a/lib/Reaction/UI/ViewPort/Role/Actions.pm b/lib/Reaction/UI/ViewPort/Role/Actions.pm index b17a869..ceb9bfe 100644 --- a/lib/Reaction/UI/ViewPort/Role/Actions.pm +++ b/lib/Reaction/UI/ViewPort/Role/Actions.pm @@ -63,21 +63,11 @@ sub _build_actions { my $label = exists $proto->{label} ? $proto->{label} : $proto_name; my $layout = exists $proto->{layout} ? $proto->{layout} : 'uri'; - my $layout_args; - if( exists $proto->{layout_args} ){ - if( ref($proto->{layout_args}) eq 'CODE' ){ - $layout_args = $proto->{layout_args}->($target, $ctx); - } else { - $layout_args = $proto->{layout_args}; - } - } - my $action = Reaction::UI::ViewPort::URI->new( location => join ('-', $loc, 'action', $i++), uri => ( ref($uri) eq 'CODE' ? $uri->($target, $ctx) : $uri ), display => ( ref($label) eq 'CODE' ? $label->($target, $ctx) : $label ), layout => $layout, - ( ref($layout_args) eq ' HASH' ? (layout_args => $layout_args) : () ), ); push(@act, $action); }