Skip Menu |

This queue is for tickets about the Pod-Parser CPAN distribution.

Report information
The Basics
Id: 16901
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: Pod-Parser

People
Owner: Nobody in particular
Requestors: dab [...] technologist.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.33
Fixed in: 1.35



Subject: Use more when perldoc not available
Pod::Usage with verbose=>2 tries to use perldoc to display the entry. My suggestion is to use more when perldoc is not available. In my code I check if the executing module is perl or perl.exe and if not I assume that the sources are packed in an executable (In my case perl2exe produced) and use more. More is available on all of the platforms that I work with. It may be better to test for the existance of perldoc before deciding to use more. I feel that this is a more elegant solution than -noperldoc. Thank you for a great module. Danny Bud
--- Usage.pm.bak Mon Sep 05 23:11:26 2005 +++ Usage.pm Wed Jan 04 09:30:23 2006 @@ -543,7 +543,9 @@ and $opts{"-output"} == \*STDOUT ) { ## spit out the entire PODs. Might as well invoke perldoc - my $progpath = File::Spec->catfile($Config{scriptdir}, "perldoc"); + my $progpath=($^X =~ /(perl|perl\.exe)$/i) ? + File::Spec->catfile($Config{scriptdir}, "perldoc") : + "more"; system($progpath, $opts{"-input"}); } else {
From: thaljef [...] cpan.org
I would ammend that suggestion to use whatever is in the user's PAGER environment variable before resorting to a fixed command. And IMHO, I would probably try 'less' before 'more'. -Jeff
From: Danny Bud
I think that this is a good suggestion. My concern is that it also work on the Windows environment. I chose more because it is available on all environments and thus saved me from checking for a PAGER. Danny
I will start $PAGER|more if perldoc fails.
Subject: Re: [rt.cpan.org #16901] Use more when perldoc not available
Date: Mon, 11 Sep 2006 03:47:51 -0200
To: bug-Pod-Parser [...] rt.cpan.org
From: "Danny Bud" <dab [...] technologist.com>
Thanks Show quoted text
> ----- Original Message ----- > From: " via RT" <bug-Pod-Parser@rt.cpan.org> > To: dab@technologist.com > Subject: [rt.cpan.org #16901] Use more when perldoc not available > Date: Sun, 10 Sep 2006 14:46:54 -0400 > > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=16901 > > > I will start $PAGER|more if perldoc fails.
Show quoted text
>
Fixed in 1.35