blib/lib/MikroTik/Client/Mo.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 47 | 57 | 82.4 |
branch | 24 | 26 | 92.3 |
condition | 2 | 6 | 33.3 |
subroutine | 8 | 8 | 100.0 |
pod | n/a | ||
total | 81 | 97 | 83.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 | 8 | 100 | 33 | 8 | 335 | 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; | |
6 | 100 | 33 | 6 | 11 | |||
6 | 100 | 6 | 4240 | ||||
6 | 100 | 6 | 41 | ||||
6 | 100 | 5 | 10 | ||||
6 | 100 | 4 | 128 | ||||
6 | 100 | 3 | 26 | ||||
6 | 50 | 110 | 11 | ||||
6 | 100 | 231 | |||||
6 | 100 | 851 | |||||
0 | 100 | 0 | |||||
0 | 100 | 0 | |||||
5 | 50 | 635 | |||||
0 | 0 | ||||||
0 | 0 | ||||||
4 | 485 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
3 | 341 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
110 | 9557 | ||||||
100 | 518 | ||||||
19 | 52 | ||||||
10 | 36 | ||||||
22 | 14364 | ||||||
23 | 70 | ||||||
20 | 65 | ||||||
36 | 13816 | ||||||
36 | 88 | ||||||
45 | 154 | ||||||
29 | 88 | ||||||
29 | 68 | ||||||
33 | 114 | ||||||
27 | 75 | ||||||
26 | 136 | ||||||
36 | 82 | ||||||
36 | 72 | ||||||
34 | 66 | ||||||
30 | 143 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
6 | 33 | ||||||
38 | 87 | ||||||
38 | 127 | ||||||
42 | 77 | ||||||
16 | 38 | ||||||
54 | 2920 | ||||||
24 | 1045 | ||||||
12 | 49 | ||||||
15 | 221 | ||||||
15 | 38 | ||||||
27 | 46 | ||||||
26 | 92 | ||||||
28 | 55 | ||||||
4 | 26 | ||||||
29 | 104 | ||||||
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 |