62
|
1 package IMPL::Web::QueryHandler;
|
|
2
|
|
3 use base qw(IMPL::Object IMPL::Object::Autofill);
|
|
4 use IMPL::Class::Property;
|
|
5
|
|
6 __PACKAGE__->PassThroughArgs;
|
|
7
|
|
8 use IMPL::Exception;
|
|
9
|
|
10 sub Invoke {
|
|
11 my ($self,$action,$nextHandler) = @_;
|
|
12
|
|
13 if (not ref $self or UNIVERSAL::isa($self,'IMPL::Object::Factory')) {
|
|
14 return $self->new( action => $action )->Invoke($action,$nextHandler);
|
|
15 } else {
|
|
16 return $self->Process($action,$nextHandler);
|
|
17 }
|
|
18 }
|
|
19
|
|
20 sub Process {
|
|
21 die new NotImplementedException("The method isn't implemented", __PACKAGE__, 'Process');
|
|
22 }
|
|
23
|
|
24 1;
|
|
25
|
|
26 __END__
|
|
27
|
|
28 =pod
|
|
29
|
|
30 =head1 DESCRIPTION
|
|
31
|
|
32 ������� ����� ��� ������������ ��������.
|
|
33
|
|
34 =head1 MEMBERS
|
|
35
|
|
36 =over 4
|
|
37
|
|
38 =item C< Invoke($action,$nextHandler) >
|
|
39
|
|
40 ���������� ���������� ��������� �������, ��� �������� ���������� �����������. ������ ����������
|
|
41 ��������� ��� ���� �������, ���� ��� ����������� �����, �� ������� ��������� ������ � ��������
|
|
42 � ���������� ������� ����� C< Invoke > � ����������� C< $action >, C< $nextHandler >.
|
|
43
|
|
44 ���� ����� ��� ������ � �������, �� ���������� ���������� ������ C< Process >
|
|
45
|
|
46 C< $action > ��������� �������
|
|
47
|
|
48 C< $nextHandler > ������� ��� ������ ���������� �����������. ���������� ��� ����������, �� ���������� �����������
|
|
49 ������������ ����� �������� ����������� ���������.
|
|
50
|
|
51 =back
|
|
52
|
|
53 =cut |