Skip Menu |

This queue is for tickets about the XML-Toolkit CPAN distribution.

Report information
The Basics
Id: 68944
Status: new
Priority: 0/
Queue: XML-Toolkit

People
Owner: Nobody in particular
Requestors: charles.minc [...] wanadoo.fr
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.14
Fixed in: (no value)



Subject: tricky documentation
This statement is wrong and run silently: my $document = MyApp::Note->new( to_collection => [MyApp::To->new(text => 'Bob')], from_collection => [MyApp::From->new(text => 'Alice')], headings => [MyApp::Heading->new(text => 'Secret' )], body_collection => [MyApp::Body->new(text=>'Shh!')], The correct one is the following : my $document = MyApp::Note->new( tos => [MyApp::To->new(text => 'Bob')], froms => [MyApp::From->new(text => 'Alice')], headings => [MyApp::Heading->new(text => 'Secret' )], bodys => [MyApp::Body->new(text=>'Shh!')], and so on ... But you can write : $document->add_to( MyApp::To->new(text => 'Pierre')) ; or my $ele=MyApp::To->new(text=>'toto') ; push (@{$document->{to_collection}},$ele ) ; #push (@{$document->{tos}},$ele ) ; # don't work Regards. Charles