File Coverage

blib/lib/PRANG/Cookbook/Book.pm
Criterion Covered Total %
statement 4 6 66.6
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 6 8 75.0


line stmt bran cond sub pod time code
1              
2             package PRANG::Cookbook::Book;
3             $PRANG::Cookbook::Book::VERSION = '0.20';
4 1     1   2176 use Moose;
  1         3  
  1         6  
5 1     1   5738 use PRANG::Graph;
  0            
  0            
6             use PRANG::XMLSchema::Types;
7              
8             # attributes
9             has_attr 'isbn' =>
10             is => 'rw',
11             isa => 'Str',
12             ;
13              
14             # elements
15             has_element 'title' =>
16             xml_nodeName => 'title',
17             is => 'rw',
18             isa => 'Str',
19             xml_required => 1,
20             required => 1,
21             ;
22              
23             has_element 'author' =>
24             xml_nodeName => 'author',
25             is => 'rw',
26             isa => 'ArrayRef[Str]',
27             xml_required => 1,
28             required => 1,
29             ;
30              
31             has_element 'pages' =>
32             xml_nodeName => 'pages',
33             is => 'rw',
34             isa => 'Int',
35             xml_required => 1,
36             required => 1,
37             ;
38              
39             has_element 'published' =>
40             xml_nodeName => 'published',
41             is => 'rw',
42             isa => 'PRANG::Cookbook::Date',
43             xml_required => 0,
44             ;
45              
46             sub root_element {'book'}
47             with 'PRANG::Cookbook';
48              
49             1;