BuzzSaw
view release on metacpan or search on metacpan
lib/BuzzSaw/DataSource.pm view on Meta::CPAN
through all lines in a set of files - this will return the next line
in the file.
This method should use the L<BuzzSaw::DB> object C<start_processing>
and C<register_log> methods to avoid re-reading sources (unless the
C<readall> attribute is true). It is also expected to begin and end DB
transactions at appropriate times. For example, the Files data source
starts a transaction when a file is opened and ends the transaction
when the file is closed. This is designed to strike a balance between
efficiency and the need to commit regularly to avoid the potential for
data loss.
Note that this method does NOT return a parsed entry, it returns the
simple string which is the next single complete log entry. When the
data source is exhausted it will return the C<undef> value.
=item $source->reset
This method must reset the position of all (if any) internal iterators
to their initial values. This then leaves the data source back at the
original starting position. Note that this does not imply that a
second parsing would be identical to the first (e.g. files may have
disappeared in the meantime).
=back
The following methods are provided as they are commonly useful to most
possible data sources.
=over
=item $sum = $source->checksum_file($file)
This returns a string which is the base-64 encoded SHA-256 digest of
the contents of the specified file.
=item $sum = $source->checksum_data($data)
This returns a string which is the base-64 encoded SHA-256 digest of
the specified data.
=head1 DEPENDENCIES
This module is powered by L<Moose>, it also requires L<MooseX::Types>,
L<MooseX::Log::Log4perl> and L<MooseX::SimpleConfig>.
The L<Digest::SHA> module is also required.
=head1 SEE ALSO
L<BuzzSaw>, L<BuzzSaw::DataSource::Files>, L<DataSource::Importer>, L<BuzzSaw::DB>, L<BuzzSaw::Parser>
=head1 PLATFORMS
This is the list of platforms on which we have tested this
software. We expect this software to work on any Unix-like platform
which is supported by Perl.
ScientificLinux6
=head1 BUGS AND LIMITATIONS
Please report any bugs or problems (or praise!) to bugs@lcfg.org,
feedback and patches are also always very welcome.
=head1 AUTHOR
Stephen Quinney <squinney@inf.ed.ac.uk>
=head1 LICENSE AND COPYRIGHT
Copyright (C) 2012 University of Edinburgh. All rights reserved.
This library is free software; you can redistribute it and/or modify
it under the terms of the GPL, version 2 or later.
=cut
( run in 0.422 second using v1.01-cache-2.11-cpan-39bf76dae61 )