Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2018-03-19 16:32 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (244 votes). Check out past polls.