Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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; }

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 pondering the Monastery: (8)
As of 2016-10-27 08:57 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (355 votes). Check out past polls.