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 | 563 | 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 | 14 | |||
7 | 50 | 7 | 6146 | ||||
7 | 100 | 7 | 54 | ||||
7 | 100 | 6 | 15 | ||||
7 | 100 | 5 | 157 | ||||
7 | 100 | 4 | 34 | ||||
7 | 100 | 14 | 21 | ||||
7 | 100 | 326 | |||||
7 | 100 | 1238 | |||||
0 | 50 | 0 | |||||
0 | 100 | 0 | |||||
6 | 100 | 840 | |||||
0 | 0 | ||||||
0 | 0 | ||||||
5 | 700 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
4 | 537 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
14 | 2982 | ||||||
5 | 37 | ||||||
3 | 14 | ||||||
113 | 11288 | ||||||
34 | 17166 | ||||||
33 | 90 | ||||||
17 | 29 | ||||||
38 | 17784 | ||||||
45 | 182 | ||||||
43 | 242 | ||||||
55 | 231 | ||||||
67 | 16587 | ||||||
66 | 315 | ||||||
113 | 1533 | ||||||
32 | 103 | ||||||
49 | 126 | ||||||
62 | 201 | ||||||
60 | 185 | ||||||
60 | 195 | ||||||
39 | 184 | ||||||
31 | 221 | ||||||
31 | 110 | ||||||
67 | 148 | ||||||
67 | 282 | ||||||
58 | 127 | ||||||
35 | 108 | ||||||
39 | 140 | ||||||
37 | 201 | ||||||
24 | 102 | ||||||
40 | 80 | ||||||
22 | 79 | ||||||
57 | 167 | ||||||
22 | 541 | ||||||
43 | 153 | ||||||
19 | 491 | ||||||
35 | 226 | ||||||
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 |