blib/lib/MooseX/Types/Buf.pm

filter: Statementstmt 96.0% 24 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 88.8% 8 / 9 Podpod n/a totaltotal 94.1% 32 / 34 CC 1 SCAR 0.1
CC
1
Cov
96%
__ANON__
1.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
↑ Summary
1 package MooseX::Types::Buf;
2  
3 1 ▶use 5.008;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 our $VERSION = '0.01';
8  
9 1 ▶use Encode ();
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Moose::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 2 ▶subtype Buf => as 'Str' => where { not Encode::is_utf8($_) };
Subroutine __ANON__: called CC=1 SCAR=0.0
14  
15 1 ▶coerce Buf => from Str => via { Encode::encode_utf8($_) };
Subroutine __ANON__: called CC=1 SCAR=0.0
16 0 ▶coerce Str => from Buf => via { $_ };
Subroutine __ANON__: not called CC=1 SCAR=1.2
17  
18 1 1;
19  
20 __END__
↑ Summary