Home > Archive > PERL Miscellaneous > June 2005 > Viewing perldoc output on Win32 - Ideas an Opinions
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Viewing perldoc output on Win32 - Ideas an Opinions
|
|
|
| Chaps, any ideas on what the best way to view perldoc output on win32
is?
I mean pressing space bar, through long docs, and then realising what
you want is a couple of pages back up is a pain in the bumbum.
Anyone got any clever ideas on tools, redirecting output, regex
searching through the output etc?
| |
| John Bokma 2005-06-08, 3:59 pm |
| Bob wrote:
> Chaps, any ideas on what the best way to view perldoc output on win32
> is?
>
> I mean pressing space bar, through long docs, and then realising what
> you want is a couple of pages back up is a pain in the bumbum.
>
> Anyone got any clever ideas on tools, redirecting output, regex
> searching through the output etc?
How about using Firefox to look at the web pages? They come with the
ActiveState install (file:///C:/Perl/html/index.html)
--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
| |
|
|
John Bokma wrote:
> How about using Firefox to look at the web pages? They come with the
> ActiveState install (file:///C:/Perl/html/index.html)
Yep, I know, but I really prefer the immeadiacy of the command line;
ALT-TAB, "perldoc perldsc", mark-text, cntrl-C, ALT-TAB, cntrl-P,
sorted.
Know what I mean?
CMD is (all said and done), way quicker.
I just need a better viewing tool that perldoc would know about, and I
could use that to search through its output. More like a UNIX
environment, I suppose.
| |
| A. Sinan Unur 2005-06-08, 3:59 pm |
| "Bob" <tech2@questor.ch> wrote in news:1118252682.664293.290560
@g49g2000cwa.googlegroups.com:
> John Bokma wrote:
>
> Yep, I know, but I really prefer the immeadiacy of the command line;
> ALT-TAB, "perldoc perldsc", mark-text, cntrl-C, ALT-TAB, cntrl-P,
> sorted.
> Know what I mean?
>
> CMD is (all said and done), way quicker.
>
> I just need a better viewing tool that perldoc would know about, and I
> could use that to search through its output. More like a UNIX
> environment, I suppose.
I'll second John. There is nothing wrong with having 20 or so Firefox
tabs open to all the docs you want to look (especially since Firefox has
"find-as-you-type").
For quickies, I have the
PAGER=less
in my environment.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)
comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/c...guidelines.html
| |
| John Bokma 2005-06-08, 8:57 pm |
| Bob wrote:
>
>
> John Bokma wrote:
>
> Yep, I know, but I really prefer the immeadiacy of the command line;
> ALT-TAB, "perldoc perldsc", mark-text, cntrl-C, ALT-TAB, cntrl-P,
> sorted.
> Know what I mean?
>
> CMD is (all said and done), way quicker.
>
> I just need a better viewing tool that perldoc would know about, and I
> could use that to search through its output. More like a UNIX
> environment, I suppose.
I have a crappy, unfinished script that I call from TextPad. If I select a
module name, and execute the script, it gives search results with URLs etc
which I can open in Firefox. Sadly, textpad can't handle # (fragments) in
URLs at the moment (reported this).
--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
| |
| Damian James 2005-06-08, 8:57 pm |
| On 8 Jun 2005 10:44:42 -0700, Bob said:
>
>
> John Bokma wrote:
>
> Yep, I know, but I really prefer the immeadiacy of the command line;
> ALT-TAB, "perldoc perldsc", mark-text, cntrl-C, ALT-TAB, cntrl-P,
> sorted.
> Know what I mean?
>
> CMD is (all said and done), way quicker.
What's CMD? ;)
> I just need a better viewing tool that perldoc would know about, and I
> could use that to search through its output. More like a UNIX
> environment, I suppose.
Well, you could look around for a better terminal program then cmd.exe
and a better shell than the one cmd.exe proveds, or you could try a unix
environment for w*nd*ws. Have you come across cygwin yet?
--damian (who would have quit IT by now if forced to use the copy-paste
facilities in cmd.exe every day)
| |
| John Bokma 2005-06-09, 3:57 am |
| Damian James wrote:
> --damian (who would have quit IT by now if forced to use the copy-paste
> facilities in cmd.exe every day)
Works for me :-) You just have to tweak the default settings of cmd.exe
here and there. I have now nice colors, tab completion and copy/paste is
on: default. Also I made the buffer big.
--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
| |
| Jürgen Exner 2005-06-09, 3:57 am |
| Bob wrote:
> Chaps, any ideas on what the best way to view perldoc output on win32
> is?
>
> I mean pressing space bar, through long docs, and then realising what
> you want is a couple of pages back up is a pain in the bumbum.
Why not just set the "Height" for "Screen Buffer Size" to something like 500
or even 1000 and then just use the scroll bar on the right side to scroll
back up?
jue
| |
| babydoe@mailinator.com 2005-06-09, 3:57 am |
| A. Sinan Unur wrote:[color=darkred]
> "Bob" <tech2@questor.ch> wrote in news:1118252682.664293.290560
> @g49g2000cwa.googlegroups.com:
>
Bob viewing online, there is nothing better than Activestate's
html perldocs (to think otherwise means you're a kook :p).
But since the world needs kooks, and since it takes no effort to
repeat the worked examples of Randal Schwartz, pasted below is a
a script that generates an index for all the Perl functions, and
below that again is a script for using Emacs as a pager to access
the pod information on those functions.
%<------------------------------%<-----------------------------------
#!perl
# ex 16_1 llama book 3ed
# Reads through the perlfunc.pod file looking for identifier
# names on =item lines. Then writes to a database showing the
# first line number on which each identifier appears.
# useage: perl ex16_1.plx
use strict; use warnings;
chomp(my $path_to_perlfunc = `perldoc.bat -l perlfunc`);
open my $pf, $path_to_perlfunc or die "Can't open perlfunc.pod: $!";
dbmopen my %DB, "pf_data", 0644 or die "Can't create dbm file: $!";
%DB = (); # wipe out the entire database
while (<$pf> ) {
if (/^=item\s+([a-z_]\w*)/i) {
$DB{$1} = $DB{$1} || $.;
}
}
print "Done!\n";
%<------------------------------%<-----------------------------------
%<------------------------------%<-----------------------------------
#!perl
# ex 16_3 llama book 3ed
# Takes a Perl function name on the command line, and launches
# the pager gnuclient to view the perlfunc.pod file at the line
# that first mentions that function.
# useage: perl ex16_3.plx atan2
use strict; use warnings;
chomp(my $path_to_perlfunc = `perldoc.bat -l perlfunc`);
dbmopen my %DB, "pf_data", undef or die "Can't open dbm file: $!";
if ( my $line = $DB{ $ARGV[0] } ) {
exec 'gnuclientw', "+$line", $path_to_perlfunc
or die "Can't exec pager: $!";
} else {
die "Entry unknown: '$ARGV[0]'.\n";
}
%<------------------------------%<-----------------------------------
|
|
|
|
|