Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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) = ''; my($perlmonksURL_node) = ''; my($perlmonksURL_id) = ''; my($perlmonksURL_cpan) = ' +ery='; my($perlmonksURL_google) = '';
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
Replies are listed 'Best First'.
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 ...

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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (11)
As of 2015-12-01 17:04 GMT
Find Nodes?
    Voting Booth?

    My keyboard shows this many letters:

    Results (21 votes), past polls