blib/lib/lib/remote.pm

filter: Statementstmt 95.1% 118 / 124 Branchbran 74.2% 52 / 70 Conditioncond 61.0% 36 / 59 MC/DCmcdc 27.2% 9 / 33 Subroutinesub 100% 14 / 14 Podpod 100% 3 / 3 totaltotal 76.5% 232 / 303 CC 59 SCAR 28.2
CC
59
Cov
81%
__ANON__
27.4
config
17.3
import
15.0
CRAP 16.8
↑ Summary
1 package lib::remote;
2  
3 3 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use LWP::UserAgent;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 #~ use Data::Dumper;
8 3 ▶use Carp qw(croak carp);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 =head1 VERSION
11  
12 Version 0.11
13  
14 =cut
15  
16 3 our $VERSION = '0.11';
17 3 our $CODE_NAME = 'Gloria';
18 3 my $pkg = __PACKAGE__;
19  
20 3 my $url_re = qr#^(https?|ftp|file)://#i;
21  
22 3 my $config = {#сохранение списка пар "Имя::модуля"=>{opt_name => ..., ..., ...}
23 $pkg => {
24 ua => LWP::UserAgent->new,
25 require=>1,
26 cache=>1,
27 debug=>0,
28 _INC=> [],# список общих путей like @INC
29 },
30 };
31  
32 13 ▶my $module_content = sub {# @INC диспетчер
Subroutine __ANON__: called CC=25 SCAR=33.1
33 13 my $arg = shift;#Имя/Модуля.pm
34
35 13 my $path = my $mod = $arg;
36 13 $mod =~ s|/+|::|g;
37 13 $mod =~ s|\.pm$||g;
38 13 $path =~ s|::|/|g;
39 13 $path =~ s|\.pm$||;
40 13 $path .= '.pm';
41
42 13 my $conf = $config->{$mod};
43 13 ▶ my $debug = ($conf && $conf->{debug}) // $config->{$pkg}{debug};
Condition83%5/6
$conf && $conf->{"debug"} // $config->{$pkg}{"debug"}
l!l&&r!l&&!r
3100
$conf and $conf->{"debug"}
!ll&&!rl&&r
931
MC/DC0%0/3
$conf && $conf->{"debug"} // $config->{$pkg}{"debug"}
$conf $conf->{"debug"} $config->{$pkg}{"debug"}
Truth table60%3/5
A and B // C
A= $confB= $conf->{"debug"}C= $config->{$pkg}{"debug"}
ABCresult
11X1
0X11
1011
0X00
1000
44 13 ▶ my $cache = ($conf && $conf->{cache}) // $config->{$pkg}{cache};
Condition50%3/6
$conf && $conf->{"cache"} // $config->{$pkg}{"cache"}
l!l&&r!l&&!r
0130
$conf and $conf->{"cache"}
!ll&&!rl&&r
940
MC/DC0%0/3
$conf && $conf->{"cache"} // $config->{$pkg}{"cache"}
$conf $conf->{"cache"} $config->{$pkg}{"cache"}
Truth table40%2/5
A and B // C
A= $confB= $conf->{"cache"}C= $config->{$pkg}{"cache"}
ABCresult
11X1
0X11
1011
0X00
1000
45
46 13 ▶ carp "$pkg->INC_dispatcher: try dispatch of [$mod][path=$path][arg=$arg]]" if $debug;
Branch: 1 branch
BranchTrueFalseTotal
if $debug 6 7 13
47
48 13 ▶ if ($cache && $conf && $conf->{_content}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($cache and $conf and $conf->{"_content"}) 1 12 13
Condition83%5/6
$cache and $conf and $conf->{"_content"}
!ll&&!rl&&r
931
$cache and $conf
!ll&&!rl&&r
094
MC/DC66%2/3
$cache and $conf and $conf->{"_content"}
$cache $conf $conf->{"_content"}
Truth table75%3/4
A and B and C
A= $cacheB= $confC= $conf->{"_content"}
ABCresult
0XX0
10X0
1100
1111
49 1 ▶ carp "$pkg->INC_dispatcher: get cached content of [$mod]" if $debug;
Branch: 1 branch
BranchTrueFalseTotal
if $debug 0 1 1
50 1 return $conf->{_content};
51 }
52  
53 12 my $content;
54
55 12 ▶ if ($conf && $conf->{url} && $conf->{url} =~ /$url_re/) {# конкретный модуль
Branch: 1 branch
BranchTrueFalseTotal
if ($conf and $conf->{"url"} and $conf->{"url"} =~ /$url_re/) 2 10 12
Condition83%5/6
$conf and $conf->{"url"} and $conf->{"url"} =~ /$url_re/
!ll&&!rl&&r
1002
$conf and $conf->{"url"}
!ll&&!rl&&r
912
MC/DC66%2/3
$conf and $conf->{"url"} and $conf->{"url"} =~ /$url_re/
$conf $conf->{"url"} $conf->{"url"} =~ /$url_re/
Truth table75%3/4
A and B and C
A= $confB= $conf->{"url"}C= $conf->{"url"} =~ /$url_re/
ABCresult
0XX0
10X0
1100
1111
56 2 my $url = $conf->{url};
57 2 ▶ $url .= $conf->{url_suffix} if $conf->{url_suffix};
Branch: 1 branch
BranchTrueFalseTotal
if $conf->{"url_suffix"} 0 2 2
58 2 $content = _lwpget($url);
59 2 ▶ carp "$pkg->INC_dispatcher: success LWP get content [$mod] by url=[ $url ]" if $debug && $content;
Branch: 1 branch
BranchTrueFalseTotal
if $debug and $content 1 1 2
Condition66%2/3
$debug and $content
!ll&&!rl&&r
101
MC/DC50%1/2
$debug and $content
$debug $content
Truth table66%2/3
A and B
A= $debugB= $content
ABresult
0X0
100
111
60 2 ▶ carp "$pkg->INC_dispatcher: couldn't get content the module [$mod] by url=[ $url ]" if $debug && !$content;
Branch: 1 branch
BranchTrueFalseTotal
if $debug and not $content 0 2 2
Condition66%2/3
$debug and not $content
!ll&&!rl&&r
110
MC/DC0%0/2
$debug and not $content
$debug not $content
Truth table66%2/3
A and not(B)
A= $debugB= not $content
ABresult
0X0
100
111
61 }
62 12 ▶ unless ($content) {# перебор удаленных папок
Branch: 1 branch
BranchTrueFalseTotal
unless ($content) 10 2 12
63 10 for (@{$config->{$pkg}{_INC}}) {
64 7 s|/$||;
65 7 my $url = "$_/$path";
66 7 ▶ $url .= $conf->{url_suffix} if $conf->{url_suffix};
Branch: 1 branch
BranchTrueFalseTotal
if $conf->{"url_suffix"} 0 7 7
67 #~ carp "$pkg: try get [$_/$path] for [$mod]" if $debug;#": get [$mod] content";
68 7 $content = _lwpget($url);
69 7 ▶ if ($content) {
Branch: 1 branch
BranchTrueFalseTotal
if ($content) 3 4 7
70 3 ▶ carp "$pkg->INC_dispatcher: success LWP get content [$mod] by url [ $url ]" if $debug;#": get [$mod] content";
Branch: 1 branch
BranchTrueFalseTotal
if $debug 3 0 3
71 3 last;
72 }
73 }
74 }
75
76 12 ▶ $config->{$mod}{_content} = $content if $cache && $content;
Branch: 1 branch
BranchTrueFalseTotal
if $cache and $content 5 7 12
Condition66%2/3
$cache and $content
!ll&&!rl&&r
075
MC/DC50%1/2
$cache and $content
$cache $content
Truth table66%2/3
A and B
A= $cacheB= $content
ABresult
0X0
100
111
77  
78 12 return $content;
79 3 };
80  
81 3 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
82 13 ▶ push @INC, sub {# диспетчер
Subroutine __ANON__: called CC=3 SCAR=11.0
83 13 my $self = shift;# эта функция CODE(0xf4d728) вроде не нужна
84 13 ▶ my $content = $module_content->(@_)
Branch: 1 branch
BranchTrueFalseTotal
my $content = &$module_content(@_) or return undef 6 7 13
85 or return undef;
86 6 ▶ open my $fh, '<', \$content or die "Cant open: $!";
Branch: 1 branch
BranchTrueFalseTotal
open my $fh, "<", \$content or die "Cant open: $!" 6 0 6
87 6 return $fh;
88 3 };
89 }
90  
91 5 ▶sub import { # это разбор аргументов после строк use lib::remote ...
Subroutine import: called CC=14 SCAR=27.1
92 5 my $pkg_or_obj = shift;
93 5 ▶ carp "$pkg->import: incoming args = [ @_ ]" if $config->{$pkg}{debug};
Branch: 1 branch
BranchTrueFalseTotal
if $config->{$pkg}{"debug"} 2 3 5
94 5 $pkg->config(@_);
95
96 5 my $module;
97 5 for my $module (@{$config->{$pkg}{_last_config_modules}}) {
98 3 ▶ my $require = $config->{$module}{require} // $config->{$pkg}{require};
Condition33%1/3
$config->{$module}{"require"} // $config->{$pkg}{"require"}
l!l&&r!l&&!r
030
MC/DC0%0/2
$config->{$module}{"require"} // $config->{$pkg}{"require"}
$config->{$module}{"require"} $config->{$pkg}{"require"}
Truth table33%1/3
A // B
A= $config->{$module}{"require"}B= $config->{$pkg}{"require"}
ABresult
1X1
011
000
99 3 ▶ my $debug = $config->{$module}{debug} // $config->{$pkg}{debug};
Condition66%2/3
$config->{$module}{"debug"} // $config->{$pkg}{"debug"}
l!l&&r!l&&!r
210
MC/DC0%0/2
$config->{$module}{"debug"} // $config->{$pkg}{"debug"}
$config->{$module}{"debug"} $config->{$pkg}{"debug"}
Truth table66%2/3
A // B
A= $config->{$module}{"debug"}B= $config->{$pkg}{"debug"}
ABresult
1X1
011
000
100 3 ▶ if ( $require ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($require) 3 0 3
101 #~ eval "use $module;";# вот сразу заход в диспетчер @INC
102 3 eval {require $module};
103 3 ▶ if ($@) {
Branch: 2 branches
BranchTrueFalseTotal
if ($@) { } 1 2 3
elsif ($debug) { } 1 1 2
104 1 carp "$pkg->import: возможно проблемы с модулем [$module]: $@";
105 } elsif ($debug) {
106 1 ▶ carp "$pkg->import: success done [require $module]\n" if $debug;
Branch: 1 branch
BranchTrueFalseTotal
if $debug 1 0 1
107 1 $config->{$module}{_require_ok}++;
108 }
109 }
110 3 my $import = $config->{$module}{import};# || $config->{$pkg}{import};
111
112 3 ▶ if ($require && $import && @$import) {
Branch: 1 branch
BranchTrueFalseTotal
if ($require and $import and @$import) 2 1 3
Condition66%4/6
$require and $import and @$import
!ll&&!rl&&r
102
$require and $import
!ll&&!rl&&r
012
MC/DC33%1/3
$require and $import and @$import
$require $import @$import
Truth table50%2/4
A and B and C
A= $requireB= $importC= @$import
ABCresult
0XX0
10X0
1100
1111
113 2 eval {$module->import(@$import)};
114 2 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) { } 0 2 2
115 0 carp "$pkg->import: возможно проблемы с импортом [$module]: $@";
116 } else {
117 2 ▶ carp "$pkg->import: success done [$module->import(@{[@$import]})]\n" if $debug;
Branch: 1 branch
BranchTrueFalseTotal
if $debug 1 1 2
118 2 $config->{$module}{_import_ok}++;
119 }
120 }
121 }
122 }
123  
124 7 ▶sub config {
Subroutine config: called CC=12 SCAR=28.5
Pod documented
125 7 my $pkg_or_obj = shift;
126 7 my $module;
127 7 delete $config->{$pkg}{_last_config_modules};
128 7 for my $arg (@_) {
129 10 my $opt = _opt($arg);
130 10 ▶ if ($module) {
Branch: 3 branches
BranchTrueFalseTotal
if ($module) { } 3 7 10
elsif ($opt->{'url'} and $opt->{'url'} =~ /$url_re/) { } 2 5 7
elsif (not ref $arg) { } 3 2 5
131 3 ▶ if ( $module eq $pkg ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($module eq $pkg) { } 0 3 3
132 0 my $url = delete $opt->{url};
133 0 ▶ push @{$config->{$pkg}{_INC}}, $url if $url && $url =~ /$url_re/ && !($url ~~ @{$config->{$pkg}{_INC}});
Branch: 1 branch
BranchTrueFalseTotal
if $url and $url =~ /$url_re/ and not $url ~~ \@{$$config{$pkg}{"_INC"};} 0 0 0
Condition0%0/6
$url and $url =~ /$url_re/ and not $url ~~ \@{$$config{$pkg}{"_INC"};}
!ll&&!rl&&r
000
$url and $url =~ /$url_re/
!ll&&!rl&&r
000
MC/DC0%0/3
$url and $url =~ /$url_re/ and not $url ~~ \@{$$config{$pkg}{"_INC"};}
$url $url =~ /$url_re/ not $url ~~ \@{$$config{$pkg}{"_INC"};}
Truth table0%0/4
A and B and not(C)
A= $urlB= $url =~ /$url_re/C= not $url ~~ \@{$$config{$pkg}{"_INC"};}
ABCresult
0XX0
10X0
1100
1111
134 } else {
135 3 push @{$config->{$pkg}{_last_config_modules}}, $module;
136 }
137 3 @{$config->{$module}}{keys %$opt} = values %$opt;
138 3 $module = undef; # done pair
139 ▶ } elsif ($opt->{url} && $opt->{url} =~ /$url_re/) {
Condition100%3/3
$opt->{"url"} and $opt->{"url"} =~ /$url_re/
!ll&&!rl&&r
232
MC/DC100%2/2
$opt->{"url"} and $opt->{"url"} =~ /$url_re/
$opt->{"url"} $opt->{"url"} =~ /$url_re/
Truth table100%3/3
A and B
A= $opt->{"url"}B= $opt->{"url"} =~ /$url_re/
ABresult
0X0
100
111
140 2 ▶ push @{$config->{$pkg}{_INC}}, $opt->{url} unless $opt->{url} ~~ @{$config->{$pkg}{_INC}};#$unique{$arg}++;
Branch: 1 branch
BranchTrueFalseTotal
unless $opt->{"url"} ~~ \@{$$config{$pkg}{"_INC"};} 2 0 2
141 } elsif (!ref($arg)) {
142 3 $module = $arg;
143 } else {
144 2 @{$config->{$pkg}}{keys %$opt} = values %$opt; # [] {}
145 }
146 }
147 0 ▶ push @{$config->{$pkg}{_last_config_modules}}, $module if $module;
Branch: 1 branch
BranchTrueFalseTotal
if $module 0 7 7
148 7 return $config;
149 }
150  
151 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
152 1 my $pkg = shift;
153 1 bless $pkg->config(@_);
154 }
155  
156 2 ▶sub module {
Subroutine module: called CC=1 SCAR=0.0
Pod documented
157 2 my $pkg_or_obj = shift;
158 2 $pkg_or_obj->import(@_);
159 2 return $config->{$pkg}{_last_config_modules}[0];
160 }
161  
162 10 ▶sub _opt {
Subroutine _opt: called CC=8 SCAR=23.4
163 10 my $arg = shift;
164 10 ▶ return {} unless defined $arg;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $arg 0 10 10
165 10 ▶ my $ret = {url=>$arg,} unless ref($arg);
Branch: 1 branch
BranchTrueFalseTotal
unless ref $arg 5 5 10
166 10 ▶ $ret ||= {$arg->[0] =~ /$url_re/ ? (url=>@$arg) : @$arg,} if ref($arg) eq 'ARRAY';
Branch: 2 branches
BranchTrueFalseTotal
if ref $arg eq "ARRAY" 0 10 10
$arg->[0] =~ /$url_re/ ? : 0 0 0
Condition0%0/2
$ret ||= {$arg->[0] =~ /$url_re/ ? ("url", @$arg) : @$arg}
l!l
00
MC/DC0%0/1
$ret ||= {$arg->[0] =~ /$url_re/ ? ("url", @$arg) : @$arg}
$ret
Truth table0%0/2
A
A= $ret
Aresult
11
00
167 10 ▶ $ret ||= $arg if ref($arg) eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $arg eq "HASH" 5 5 10
Condition66%2/3
$ret ||= $arg
l!l&&r!l&&!r
140
MC/DC0%0/2
$ret ||= $arg
$ret $arg
Truth table66%2/3
A ||= B
A= $retB= $arg
ABresult
1X1
011
000
168 10 return $ret;
169 }
170  
171 9 ▶sub _lwpget {
Subroutine _lwpget: called CC=2 SCAR=6.9
172 9 my $url = shift;
173 9 my $get = $config->{$pkg}{ua}->get($url);
174 9 ▶ if ( $get->is_success ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($get->is_success) { } 5 4 9
175 5 return $get->decoded_content();# ??? ->content нужно отладить charset=>'cp-1251'
176 } else {
177 4 return undef;
178 }
179 }
180  
181 =encoding utf8
182  
183 =head1 ПРИВЕТСТВИЕ SALUTE
184  
185 Доброго всем! Доброго здоровья! Доброго духа!
186  
187 Hello all! Nice health! Good thinks!
188  
189  
190 =head1 NAME
191  
192 lib::remote - pragma, functional and object interface for load and use/require modules from remote sources without installation basically throught protocols like http (LWP). One dispather on @INC - C<push @INC, sub {};> This dispather will return filehandle for downloaded content of a module from remote server.
193  
194 lib::remote - Удаленная загрузка и использование модулей. Загружает модули с удаленного сервера. Только один диспетчер в @INC- C<push @INC, sub {...};>. Диспетчер возвращает filehandle для контента, полученного удаленно. Смотреть perldoc -f require.
195  
196 Идея из L</http://forum.codecall.net/topic/64285-perl-use-modules-on-remote-servers/>
197  
198 Кто-то еще стырил L</http://www.linuxdigest.org/2012/06/use-modules-on-remote-servers/> (поздняя дата и есть ошибки)
199  
200  
201 =head1 FAQ
202  
203 Q: Зачем? Why?
204  
205 A: За лосем. For elk.
206  
207 Q: Почему? And so why?
208  
209 A: По кочану. For head of cabbage.
210  
211 Q: Как? How?
212  
213 A: Да вот так. Da vot tak.
214  
215  
216 =head1 SYNOPSIS
217  
218 Все просто. По аналогии с локальным вариантом:
219  
220 use lib '/to/any/local/lib';
221  
222 указываем урл:
223  
224 # pragma interface at compile time
225 use lib::remote 'http://<хост(host)>/site-perl/.../';
226 use My::Module1;
227 ...
228  
229 Искомый модуль будет запрашиваться как в локальном варианте, дописывая в конце URL: http://<хост(host)>/site-perl/.../My/Module1.pm
230  
231 Допустим, УРЛ сложнее, не содержит имени модуля или используются параметры: https://<хост>/.../?key=ede35ac1208bbf479&...
232  
233 Тогда делаем пары ключ->значение, указывая КОНКРЕТНЫЙ урл для КОНКРЕТНОГО модуля, например:
234  
235 use lib::remote
236 'Some::Module1'=>'https://<хост>/.../?key=ede35ac1208bbf479&...',
237 'SomeModule2'=>'ssh://user:pass@host:/..../SomeModule2.pm',
238 ;
239 #use Some::Module1; не нужно, уже сделано require (см. "Опцию [require] расширенного синтаксиса")
240 use SomeModule2 qw(func1 func2), [<what ever>, ...];# только, если нужно что-то импортировать очень сложное (см. "Опцию [import] расширенного синтаксиса")
241 use parent 'Some::Module1'; # такое нужно
242 ...
243  
244  
245 B<Внимание>
246  
247 Конкретно указанный модуль (через пару) будет искаться сначала в своем урл, а потом во всех заданных урлах глобального конфига.
248  
249 При многократном вызове use lib::remote все параметры и урлы сохраняются, аналогично use lib '';, но естественно не в @INC. Повторюсь, в @INC помещается только один диспетчер.
250  
251 =head2 Расширенный синтаксис Extended syntax
252  
253 =head3 Pragma variant
254  
255 use lib::remote
256 # global config for modules unless them have its own
257 'http://....', # push to search list urls
258 ['http://....', opt1 =>..., opt2 =>..., ....], # push to search list urls
259 {url=>'http://....', opt1 =>..., opt2 =>..., ....}, # push to search list urls
260  
261 and per module personal options
262  
263 'Some::Module1'=> 'http://....',
264 'Some::Module2'=>['http://...', opt1 =>..., opt2 =>..., ....],
265 'Some::Module3'=>{url => 'http://...', opt1 =>..., opt2 =>..., ....},
266 'SomeModule1'=>['ssh://user@host:/..../SomeModule2.pm', 'pass'=>..., ...],
267 'SomeModule2'=>{url => 'ssh://user@host:/..../SomeModule2.pm', 'pass'=>..., ...},
268 ;
269  
270  
271 =head3 Functional variant - is runtime and you cant import symbols
272  
273 use lib::remote;
274 my $conf = lib::remote->config('http://....');
275 # DONT WORK -> lib::remote::module('Foo::');
276 # OK
277 lib::remote->module('Foo::One'=>'http://...', )::foo(...);
278
279  
280 =head3 Object variant - is runtime and you cant import symbols
281  
282 use lib::remote;
283 my $dispatcher = lib::remote->new(<list options>);
284 my $foo2 = $dispatcher->module('Foo::Two')->new();
285  
286  
287  
288 =head2 Опции Options
289  
290 Не трудно догадаться, что вычленение пар в общем списке import/config происходит по специфике URI.
291  
292 =over 4
293  
294 =item * url => '>schema://>...' Это основной параметр. На уровне глобальной конфигурации сохраняется список всех урлов, к которым добавляется путь Some/Module.pm
295  
296 =item * url_suffix
297  
298 =item * charset => 'utf8', Задать кодировку урла. Если веб-сервер правильно выдает C<Content-Type: ...; charset=utf8>, тогда не нужно, ->decoded_content сработает. Помнить про C<use utf8;>
299  
300 =item * require => 1|0 Cрабатывает require Some::Module1; Поэтому не нужно делать строку use|require Some::Module;, если только нет хитрых импортов (см. опцию import ниже)
301  
302 =item * import => [qw(), ...]. The import spec for loaded module. Disadvantage!!! Work on list of scalars only!!! Просто вызывается Some::Module1->import(...);
303  
304 =item * cache => 1|0 Content would be cached
305  
306 =item * debug => 0|1 warn messages
307  
308 =item * что еще?
309  
310 =back
311  
312  
313 Можно многократно вызывать use lib::remote ...; и тем самым изменять настройки модулей и глобальные опции.
314  
315 Url может возвращать сразу пачку модулей (package). В этом случае писать ключом один модуль и дополнительно вызывать use/require для остальных модулей.
316  
317 =head1 EXPORT
318  
319 Ничего не экспортируется.
320  
321 =head1 SUBROUTINES/METHODS
322  
323 This is runtime.
324  
325 =head2 new(<options list>) Create lib::remote object and apply/merge options. All created objects are one variable.
326  
327 =head2 module(<options list>) Try to load and require modules. Return the name of first parsed module in list of options.
328  
329 =head2 config(<options list>) Apply/merge options to lib::remote package.
330  
331 =head1 Требования REQUIRES
332  
333 Если урлы 'http://...', 'https://...', 'ftp://...', 'file://...', то нужен LWP::UserAgent
334  
335 Если 'ssh://...' - TODO
336  
337 =head1 Пример конфига для NGINX, раздающего модули:
338  
339 ...
340 server {
341 listen 81;
342 # server_name localhost;
343  
344  
345 location / {
346 charset utf-8;
347 charset_types *;
348 root /home/perl/lib-remote/;
349 index index.html index.htm;
350 }
351  
352 }
353 ...
354  
355  
356 =head1 AUTHOR
357  
358 Mikhail Che, C<< <m[пёсик]cpan.org> >>
359  
360 =head1 BUGS
361  
362 Пишите.
363  
364 Please report any bugs or feature requests to C<bug-lib-remote at rt.cpan.org>, or through
365 the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=lib-remote>. I will be notified, and then you'll
366 automatically be notified of progress on your bug as I make changes.
367  
368  
369  
370  
371 =head1 SUPPORT
372  
373 You can find documentation for this module with the perldoc command.
374  
375 perldoc lib::remote
376  
377  
378 You can also look for information at:
379  
380 =over 4
381  
382 =item * RT: CPAN's request tracker (report bugs here)
383  
384 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=lib-remote>
385  
386 =item * AnnoCPAN: Annotated CPAN documentation
387  
388 L<http://annocpan.org/dist/lib-remote>
389  
390 =item * CPAN Ratings
391  
392 L<http://cpanratings.perl.org/d/lib-remote>
393  
394 =item * Search CPAN
395  
396 L<http://search.cpan.org/dist/lib-remote/>
397  
398 =back
399  
400  
401 =head1 ACKNOWLEDGEMENTS
402  
403 Не знаю.
404  
405 =head1 SEE ALSO
406  
407 perldoc -f require.
408  
409 Глянь L<PAR>
410  
411 Глянь L<Remote::Use>
412  
413 Глянь L<lib::http>
414  
415 Глянь L<lib::DBI>
416  
417 =head1 LICENSE AND COPYRIGHT
418  
419 Copyright 2012-2013 Mikhail Che.
420  
421 This program is free software; you can redistribute it and/or modify it
422 under the terms of either: the GNU General Public License as published
423 by the Free Software Foundation; or the Artistic License.
424  
425 See http://dev.perl.org/licenses/ for more information.
426  
427 =head1 DISTRIB
428  
429 $ module-starter --module=lib::remote --author=”Mikhail Che” --email=”m.che@cpan.org" --builder=Module::Build --license=perl --verbose
430  
431 $ perl Build.PL
432  
433 $ ./Build test
434  
435 $ ./Build dist
436  
437  
438 =cut
439  
440 3 1; # End of lib::remote
↑ Summary