Ævar Arnfjörð Bjarmason > Net-FCP-Tiny > Net::FCP::Tiny

Download:
Net-FCP-Tiny-0.03.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.03   Source  

NAME ^

Net::FCP::Tiny - A Tiny and incomplete interface to the Freenet Client Protocol (FCPv2)

SYNOPSIS ^

    use Net::FPC::Tiny;

    my $fcp = Net::FCP::Tiny->new(
        name => 'Freenet Munin Plugin',
        host => $ENV{FREENET_HOST},
        port => $ENV{FREENET_PORT},
    );

    my $info = $fcp->array2hash($fcp->send_msg(<<'END'));
GetNode
WithPrivate=false
WithVolatile=true
EndMessage
END

    print "Java is using ", $info->{"volatile.usedJavaMemory"}, " bytes of memory";

DESCRIPTION ^

This is a tiny (~60 line) and stupid wrapper that talks the Freenet Client Protocol. It sets up a communication channel for you, and you can send messages by copy/pasting examples from the FCPv2 docs.

I wrote it for a munin plugin because Net::FCP was ancient, and AnyEvent::FCP hurt my brain.

AUTHOR ^

Ævar Arnfjörð Bjarmason <avar@cpan.org>

LICENSE AND COPYRIGHT ^

Copyright 2010 Ævar Arnfjörð Bjarmason <avar@cpan.org>

This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: