NAME
Net::MRT - Perl extension for fast decode of MRT RAW data
SYNOPSIS
Decode uncompressed MRT file:
use Net::MRT;
open(C, '<', 'file');
binmode(C);
while ($decode = Net::MRT::mrt_read_next(C))
{
do_something_useful($decode);
}
In-memory download/decode:
use LWP::Simple;
use PerlIO::gzip;
use Net::MRT;
$LWP::Simple::ua->show_progress(1);
$archive = get($url);
open $mrt, "<:gzip", \$archive or die $!;
while ($dd = Net::MRT::mrt_read_next($mrt)) { do_something_useful($decode); }
# Note: In case of errors, reported message offset will be relative to Perl internal buffer
Decode some message of known type/subtype:
$hash = Net::MRT::mrt_decode_single($type, $subtype, $buffer);
DESCRIPTION
Net::MRT::mrt_read_next Decodes next message from filehandle
NOTE Always set binary mode before call to mrt_read_next or got unexpected results.
Net::MRT::mrt_decode_single Decodes message of specified type & subtype. See t/* for a lot of examples
TODO TODO
EXPORT
None by default.
Methods
Net::MRT::mrt_read_next
TODO TODO
Net::MRT::mrt_decode_single
TODO TODO
SEE ALSO
http://tools.ietf.org/html/draft-ietf-grow-mrt-13
http://www.ripe.net/data-tools/stats/ris/ris-raw-data
AUTHOR
MaxiM Basunov, <maxim.basunov@gmail.com>
MODIFICATION HISTORY
See the Changes file.
COPYRIGHT AND LICENSE
Copyright (C) 2013 MaxiM Basunov <maxim.basunov@gmail.com> All rights reserved.
This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.