Created
June 24, 2012 03:50
-
-
Save jashank/2981483 to your computer and use it in GitHub Desktop.
Converting collection to individual
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
has 'Title' => ( | |
isa => 'Scrivener::Title', | |
is => 'ro', | |
traits => [qw(XML)], | |
lazy => 1, | |
description => { | |
LocalName => "Title", | |
Prefix => "", | |
node_type => "child", | |
Name => "Title", | |
NamespaceURI => "", | |
sort_order => 7, | |
}, | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
has 'Title_collection' => ( | |
isa => 'ArrayRef[Scrivener::Title]', | |
is => 'ro', init_arg => 'Titles', | |
traits => [qw(XML Array)], | |
lazy => 1, | |
auto_deref => 1, | |
default => sub { [] }, | |
handles => { add_Title => ['push'] }, description => { | |
LocalName => "Title", | |
Prefix => "", | |
node_type => "child", | |
Name => "Title", | |
NamespaceURI => "", | |
sort_order => 7, | |
}, | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment