| 1 | |||
| 2 | package PRANG::Cookbook::Note; | ||
| 3 | 2 | $PRANG::Cookbook::Note::VERSION = '0.21'; | |
| 4 | 2 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 2 | ▶ | use PRANG::Graph; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 2 | ▶ | use PRANG::XMLSchema::Types; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | # attributes | ||
| 9 | 2 | has_attr 'replied' => | |
| 10 | is => 'rw', | ||
| 11 | isa => 'PRANG::XMLSchema::boolean', | ||
| 12 | required => 0, | ||
| 13 | xml_required => 0, | ||
| 14 | ; | ||
| 15 | |||
| 16 | # elements | ||
| 17 | 2 | has_element 'from' => | |
| 18 | xml_nodeName => 'from', | ||
| 19 | is => 'rw', | ||
| 20 | isa => 'Str', | ||
| 21 | xml_required => 1, | ||
| 22 | required => 1, | ||
| 23 | ; | ||
| 24 | |||
| 25 | 2 | has_element 'to' => | |
| 26 | xml_nodeName => 'to', | ||
| 27 | is => 'rw', | ||
| 28 | isa => 'Str', | ||
| 29 | xml_required => 1, | ||
| 30 | required => 1, | ||
| 31 | ; | ||
| 32 | |||
| 33 | 2 | has_element 'sent' => | |
| 34 | xml_nodeName => 'sent', | ||
| 35 | is => 'rw', | ||
| 36 | isa => 'PRANG::Cookbook::DateTime', | ||
| 37 | xml_required => 0, | ||
| 38 | ; | ||
| 39 | |||
| 40 | 2 | has_element 'location' => | |
| 41 | xml_nodeName => 'location', | ||
| 42 | is => 'rw', | ||
| 43 | isa => 'PRANG::Cookbook::Location', | ||
| 44 | xml_required => 0, | ||
| 45 | ; | ||
| 46 | |||
| 47 | 2 | has_element 'subject' => | |
| 48 | xml_nodeName => 'subject', | ||
| 49 | is => 'rw', | ||
| 50 | isa => 'Str', | ||
| 51 | xml_required => 1, | ||
| 52 | required => 1, | ||
| 53 | ; | ||
| 54 | |||
| 55 | 2 | has_element 'body' => | |
| 56 | xml_nodeName => 'body', | ||
| 57 | is => 'rw', | ||
| 58 | isa => 'Str', | ||
| 59 | required => 0, | ||
| 60 | xml_required => 0, | ||
| 61 | ; | ||
| 62 | |||
| 63 | 10 | ▶ | sub root_element {'note'} |
|
Subroutine
root_element: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 64 | 2 | with 'PRANG::Cookbook'; | |
| 65 | |||
| 66 | 2 | 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 | ||