| 1 | package HTTP::OAI::ResumptionToken; | ||||||||||
| 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 | ▶ | use overload "bool" => \¬_empty; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 11 | our $VERSION = '4.13'; | |||||||||
| 10 | |||||||||||
| 11 | 6 | ▶ | sub resumptionToken { shift->_elem('resumptionToken',@_) } | ||||||||
|
Subroutine
resumptionToken: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 12 | 0 | ▶ | sub expirationDate { shift->_elem('expirationDate',@_) } | ||||||||
|
Subroutine
expirationDate: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 13 | 0 | ▶ | sub completeListSize { shift->_elem('completeListSize',@_) } | ||||||||
|
Subroutine
completeListSize: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 14 | 0 | ▶ | sub cursor { shift->_elem('cursor',@_) } | ||||||||
|
Subroutine
cursor: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 15 | |||||||||||
| 16 | 2 | ▶ | sub not_empty { defined($_[0]->resumptionToken) and length($_[0]->resumptionToken) > 0 } | ||||||||
|
Subroutine
not_empty: called CC=2 SCAR=7.6
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 17 | 0 | ▶ | sub is_empty { !not_empty(@_) } | ||||||||
|
Subroutine
is_empty: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 18 | |||||||||||
| 19 | 0 | ▶ | sub generate { | ||||||||
|
Subroutine
generate: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 20 | 0 | my( $self, $driver ) = @_; | |||||||||
| 21 | |||||||||||
| 22 | 0 | $driver->data_element( 'resumptionToken', $self->resumptionToken, | |||||||||
| 23 | expirationDate => scalar($self->expirationDate), | ||||||||||
| 24 | completeListSize => scalar($self->completeListSize), | ||||||||||
| 25 | cursor => scalar($self->cursor), | ||||||||||
| 26 | ); | ||||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | 0 | ▶ | sub end_element { | ||||||||
|
Subroutine
end_element: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 30 | 0 | my ($self,$hash) = @_; | |||||||||
| 31 | 0 | $self->SUPER::end_element($hash); | |||||||||
| 32 | 0 | ▶ | if( lc($hash->{LocalName}) eq 'resumptiontoken' ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 33 | 0 | $self->resumptionToken($hash->{Text}); | |||||||||
| 34 | |||||||||||
| 35 | 0 | my $attr = $hash->{Attributes}; | |||||||||
| 36 | 0 | $self->expirationDate($attr->{'{}expirationDate'}->{'Value'}); | |||||||||
| 37 | 0 | $self->completeListSize($attr->{'{}completeListSize'}->{'Value'}); | |||||||||
| 38 | 0 | $self->cursor($attr->{'{}cursor'}->{'Value'}); | |||||||||
| 39 | } | ||||||||||
| 40 | } | ||||||||||
| 41 | |||||||||||
| 42 | 11 | 1; | |||||||||
| 43 | |||||||||||
| 44 | __END__ | ||||||||||