Mercurial > pub > Impl
diff Lib/IMPL/Web/NotAllowedException.pm @ 229:47f77e6409f7
heavily reworked the resource model of the web application:
*some ResourcesContraact functionality moved to Resource
+Added CustomResource
*Corrected action handlers
author | sergey |
---|---|
date | Sat, 29 Sep 2012 02:34:47 +0400 |
parents | |
children | 6d8092d8ce1b |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Lib/IMPL/Web/NotAllowedException.pm Sat Sep 29 02:34:47 2012 +0400 @@ -0,0 +1,28 @@ +package IMPL::Web::NotAllowedException; +use strict; + +use IMPL::lang qw(:constants); +use IMPL::declare { + base => [ + 'IMPL::Web::Exception' => sub { + my %args = @_; + $args{Message}; + } + ] +}; + +sub CTOR { + my %args = @_; + + $this->headers({ + allow => $args{allow} + }); +} + +sub status { + "405 Method Not Allowed" +} + +1; + +__END__ \ No newline at end of file