孙海军 > BBS-Perm-v0.0.3 > BBS::Perm::Plugin::IP

Download:
BBS-Perm-v0.0.3.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.0.3   Source  

NAME ^

BBS::Perm::Plugin::IP - render IP infomation for BBS::Perm

VERSION ^

This document describes BBS::Perm::Plugin::IP version 0.0.3

SYNOPSIS ^

    use BBS::Perm::Plugin::IP;
    my $ip = BBS::Perm::Plugin::IP->new( qqwry => '/opt/QQWry.Dat' );
    $ip->add('166.111.166.111');
    my $statusbar = $ip->widget;

DESCRIPTION ^

BBS::Perm::Plugin::IP is a plugin of BBS::Perm for IP infomation. It's used to extract IPv4 address and get some information about the IP. Its widget is a Gtk2::Statusbar object, which is used to show the infomation.

INTERFACE ^

new( encoding => $encoding, widget => $widget, qqwry => $path )

create a new BBS::Perm::Plugin::IP object.

$encoding is your QQWry.Dat's encoding, default is 'gbk';

$widget is a Gtk2::Statusbar object, default is a new one.

$path is your QQWry.Dat's path.

ip

get a arrayref referred to a list of IP information in our object. each element of the list is a arrayref which is [ $ip, $base, $ext ]. see IP::QQWry for the meaning of $base and $ext.

add($ip)

add $ip's infomation to our object.

remove($ip)

remove $ip's information from our object

show

Get a presentation of all the IP information our object has.

clear

clear all the IP information in our object.

widget

return out object's widget, which is a Gtk2::Statusbar object.

DEPENDENCIES ^

IP::QQWry, Regexp::Common, Encode, version

INCOMPATIBILITIES ^

None reported.

BUGS AND LIMITATIONS ^

No bugs have been reported.

AUTHOR ^

sunnavy <sunnavy@gmail.com>

LICENCE AND COPYRIGHT ^

Copyright (c) 2007, sunnavy <sunnavy@gmail.com>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.