The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

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

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.

AUTHOR

sunnavy <sunnavy@gmail.com>

LICENCE AND COPYRIGHT

Copyright (c) 2007-2011, sunnavy <sunnavy@gmail.com>.

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