Elemental/Types.pm

filter: Statementstmt 100% 20 / 20 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 96.5% 28 / 29 CC 2 SCAR 2.4
CC
2
Cov
95%
__ANON__
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Elemental/Element/Generic/Blank.pm ↑ Summary Elemental.pm »
1 14 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 14 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 package Pod::Elemental::Types 0.103006;
4 # ABSTRACT: data types for Pod::Elemental
5  
6 14 ▶use MooseX::Types -declare => [ qw(FormatName ChompedString) ];
Subroutine BEGIN: called CC=1 SCAR=0.0
7 14 ▶use MooseX::Types::Moose qw(Str);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 #pod =head1 OVERVIEW
10 #pod
11 #pod This is a library of MooseX::Types types used by Pod::Elemental.
12 #pod
13 #pod =head1 TYPES
14 #pod
15 #pod =head2 FormatName
16 #pod
17 #pod This is a valid name for a format (a Pod5::Region). It does not expect the
18 #pod leading colon for pod-like regions.
19 #pod
20 #pod =cut
21  
22 # Probably needs refining -- rjbs, 2009-05-26
23 20 ▶subtype FormatName, as Str, where { length $_ and /\A\S+\z/ };
Subroutine __ANON__: called CC=2 SCAR=7.2
Branch: 1 branch
BranchTrueFalseTotal
length $_ and /\A\S+\z/ 20 0 20
24  
25 #pod =head2 ChompedString
26 #pod
27 #pod This is a string that does not end with newlines. It can be coerced from a
28 #pod Str ending in a single newline -- the newline is dropped.
29 #pod
30 #pod =cut
31  
32 228 ▶subtype ChompedString, as Str, where { ! /\n\z/ };
Subroutine __ANON__: called CC=1 SCAR=0.0
33 107 ▶coerce ChompedString, from Str, via { chomp; $_ };
Subroutine __ANON__: called CC=1 SCAR=0.0
34  
35 14 1;
36  
37 __END__
« Elemental/Element/Generic/Blank.pm ↑ Summary Elemental.pm »