annotate lib/IMPL/Web/AutoLocator.pm @ 417:3ed0c58e9da3 ref20150831

working on di container, tests
author cin
date Mon, 02 Nov 2015 01:56:53 +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::AutoLocator;
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 overload '""' => 'toString';
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
5
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
6 use IMPL::Const qw(:prop);
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
7 use IMPL::lang qw(:hash);
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
8 use IMPL::clone qw(clone);
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
9 use URI;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
10 use URI::Escape;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
11 use IMPL::declare {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
12 require => {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
13 Exception => 'IMPL::Exception',
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
14 ArgumentException => '-IMPL::InvalidArgumentException'
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
15 },
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
16 base => [
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
17 'IMPL::Object' => undef,
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
18 'IMPL::Object::Autofill' => '@_',
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
19 'IMPL::Object::Serializable' => '@_'
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
20 ],
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
21 props => [
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
22 base => PROP_RO,
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
23 view => PROP_RW,
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
24 query => PROP_RW,
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
25 hash => PROP_RW
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
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
29 sub Clone {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
30 my $this = shift;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
31
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
32 return clone($this);
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
33 }
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
34
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
35 sub Child {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
36 my $this = shift;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
37 my $child = shift or die ArgumentException->new("a child resource identifier is required");
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
38 die ArgumentException->new("a child resource can't be a reference") if ref $child;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
39
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
40 # safe
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
41 #$child = uri_escape_utf8($child);
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
42
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
43 my %args;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
44
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
45 $args{base} = $this->base =~ /\/$/ ? $this->base . $child : $this->base . '/' . $child;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
46 $args{view} = $this->view if $this->view;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
47 $args{hash} = $this->hash if $this->hash;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
48
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
49 if (@_) {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
50 my $query = shift;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
51
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
52 $args{query} = ref $query eq 'HASH' ? hashMerge($this->query,$query) : $query;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
53 }
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
54
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
55 return $this->new(%args);
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
56 }
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
57
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
58 sub Sibling {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
59 my $this = shift;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
60 my $child = shift or die ArgumentException->new("a child resource identifier is required");
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
61 die ArgumentException->new("a child resource can't be a reference") if ref $child;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
62
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
63 # safe
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
64 #$child = uri_escape($child);
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
65
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
66 my %args;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
67
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
68 if($this->base =~ /(.*?)(\/[^\/]*)?$/) {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
69 $args{base} = join('/',$1,$child);
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
70 } else {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
71 $args{base} = $child;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
72 }
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
73
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
74 $args{view} = $this->view if $this->view;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
75 $args{hash} = $this->hash if $this->hash;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
76
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
77 if (@_) {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
78 my $query = shift;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
79
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
80 $args{query} = ref $query eq 'HASH' ? hashMerge($this->query,$query) : $query;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
81 }
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
82
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
83 return $this->new(%args);
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
84
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
85 }
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
86
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
87 sub Query {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
88 my ($this,$query) = @_;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
89
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
90 my %args;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
91
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
92 $args{base} = $this->base;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
93 $args{view} = $this->view if $this->view;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
94 $args{hash} = $this->hash if $this->hash;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
95 $args{query} = ref $query eq 'HASH' ? hashMerge($this->query,$query) : $query;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
96
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
97 return $this->new(%args);
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
98 }
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
99
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
100 sub SetView {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
101 my ($this,$newView) = @_;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
102
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
103 $this->view($newView);
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
104
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
105 return $this;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
106 }
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
107
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
108 sub url {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
109 my ($this) = @_;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
110
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
111 my $url = URI->new($this->view ? $this->base . "." . $this->view : $this->base);
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
112 $url->query_form($this->query);
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
113 $url->fragment($this->hash);
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
114
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
115 return $url;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
116 }
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
117
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
118 sub ToAbsolute {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
119 my ($this,$baseUrl) = @_;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
120
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
121 return URI->new_abs( $this->url, $baseUrl );
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
122 }
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
123
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
124 sub toString {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
125 shift->url->as_string();
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
126 }
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
127
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
128 sub AUTOLOAD {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
129 our $AUTOLOAD;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
130
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
131 (my $method) = ($AUTOLOAD =~ m/(\w+)$/);
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
132
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
133 return if $method eq 'DESTROY';
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
134
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
135 my $this = shift;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
136 return $this->Child($method,@_);
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
137 }
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
138
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
139
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
140
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
141 1;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
142
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
143 __END__
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
144
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
145 =head1 NAME
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
146
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
147 C<IMPL::Web::AutoLocator> - Обертка вокруг адреса ресурса.
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
148
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
149 =head1 SYNOPSIS
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
150
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
151 =begin code
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
152
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
153 use IMPL::require {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
154 Locator => 'IMPL::Web::AutoLocator'
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
155 };
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
156
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
157 my $bugTracker = Locator->new(base => "http://myhost.org/bugzilla")->SetView("cgi");
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
158
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
159 my $bug = $bugTracker->show_bug({id = 1});
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
160
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
161 my $wikiPages = Locator->new(base => "http://myhost.org/wiki/bin/view");
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
162
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
163 my $page = $wiki->Main->HowTo;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
164
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
165 my $images = Locator->new(base => "http://static.myhost.org/images", view => "png");
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
166
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
167 my $editIco = $images->icons->small->edit;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
168
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
169 =end code
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
170
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
171 =head1 DESCRIPTION
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
172
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
173 Для удобстав навигации по ресурсам, полностью отражает классическую структуру
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
174 иерархически организованных ресурсов. позволяет гибко работать с параметрами
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
175 запроса и хешем. Для постоты чтения реализует метод C<AUTOLOAD> для доступа
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
176 к дочерним ресурсам.
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
177
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
178 =head1 MEMBERS
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
179
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
180 =head2 C<CTOR(%args)>
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
181
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
182 Создает новый объект расположение. Позволяет задать путь, расширение, параметры
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
183 запроса и фрагмент ресурса.
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
184
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
185 =over
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
186
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
187 =item * C<base>
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
188
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
189 Строка с базовым адресом для дочерних ресурсов.
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
190
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
191 =item * C<view>
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
192
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
193 Задает суфикс, обозначающий представление ресурса, аналогично расширению у
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
194 файлов. Данный суффикс может использоваться контроллером для выбора
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
195 представления ресурса.
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
196
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
197 =item * C<query>
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
198
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
199 Ссылка на хеш с параметрами запроса
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
200
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
201 =item * C<hash>
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
202
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
203 Часть C<uri> обозначающая фрагмент документа (все, что идет после символа C<#>).
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
204
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
205 =back
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
206
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
207 =head2 C<Child($child[,$query])>
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
208
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
209 Получает расположение дочернего ресурса. При этом cоздается новый объект адреса ресурса.
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
210
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
211 =head2 C<SetView($view)>
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
212
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
213 Позволяет указать представление (расширение) у текущего адреса ресурса. Изменяет
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
214 представление и возвращает измененный адрес ресурса.
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
215
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
216 =head2 C<[get]base>
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
217
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
218 Базовый адрес, относительно которого будут получены дочерние ресурсы.
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
219
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
220 =head2 C<[get,set]view>
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
221
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
222 Представление для ресурсов, аналогично расширению у файлов.
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
223
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
224 =head2 C<[get,set]query>
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
225
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
226 Ссылка на хеш с параметрами для C<GET> запроса.
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
227
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
228 =head2 C<[get,set]hash>
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
229
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
230 Часть адреса ресурса, отвечающая за фрагмент.
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
231
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
232 =head2 C<[get]url>
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
233
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
234 Объект C<URI> для текущего адреса.
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
235
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
236 =head2 C<AUTLOAD>
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
237
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
238 Перенаправляет вызовы методов в метод C<Child> передавая первым параметром имя метода.
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
239
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
240 =cut
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
241