Beefy Boxes and Bandwidth Generously Provided by pair Networks kudra
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Perl/Tk Chatterbox Client

by chipmunk (Parson)
on May 08, 2001 at 22:46 UTC ( #78926=note: print w/ replies, xml ) Need Help??


in reply to Perl/Tk Chatterbox Client

Update to accept the new google:// links, in addition to the cpan:// links:

Replace the section for the perlmonks URLs with this code:

# URL to use for links into perlmonks, cpan, and google my($perlmonksURL_base) = 'http://www.perlmonks.org/'; my($perlmonksURL_node) = 'http://www.perlmonks.org/index.pl?node='; my($perlmonksURL_id) = 'http://www.perlmonks.org/index.pl?node_id='; my($perlmonksURL_cpan) = 'http://search.cpan.org/search?mode=module&qu +ery='; my($perlmonksURL_google) = 'http://www.google.com/search?q=';
And update part of the launchBrowser sub with this code (also fixed those escaped slashes...):
printMessage("\n*Launching browser for node $node..."); if ($node =~ s,^id://,,) { $url = $perlmonksURL_id . $n +ode; } elsif ($node =~ s,^node_id=,,) { $url = $perlmonksURL_id . $n +ode; } elsif ($node =~ s,^cpan://,,) { $url = $perlmonksURL_cpan . $n +ode; } elsif ($node =~ s,^google://,,) { $url = $perlmonksURL_google . $n +ode; } elsif ($node =~ m,^http:,) { $url = $node; + } elsif ($node =~ s,^/+,,) { $url = $perlmonksURL_base . $n +ode; } else { $url = $perlmonksURL_node . $n +ode; }


Comment on Re: Perl/Tk Chatterbox Client
Select or Download Code
Re: Re: Perl/Tk Chatterbox Client
by idnopheq (Chaplain) on May 08, 2001 at 22:51 UTC
    I did
    elsif ($node =~ s/^google:\/\///) { $node =~ s/\s/%20/g; $url = $perlmonksURL_google . $node;
    to take care of the spaces. Still won't get too funky ...

    HTH
    --
    idnopheq
    Apply yourself to new problems without preparation, develop confidence in your ability to to meet situations as they arrise.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://78926]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2014-04-18 22:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (472 votes), past polls