blib/lib/MikroTik/Client/Mo.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 49 | 57 | 85.9 |
branch | 24 | 26 | 92.3 |
condition | 2 | 6 | 33.3 |
subroutine | 8 | 8 | 100.0 |
pod | n/a | ||
total | 83 | 97 | 85.5 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package MikroTik::Client::Mo; | ||||||
2 | # use Mo qw'default import'; | ||||||
3 | # The following line of code was produced from the previous line by | ||||||
4 | # Mo::Inline version 0.40 | ||||||
5 | 10 | 100 | 33 | 10 | 602 | no warnings;my$M=__PACKAGE__.'::';*{$M.Object::new}=sub{my$c=shift;my$s=bless{@_},$c;my%n=%{$c.'::'.':E'};map{$s->{$_}=$n{$_}->()if!exists$s->{$_}}keys%n;$s};*{$M.import}=sub{import warnings;$^H|=1538;my($P,%e,%o)=caller.'::';shift;eval"no Mo::$_",&{$M.$_.::e}($P,\%e,\%o,\@_)for@_;return if$e{M};%e=(extends,sub{eval"no $_[0]()";@{$P.ISA}=$_[0]},has,sub{my$n=shift;my$m=sub{$#_?do{$_[0]{$n}=$_[1];$_[0]}:$_[0]{$n}};@_=(default,@_)if!($#_%2);$m=$o{$_}->($m,$n,@_)for sort keys%o;*{$P.$n}=$m},%e,);*{$P.$_}=$e{$_}for keys%e;@{$P.ISA}=$M.Object};*{$M.'default::e'}=sub{my($P,$e,$o)=@_;$o->{default}=sub{my($m,$n,%a)=@_;exists$a{default}or return$m;my($d,$r)=$a{default};my$g='HASH'eq($r=ref$d)?sub{+{%$d}}:'ARRAY'eq$r?sub{[@$d]}:'CODE'eq$r?$d:sub{$d};my$i=exists$a{lazy}?$a{lazy}:!${$P.':N'};$i or ${$P.':E'}{$n}=$g and return$m;sub{$#_?$m->(@_):!exists$_[0]{$n}?$_[0]{$n}=$g->(@_):$m->(@_)}}};my$i=\&import;*{$M.import}=sub{(@_==2 and not$_[1])?pop@_:@_==1?push@_,grep!/import/,@f:();goto&$i};@f=qw[default import];use strict;use warnings; | |
7 | 100 | 33 | 7 | 15 | |||
7 | 100 | 7 | 6006 | ||||
7 | 100 | 7 | 62 | ||||
7 | 100 | 6 | 14 | ||||
7 | 100 | 5 | 188 | ||||
7 | 100 | 4 | 37 | ||||
7 | 100 | 119 | 14 | ||||
7 | 50 | 335 | |||||
7 | 100 | 1336 | |||||
0 | 100 | 0 | |||||
0 | 100 | 0 | |||||
6 | 50 | 970 | |||||
0 | 0 | ||||||
0 | 0 | ||||||
5 | 781 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
4 | 623 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
119 | 1067 | ||||||
10 | 30 | ||||||
8 | 17 | ||||||
141 | 14314 | ||||||
19 | 52 | ||||||
4 | 16 | ||||||
4 | 13 | ||||||
46 | 35562 | ||||||
59 | 227 | ||||||
60 | 211 | ||||||
60 | 205 | ||||||
62 | 164 | ||||||
46 | 231 | ||||||
29 | 74 | ||||||
47 | 17195 | ||||||
59 | 144 | ||||||
59 | 202 | ||||||
40 | 122 | ||||||
41 | 123 | ||||||
28 | 155 | ||||||
49 | 119 | ||||||
49 | 176 | ||||||
80 | 204 | ||||||
59 | 197 | ||||||
56 | 165 | ||||||
26 | 603 | ||||||
21 | 107 | ||||||
33 | 273 | ||||||
33 | 102 | ||||||
53 | 185 | ||||||
34 | 134 | ||||||
53 | 169 | ||||||
6 | 20 | ||||||
39 | 187 | ||||||
22 | 1069 | ||||||
23 | 132 | ||||||
6 | 1; | ||||||
7 | |||||||
8 | =encoding utf8 | ||||||
9 | |||||||
10 | =head1 NAME | ||||||
11 | |||||||
12 | MikroTik::Client::Mo - Mo inlined | ||||||
13 | |||||||
14 | =head1 SYNOPSIS | ||||||
15 | |||||||
16 | package MikroTik::Client::MyModule; | ||||||
17 | use MikroTik::Client::Mo; | ||||||
18 | |||||||
19 | =head1 DESCRIPTION | ||||||
20 | |||||||
21 | Inlined version of L |
||||||
22 | |||||||
23 | =head1 CAVEATS | ||||||
24 | |||||||
25 | Attributes behaviour changed in a way, that they will return an invocant | ||||||
26 | instead of value when called with an argument to allow chaining. | ||||||
27 | |||||||
28 | =cut |