WARC::Index::Builder - abstract base class for building indexes
use WARC::Index; $cdx_builder = build WARC::Index::File::CDX (...); $sdbm_builder = build WARC::Index::File::SDBM (...); $cdx_entry = $cdx_builder->add($record); $sdbm_builder->add($cdx_entry);
WARC::Index::Builder is an abstract base class for constructing indexes on WARC files. The interface is documented here, but implemented in specialized classes for each index type. Some common code has also been moved to this class, and is also documented here.
WARC::Index::Builder
Add items to the growing index. All index types accept both WARC records and entries from other indexes, although only metaindex-capable formats use the latter. Any number of items may be added with a single call.
Returns nothing.
The WARC::Index::Builder base class provides an implementation of this method that dispatches to the internal _add_* methods listed below.
Write any buffered data to the underlying storage. After calling this method, all records added using this builder should be visible. Some index systems do this implicitly; this method is a no-op in those cases.
Add one WARC::Record to the index.
Add one WARC::Index::Entry to the index.
The WARC::Index::Builder base class provides a default implementation that adds the corresponding record instead.
Add all entries from an enumerable index to the index.
The WARC::Index::Builder base class provides a default implementation.
Add all records from a WARC::Volume to the index.
Jacob Bachmeyer, <jcb@cpan.org>
WARC, WARC::Index
Copyright (C) 2019 by Jacob Bachmeyer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install WARC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WARC
CPAN shell
perl -MCPAN -e shell install WARC
For more information on module installation, please visit the detailed CPAN module installation guide.