File Coverage

blib/lib/MikroTik/Client/Mo.pm
Criterion Covered Total %
statement 49 57 85.9
branch 23 26 88.4
condition 2 6 33.3
subroutine 8 8 100.0
pod n/a
total 82 97 84.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   482 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   12  
  7 100   7   7230  
  7 100   7   61  
  7 100   6   27  
  7 100   5   255  
  7 50   4   37  
  7 100   268   11  
  7 100       745  
  7 100       1110  
  0 50       0  
  0 100       0  
  6 50       741  
  0         0  
  0         0  
  5         585  
  0         0  
  0         0  
  4         499  
  0         0  
  0         0  
  268         50855  
  25         188  
  3         20  
  3         11  
  50         237044  
  50         166  
  68         1477  
  69         291  
  66         151  
  47         229  
  47         850  
  72         2099  
  43         135  
  224         1375  
  30         115  
  39         493493  
  49         239  
  36         140  
  45         183  
  30         112  
  6         696  
  15         95  
  72         166  
  72         180  
  86         174  
  86         185882  
  25         66  
  25         113  
  5         45  
  62         233898  
  63         238  
  83         147  
  26         111  
  85         392  
  17         65  
  40         293  
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. Will use C feature automatically.
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