| 1 | package HTTP::OAI::Set; | ||||||||||
| 2 | |||||||||||
| 3 | 11 | @ISA = qw( HTTP::OAI::MemberMixin XML::SAX::Base ); | |||||||||
| 4 | |||||||||||
| 5 | 11 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 11 | our $VERSION = '4.13'; | |||||||||
| 8 | |||||||||||
| 9 | 0 | ▶ | sub setSpec { shift->_elem('setSpec',@_) } | ||||||||
|
Subroutine
setSpec: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 10 | 0 | ▶ | sub setName { shift->_elem('setName',@_) } | ||||||||
|
Subroutine
setName: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 11 | 0 | ▶ | sub setDescription { shift->_multi('setDescription',@_) } | ||||||||
|
Subroutine
setDescription: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 12 | |||||||||||
| 13 | 0 | ▶ | sub generate { | ||||||||
|
Subroutine
generate: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 14 | 0 | my( $self, $driver ) = @_; | |||||||||
| 15 | |||||||||||
| 16 | 0 | $driver->start_element( 'set' ); | |||||||||
| 17 | 0 | $driver->data_element( 'setSpec', $self->setSpec ); | |||||||||
| 18 | 0 | $driver->data_element( 'setName', $self->setName ); | |||||||||
| 19 | 0 | for( $self->setDescription ) { | |||||||||
| 20 | 0 | $_->generate; | |||||||||
| 21 | } | ||||||||||
| 22 | 0 | $driver->end_element( 'set' ); | |||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | 0 | ▶ | sub start_element { | ||||||||
|
Subroutine
start_element: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 26 | 0 | my ($self,$hash,$r) = @_; | |||||||||
| 27 | 0 | my $elem = lc($hash->{Name}); | |||||||||
| 28 | 0 | ▶ | if( $elem eq 'setdescription' ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 29 | 0 | $self->setDescription(my $desc = HTTP::OAI::Metadata->new); | |||||||||
| 30 | 0 | $self->set_handler($desc); | |||||||||
| 31 | 0 | $self->{in_desc} = $hash->{Depth}; | |||||||||
| 32 | } | ||||||||||
| 33 | 0 | $self->SUPER::start_element($hash,$r); | |||||||||
| 34 | } | ||||||||||
| 35 | 0 | ▶ | sub end_element { | ||||||||
|
Subroutine
end_element: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||
| 36 | 0 | my ($self,$hash,$r) = @_; | |||||||||
| 37 | 0 | $self->SUPER::end_element($hash,$r); | |||||||||
| 38 | 0 | ▶ | if( $self->{in_desc} ) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 39 | { | ||||||||||
| 40 | 0 | ▶ | if( $self->{in_desc} == $hash->{Depth} ) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 41 | { | ||||||||||
| 42 | 0 | $self->set_handler( undef ); | |||||||||
| 43 | } | ||||||||||
| 44 | } | ||||||||||
| 45 | else | ||||||||||
| 46 | { | ||||||||||
| 47 | 0 | my $elem = $hash->{Name}; | |||||||||
| 48 | 0 | ▶ | if( $elem =~ /^setSpec|setName$/ ) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 49 | { | ||||||||||
| 50 | 0 | $self->$elem( $hash->{Text} ); | |||||||||
| 51 | } | ||||||||||
| 52 | } | ||||||||||
| 53 | } | ||||||||||
| 54 | |||||||||||
| 55 | 11 | 1; | |||||||||
| 56 | |||||||||||
| 57 | __END__ | ||||||||||