WWW::Opentracker::Stats::Mode::TPBS - WWW::Opentracker::Stats::Mode::TPBS documentation


WWW-Opentracker-Stats documentation Contained in the WWW-Opentracker-Stats distribution.

Index


Code Index:

NAME

Top

WWW::Opentracker::Stats::Mode::TPBS

DESCRIPTION

Top

Parses the TPBS statistics from opentracker.

METHODS

Top

parse_stats

 Args: $self, $payload

Decodes the bencoded payload data retrieved from the TPBS statistics of opentracker.

SEE ALSO

WWW::Opentracker::Stats::Mode::TPBS::Bencode, WWW::Opentracker::Stats::Mode

AUTHOR

Top

Knut-Olav Hoven, <knutolav@gmail.com>

COPYRIGHT AND LICENSE

Top


WWW-Opentracker-Stats documentation Contained in the WWW-Opentracker-Stats distribution.
package WWW::Opentracker::Stats::Mode::TPBS;

use strict;
use warnings;

use parent qw/
    WWW::Opentracker::Stats::Mode
    Class::Accessor::Fast
/;

use WWW::Opentracker::Stats::Mode::TPBS::Bencode;

__PACKAGE__->_format('ben');
__PACKAGE__->_mode('tpbs');

__PACKAGE__->mk_accessors(qw/_stats/);


sub parse_stats {
    my ($self, $payload) = @_;

    return WWW::Opentracker::Stats::Mode::TPBS::Bencode->decode_stats($payload);
}


1;