Mercurial > pub > Impl
diff Lib/IMPL/Web/Application/Action.pm @ 238:b8c724f6de36
DOM model refactoring
TT view refactoring, controls are no longer derived from DOM nodes
bugfixes
author | sergey |
---|---|
date | Tue, 16 Oct 2012 01:33:06 +0400 |
parents | 6d8092d8ce1b |
children | a02b110da931 |
line wrap: on
line diff
--- a/Lib/IMPL/Web/Application/Action.pm Mon Oct 15 17:39:12 2012 +0400 +++ b/Lib/IMPL/Web/Application/Action.pm Tue Oct 16 01:33:06 2012 +0400 @@ -1,33 +1,25 @@ package IMPL::Web::Application::Action; use strict; -use parent qw(IMPL::Object IMPL::Object::Autofill); - -__PACKAGE__->PassThroughArgs; - -use IMPL::Class::Property; use Carp qw(carp); -BEGIN { - public property application => prop_get | owner_set; - public property query => prop_get | owner_set; - private property _entryPoint => prop_all; -} +use IMPL::Const qw(:prop); + +use IMPL::declare { + base => [ + 'IMPL::Object' => undef, + 'IMPL::Object::Autofill' => '@_' + ], + props => [ + application => PROP_RO, + query => PROP_RO + ] +}; sub CTOR { my ($this) = @_; } -sub Invoke { - my ($this) = @_; - - if ($this->_entryPoint) { - $this->_entryPoint->(); - } else { - die new IMPL::InvalidOperationException("At least one handler is required"); - } -} - sub cookie { my ($this,$name,$rx) = @_; @@ -50,6 +42,12 @@ return $this->query->path_info; } +sub baseUrl { + my ($this) = @_; + + return $this->query->url(-base => 1); +} + sub _launder { my ($this,$value,$rx) = @_;