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

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::URI - render quickly URI submittal for BBS::Perm

VERSION ^

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

SYNOPSIS ^

    use BBS::Perm::Plugin::URI;
    my $uri = BBS::Perm::Plugin::URI->new( browser => 'firefox -new-tab');
    my $button = $uri->widget;
    $uri->push( 'http://cpan.org' );
    $uri->pop;
    $uri->clear;

DESCRIPTION ^

BBS::Perm::Plugin::URI is a plugin of BBS::Perm for quickly submitting URI If current text has some URI such as http://www.cpan.org, you can use your browser to visit it, just hit Alt+Numer, where Number is the position of the URI appears. If it's the first URI on our screen, the Number is 1. If it's the 5th URI, the Number is 5. And so on, till 9. Alt+0 will visit your default URI. If there's no the Nth URI when you submit Alt+N, you'll visit the last URI.

Yeah, I know, it's not elegant, but in BBS world, URI is rare, so it's not a critical problem, IMHO, ;-)

To make this work, you have to enable BBS::Perm's accel option.

INTERFACE ^

new( browser => $browser, widget => $widget )

create a new BBS::Perm::Plugin::URI object

$browser is your command to visit the URI, which will be provideed as the argument.

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

widget

get the widget of our object.

push($uri)

push $uri to our object.

pop

pop one URI from our object.

uri

get a arrayref referred to a list of URIs in our object.

size

get the number of URIs in our object.

clear

clear URIs in our object.

DEPENDENCIES ^

Gtk2, 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.