Help for this page

Select Code to Download


  1. or download this
     <note>
         <to>Bob</to>
    ...
         <heading>Secret</heading>
         <body>Shhh!</body>
     </note>
    
  2. or download this
      my $document = MyApp::Note->new(
            to_collection => [MyApp::To->new(text => 'Bob')],
    ...
            headings => [MyApp::Heading->new(text => 'Secret' )],
            body_collection => [MyApp::Body->new(text=>'Shh!')],
        )
    
  3. or download this
    my %data = ( to => 'Bob', 
      from => 'Alice',
    ...
    );
    MyApp::Note->new(data => \%data)->tree->as_XML;
    
  4. or download this
    my %data = ( george => [ { age => 45} , 'some content' ] );
    
  5. or download this
    my %data = ( george => 'some content' ] );
    my %attr = ( george => {age 45 });
    
  6. or download this
    
        # call the superclass to render the simple data in the hashref
    ...
        }
        $lol;