annotate lib/IMPL/Web/NotAllowedException.pm @ 412:30e8c6a74937 ref20150831

working on di container (role based registrations)
author cin
date Mon, 21 Sep 2015 19:54:10 +0300
parents c6e90e02dd17
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
407
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
1 package IMPL::Web::NotAllowedException;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
2 use strict;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
3
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
4 use IMPL::Const qw(:prop);
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
5 use IMPL::declare {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
6 base => [
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
7 'IMPL::Web::Exception' => '@_'
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
8 ]
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
9 };
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
10
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
11 use IMPL::Resources::Strings {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
12 message => "The requested method isn't allowed"
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
13 };
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
14
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
15 sub CTOR {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
16 my $this = shift;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
17 my %args = @_;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
18
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
19 $this->headers({
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
20 allow => $args{allow}
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
21 });
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
22 }
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
23
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
24 sub status {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
25 "405 Method Not Allowed"
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
26 }
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
27
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
28 1;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
29
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
30 __END__