File Coverage

blib/lib/WARC/Index/Builder.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package WARC::Index::Builder; # -*- CPerl -*-
2              
3 5     5   67805 use strict;
  5         13  
  5         139  
4 5     5   75 use warnings;
  5         17  
  5         379  
5              
6             our @ISA = qw();
7              
8             require WARC; *WARC::Index::Builder::VERSION = \$WARC::VERSION;
9              
10             =head1 NAME
11              
12             WARC::Index::Builder - abstract base class for building indexes
13              
14             =head1 SYNOPSIS
15              
16             use WARC::Index;
17              
18             $cdx_builder = build WARC::Index::File::CDX (...);
19             $sdbm_builder = build WARC::Index::File::SDBM (...);
20              
21             $cdx_entry = $cdx_builder->add($record);
22             $sdbm_builder->add($cdx_entry);
23              
24             =head1 DESCRIPTION
25              
26             C is an abstract base class for constructing indexes
27             on WARC files. The interface is documented here, but implemented in
28             specialized classes for each index type.
29              
30             =head2 Methods
31              
32             =over
33              
34             =item $entry = $builder-Eadd( ... )
35              
36             Add an item to the growing index. All index types accept both WARC records
37             and entries from other indexes, although only metaindex-capable formats use
38             the latter. Any number of items may be added with a single call.
39              
40             Returns the new index entry.
41              
42             =back
43              
44             =cut
45              
46             1;
47             __END__