TOC/Role/Node.pm

filter: Statementstmt 100% 28 / 28 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 100% 35 / 35 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« TOC/Role/Filter.pm ↑ Summary TOC/Role/OutputHandler.pm »
1 package Text::TOC::Role::Node;
2 {
3 2 $Text::TOC::Role::Node::VERSION = '0.10';
4 }
5  
6 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 2 ▶use Moose::Util::TypeConstraints qw( class_type );
Subroutine BEGIN: called CC=1 SCAR=0.0
11 2 ▶use Text::TOC::Types qw( File Str );
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 2 ▶use MooseX::Role::Parameterized;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 2 has type => (
16 is => 'ro',
17 isa => Str,
18 required => 1,
19 );
20  
21 2 has anchor_name => (
22 is => 'ro',
23 isa => Str,
24 required => 1,
25 );
26  
27 2 has source_file => (
28 is => 'ro',
29 isa => File,
30 required => 1,
31 );
32  
33 2 parameter contents_type => (
34 is => 'ro',
35 isa => Str | class_type('Moose::Meta::TypeConstraint'),
36 required => 1,
37 );
38  
39 2 ▶role {
Subroutine __ANON__: called CC=1 SCAR=0.0
40 2 my $p = shift;
41  
42 2 has contents => (
43 is => 'ro',
44 isa => $p->contents_type(),
45 required => 1,
46 );
47 2 };
48  
49 2 1;
50  
51 # ABSTRACT: A role for nodes
52  
53  
54 __END__
« TOC/Role/Filter.pm ↑ Summary TOC/Role/OutputHandler.pm »