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