Help for this page

Select Code to Download


  1. or download this
        ...
        <Persons>
    ...
          <Person>...</Person>
        </Persons>
        ...
    
  2. or download this
    my $persons = $parent->{Persons};
    
    ...
        : !$persons->{Person}      ? ()
        : !ref($persons->{Person}) ? $persons->{Person}
        :                            @{ $persons->{Person} };
    
  3. or download this
    GroupTags  => { Persons => 'Person' },
    ForceArray => [qw( Person )],
    
    my @persons = $parent->{Persons} ? @{ $parent->{Persons} } : ();
    
  4. or download this
    my @persons = $parent->findnodes('Persons/Person');
    
  5. or download this
        ...
        <Person>
    ...
          ...
        </Person>
        ...
    
  6. or download this
    my $country =
          !defined($person->{Country}) ? undef
        : !ref($person->{Country})     ? $person->{Country}
        :                                $person->{Country}{content};
    
  7. or download this
    my $country = $person->{Country} && $person->{Country}{content}
    
  8. or download this
    my $country = $person->findvalue('Country');