| 1 | package WARC::Index::File::CDX::Entry; # -*- CPerl -*- | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 2 | require WARC::Index::Entry; | |||||||||
| 7 | 2 | our @ISA = qw(WARC::Index::Entry); | |||||||||
| 8 | |||||||||||
| 9 | 2 | require WARC; *WARC::Index::File::CDX::Entry::VERSION = \$WARC::VERSION; | |||||||||
| 10 | |||||||||||
| 11 | # This implementation uses a hash as the underlying structure. | ||||||||||
| 12 | |||||||||||
| 13 | # Accessible search keys are stored directly in the hash, while internal | ||||||||||
| 14 | # values are stored with names with a leading underscore. | ||||||||||
| 15 | |||||||||||
| 16 | 1 | ▶ | sub index { (shift)->{_index} } | ||||||||
|
Subroutine
index: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 17 | 30 | ▶ | sub volume { (shift)->{_g__volume} } | ||||||||
|
Subroutine
volume: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 18 | 1 | ▶ | sub entry_position { (shift)->{_entry_offset} } | ||||||||
|
Subroutine
entry_position: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 19 | 30 | ▶ | sub record_offset { (shift)->{_Vv__record_offset} } | ||||||||
|
Subroutine
record_offset: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 20 | |||||||||||
| 21 | sub next { | ||||||||||
| 22 | 13 | ▶ | my $self = shift; | ||||||||
|
Subroutine
next: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 23 | |||||||||||
| 24 | return $self->{_index}->entry_at($self->{_entry_offset} | ||||||||||
| 25 | 13 | + $self->{_entry_length}); | |||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | sub value { | ||||||||||
| 29 | 96 | ▶ | my $self = shift; | ||||||||
|
Subroutine
value: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 30 | 96 | my $key = shift; | |||||||||
| 31 | |||||||||||
| 32 | 96 | ▶ | return undef if $key =~ m/^_/; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 33 | 94 | return $self->{$key}; | |||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | 2 | 1; | |||||||||
| 37 | __END__ | ||||||||||