| 1 | |||
| 2 | package PRANG::Cookbook::Book; | ||
| 3 | 2 | $PRANG::Cookbook::Book::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 'isbn' => | |
| 10 | is => 'rw', | ||
| 11 | isa => 'Str', | ||
| 12 | ; | ||
| 13 | |||
| 14 | # elements | ||
| 15 | 2 | has_element 'title' => | |
| 16 | xml_nodeName => 'title', | ||
| 17 | is => 'rw', | ||
| 18 | isa => 'Str', | ||
| 19 | xml_required => 1, | ||
| 20 | required => 1, | ||
| 21 | ; | ||
| 22 | |||
| 23 | 2 | has_element 'author' => | |
| 24 | xml_nodeName => 'author', | ||
| 25 | is => 'rw', | ||
| 26 | isa => 'ArrayRef[Str]', | ||
| 27 | xml_required => 1, | ||
| 28 | required => 1, | ||
| 29 | ; | ||
| 30 | |||
| 31 | 2 | has_element 'pages' => | |
| 32 | xml_nodeName => 'pages', | ||
| 33 | is => 'rw', | ||
| 34 | isa => 'Int', | ||
| 35 | xml_required => 1, | ||
| 36 | required => 1, | ||
| 37 | ; | ||
| 38 | |||
| 39 | 2 | has_element 'published' => | |
| 40 | xml_nodeName => 'published', | ||
| 41 | is => 'rw', | ||
| 42 | isa => 'PRANG::Cookbook::Date', | ||
| 43 | xml_required => 0, | ||
| 44 | ; | ||
| 45 | |||
| 46 | 2 | ▶ | sub root_element {'book'} |
|
Subroutine
root_element: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 47 | 2 | with 'PRANG::Cookbook'; | |
| 48 | |||
| 49 | 2 | 1; | |