File Coverage

blib/lib/PRANG/Cookbook/Note.pm
Criterion Covered Total %
statement 10 10 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 14 15 93.3


line stmt bran cond sub pod time code
1              
2             package PRANG::Cookbook::Note;
3             $PRANG::Cookbook::Note::VERSION = '0.21';
4 2     2   3080 use Moose;
  2         5  
  2         21  
5 2     2   13653 use PRANG::Graph;
  2         7  
  2         15  
6 2     2   21101 use PRANG::XMLSchema::Types;
  2         6  
  2         376  
7              
8             # attributes
9             has_attr 'replied' =>
10             is => 'rw',
11             isa => 'PRANG::XMLSchema::boolean',
12             required => 0,
13             xml_required => 0,
14             ;
15              
16             # elements
17             has_element 'from' =>
18             xml_nodeName => 'from',
19             is => 'rw',
20             isa => 'Str',
21             xml_required => 1,
22             required => 1,
23             ;
24              
25             has_element 'to' =>
26             xml_nodeName => 'to',
27             is => 'rw',
28             isa => 'Str',
29             xml_required => 1,
30             required => 1,
31             ;
32              
33             has_element 'sent' =>
34             xml_nodeName => 'sent',
35             is => 'rw',
36             isa => 'PRANG::Cookbook::DateTime',
37             xml_required => 0,
38             ;
39              
40             has_element 'location' =>
41             xml_nodeName => 'location',
42             is => 'rw',
43             isa => 'PRANG::Cookbook::Location',
44             xml_required => 0,
45             ;
46              
47             has_element 'subject' =>
48             xml_nodeName => 'subject',
49             is => 'rw',
50             isa => 'Str',
51             xml_required => 1,
52             required => 1,
53             ;
54              
55             has_element 'body' =>
56             xml_nodeName => 'body',
57             is => 'rw',
58             isa => 'Str',
59             required => 0,
60             xml_required => 0,
61             ;
62              
63 14     14 0 80 sub root_element {'note'}
64             with 'PRANG::Cookbook';
65              
66             1;
67              
68             =pod
69              
70             =head1 NAME
71              
72             PRANG::Cookbook::Note - Basic PRANG Features
73              
74             =head1 DESCRIPTION
75              
76             This recipe series gives you a good overview of PRANG's capabilites starting
77             with simple XML elements and attributes.
78              
79             ...
80              
81             =head1 CONCLUSION
82              
83             ...
84              
85             =head1 AUTHOR
86              
87             Andrew Chilton, E<lt>andy@catalyst dot net dot nz<gt>
88              
89             =head1 COPYRIGHT & LICENSE
90              
91             This software development is sponsored and directed by New Zealand Registry
92             Services, http://www.nzrs.net.nz/
93              
94             The work is being carried out by Catalyst IT, http://www.catalyst.net.nz/
95              
96             Copyright (c) 2009, NZ Registry Services. All Rights Reserved. This software
97             may be used under the terms of the Artistic License 2.0. Note that this
98             license is compatible with both the GNU GPL and Artistic licenses. A copy of
99             this license is supplied with the distribution in the file COPYING.txt.
100              
101             =cut