|
|||||
|
|
#1 |
|
|
installed perl 5.8, and when I tried to use "perldoc" (such as "perldoc DBI"), nothing happens except as if I issued "source .cshrc" (some personalized login message p***es), then it's ready to take next command. However "perldoc" works normal for ~root (both accounts are on "tcsh" shell). Where should I check to solve it? PS: My linux: version 2.4.21-20.ELsmp (gcc version 3.2.3 20030502) (Red Hat Linux 3.2.3-42)) My perl: version: v5.8.5 built for i686-linux Thanks in advance! Zhiliang |
|
|
#2 |
|
|
> I have a strange problem - recently I newly setup a linux server and > installed perl 5.8, and when I tried to use "perldoc" (such as > "perldoc DBI"), nothing happens except as if I issued "source .cshrc" > (some personalized login message p***es), then it's ready to take next > command. However "perldoc" works normal for ~root (both accounts are > on "tcsh" shell). Where should I check to solve it? Have you looked at the obvious? linux% which perldoc linux% echo $PATH linux# which perldoc linux# echo $PATH -Joe |
|
|
#3 |
|
|
> Zhiliang Hu wrote: > > > I have a strange problem - recently I newly setup a linux server and > > installed perl 5.8, and when I tried to use "perldoc" (such as > > "perldoc DBI"), nothing happens except as if I issued "source .cshrc" > > (some personalized login message p***es), then it's ready to take next > > command. However "perldoc" works normal for ~root (both accounts are > > on "tcsh" shell). Where should I check to solve it? > > Have you looked at the obvious? > > linux% which perldoc > linux% echo $PATH > > linux# which perldoc > linux# echo $PATH > > -Joe Yes, I did - 'perldoc' is in /usr/local/bin/ and it is in both my and ~root's path. (I double checked them and I still got the same as before). Following commands work fine: > perloc -V > perldoc -h > perldoc NONEexist (this returns "No do***entation found") > perldoc -l WWW::Search but "perldoc WWW::Search" will show nothing but login prompts. Zhiliang |
|
|
#4 |
|
|
On Wed, 10 Nov 2004 13:30:34 -0800, Zhiliang Hu wrote:
<snip> > Yes, I did - 'perldoc' is in /usr/local/bin/ and it is in both my and > ~root's path. (I double checked them and I still got the same as > before). > > Following commands work fine: > > perloc -V > > perldoc -h > > perldoc NONEexist (this returns "No do***entation found") > > perldoc -l WWW::Search > > but "perldoc WWW::Search" will show nothing but login prompts. As a "quick fix", you could (since you're on a *nix box) try: perldoc -t WWW::Search | less If this works, then you can at least use perldoc until you hunt down the cause of the problem. HTH Jim |
|
|
#5 |
|
|
James Willmore <jwillmore@fastmail.us> wrote in comp.lang.perl.misc:
> On Wed, 10 Nov 2004 13:30:34 -0800, Zhiliang Hu wrote: > > <snip> > > Yes, I did - 'perldoc' is in /usr/local/bin/ and it is in both my and > > ~root's path. (I double checked them and I still got the same as > > before). > > > > Following commands work fine: > > > perloc -V > > > perldoc -h > > > perldoc NONEexist (this returns "No do***entation found") > > > perldoc -l WWW::Search > > > > but "perldoc WWW::Search" will show nothing but login prompts. > > As a "quick fix", you could (since you're on a *nix box) try: > perldoc -t WWW::Search | less > > If this works, then you can at least use perldoc until you hunt down the > cause of the problem. What makes you think "perldoc -t" would work? My guess is it's a permission problem that doesn't exist for root. Anno |
|
|
#6 |
|
|
On Thu, 11 Nov 2004 12:44:27 +0000, Anno Siegel wrote:
> James Willmore <jwillmore@fastmail.us> wrote in comp.lang.perl.misc: >> On Wed, 10 Nov 2004 13:30:34 -0800, Zhiliang Hu wrote: >> >> <snip> >> > Yes, I did - 'perldoc' is in /usr/local/bin/ and it is in both my and >> > ~root's path. (I double checked them and I still got the same as >> > before). >> > >> > Following commands work fine: >> > > perloc -V >> > > perldoc -h >> > > perldoc NONEexist (this returns "No do***entation found") >> > > perldoc -l WWW::Search >> > >> > but "perldoc WWW::Search" will show nothing but login prompts. >> >> As a "quick fix", you could (since you're on a *nix box) try: >> perldoc -t WWW::Search | less >> >> If this works, then you can at least use perldoc until you hunt down the >> cause of the problem. > > What makes you think "perldoc -t" would work? My guess is it's a > permission problem that doesn't exist for root. I took it the poster at his word that the only thing he couldn't do was view the do***entation. I was under the impression that if you try to run perldoc as root, then it would always issue an error message about it being unsafe to run as root - regardless of what option. The error mentioned in the OP was he tried to run perldoc to view do***entation and got nothing. I agree that it might be a permission problem ... OTOH, if it's working for an unprivileged user, it might be the pager setting for root. Trying to run perldoc with the -t option might (dis)prove this. Besides, as I mentioned, this was a temporary fix ... what does it hurt to try it and find it doesn't work. :-) Jim |
|
|
#7 |
|
|
James Willmore <jwillmore@fastmail.us> wrote in comp.lang.perl.misc:
> On Thu, 11 Nov 2004 12:44:27 +0000, Anno Siegel wrote: > > > James Willmore <jwillmore@fastmail.us> wrote in comp.lang.perl.misc: > >> On Wed, 10 Nov 2004 13:30:34 -0800, Zhiliang Hu wrote: > >> > >> <snip> > >> > Yes, I did - 'perldoc' is in /usr/local/bin/ and it is in both my and > >> > ~root's path. (I double checked them and I still got the same as > >> > before). > >> > > >> > Following commands work fine: > >> > > perloc -V > >> > > perldoc -h > >> > > perldoc NONEexist (this returns "No do***entation found") > >> > > perldoc -l WWW::Search > >> > > >> > but "perldoc WWW::Search" will show nothing but login prompts. > >> > >> As a "quick fix", you could (since you're on a *nix box) try: > >> perldoc -t WWW::Search | less > >> > >> If this works, then you can at least use perldoc until you hunt down the > >> cause of the problem. > > > > What makes you think "perldoc -t" would work? My guess is it's a > > permission problem that doesn't exist for root. > > I took it the poster at his word that the only thing he couldn't do was > view the do***entation. I was under the impression that if you try to run > perldoc as root, then it would always issue an error message about it > being unsafe to run as root - regardless of what option. The error > mentioned in the OP was he tried to run perldoc to view do***entation and > got nothing. I see. However, OP said it works for him(?) as root, but not as an ordinary user. In such a case, I tend to check permissions first. Otherwise I believe perldoc is root-safe now and the warning is gone. (Yup, v3.13 is fine with root) In any case, someone (Sean Burke, to give credit where credit is due) has done a tremendous job of cleaning up the code. Perldoc used to be a horror of a script -- I remember I tried to fix something minor once, but had to give up because I couldn't make sure in reasonable time that the fix wouldn't break something else. When I looked at it last night I found a well-organized program, neatly divided up in modules. It would be a joy to fix if I knew of anything that needed fixing. > I agree that it might be a permission problem ... OTOH, if it's working > for an unprivileged user, it might be the pager setting for root. Trying > to run perldoc with the -t option might (dis)prove this. Besides, as I > mentioned, this was a temporary fix ... what does it hurt to try it and > find it doesn't work. :-) There's certainly nothing wrong with trying it, I was just curious what gave you the idea, given the symptoms. Anno |
|
|
#8 |
|
|
James Willmore's suggestion works: "perldoc -t WWW::Search | less" --
Returns normal du***entation. However, without "less" it still returns nothing except login prompt (i.e. "perldoc -t WWW::Search"). I don't seem to comprehend where the problem is (is "pager" a utility to dispaly text like "less"/"more"?), could you suggest further? Thanks and with best regards, Zhiliang anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote in message news:<cn065m$f3q$1@mamenchi.zrz.TU-Berlin.DE>... > James Willmore <jwillmore@fastmail.us> wrote in comp.lang.perl.misc: > > On Thu, 11 Nov 2004 12:44:27 +0000, Anno Siegel wrote: > > > > > James Willmore <jwillmore@fastmail.us> wrote in comp.lang.perl.misc: > > >> On Wed, 10 Nov 2004 13:30:34 -0800, Zhiliang Hu wrote: > > >> > > >> <snip> > > >> > Yes, I did - 'perldoc' is in /usr/local/bin/ and it is in both my and > > >> > ~root's path. (I double checked them and I still got the same as > > >> > before). > > >> > > > >> > Following commands work fine: > > >> > > perloc -V > > >> > > perldoc -h > > >> > > perldoc NONEexist (this returns "No do***entation found") > > >> > > perldoc -l WWW::Search > > >> > > > >> > but "perldoc WWW::Search" will show nothing but login prompts. > > >> > > >> As a "quick fix", you could (since you're on a *nix box) try: > > >> perldoc -t WWW::Search | less > > >> > > >> If this works, then you can at least use perldoc until you hunt down the > > >> cause of the problem. > > > > > > What makes you think "perldoc -t" would work? My guess is it's a > > > permission problem that doesn't exist for root. > > > > I took it the poster at his word that the only thing he couldn't do was > > view the do***entation. I was under the impression that if you try to run > > perldoc as root, then it would always issue an error message about it > > being unsafe to run as root - regardless of what option. The error > > mentioned in the OP was he tried to run perldoc to view do***entation and > > got nothing. > > I see. However, OP said it works for him(?) as root, but not as an > ordinary user. In such a case, I tend to check permissions first. > > Otherwise I believe perldoc is root-safe now and the warning is gone. > (Yup, v3.13 is fine with root) > > In any case, someone (Sean Burke, to give credit where credit is due) > has done a tremendous job of cleaning up the code. Perldoc used to be > a horror of a script -- I remember I tried to fix something minor once, > but had to give up because I couldn't make sure in reasonable time > that the fix wouldn't break something else. When I looked at it last > night I found a well-organized program, neatly divided up in modules. > It would be a joy to fix if I knew of anything that needed fixing. > > > I agree that it might be a permission problem ... OTOH, if it's working > > for an unprivileged user, it might be the pager setting for root. Trying > > to run perldoc with the -t option might (dis)prove this. Besides, as I > > mentioned, this was a temporary fix ... what does it hurt to try it and > > find it doesn't work. :-) > > There's certainly nothing wrong with trying it, I was just curious > what gave you the idea, given the symptoms. > > Anno |
|
|
#9 |
|
|
(Please DON'T top-post - it's considered rude)
On Wed, 17 Nov 2004 06:21:50 -0800, Zhiliang Hu wrote: <snip> > James Willmore's suggestion works: "perldoc -t WWW::Search | less" -- > Returns normal du***entation. However, without "less" it still returns > nothing except login prompt (i.e. "perldoc -t WWW::Search"). > > I don't seem to comprehend where the problem is (is "pager" a utility to > dispaly text like "less"/"more"?), could you suggest further? If you're on a *nix system, there is an environment setting for which pager (more, less, some other paging application) to use for viewing do***ents. To find out if this variable is set, type: echo $PAGER If you get just the command line back, this setting is missing and *may* cause a problem with viewing Perl do***entation. To set the variable to something "sane", type: (for BASH) export PAGER=`which less` (for CSH - I think ... I always seem to mess up the syntax because I try to avoid using C-Shell) setenv PAGER `which less` This sets the environment variable to use `less` as your pager. If this environment setting *is* set, then I'm not real sure what's going on :-( My thinking is to check your permissions again - just to be sure. On my system, they are set to ... -r-xr-xr-x 1 root root 203 Oct 17 00:15 /usr/bin/perldoc Past these directions, I'm not sure what else might be going on. HTH Jim |
|
|
#10 |
|
|
All those 3 works:
perldoc -t GD | less perldoc -t GD | more perldoc -t GD | nroff but not this one (seen as I described earlier): perldoc -t GD I wonder which file/folder I should look at to "check permissions" as Anno suggested? (I found all perl related man pages are in /usr/share/man/man1 or man3, to which permissions are allowed for all users, i.e. 755 or 644 for folders or files respectively). Zhiliang anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote in message news:<cn065m$f3q$1@mamenchi.zrz.TU-Berlin.DE>... > James Willmore <jwillmore@fastmail.us> wrote in comp.lang.perl.misc: > > On Thu, 11 Nov 2004 12:44:27 +0000, Anno Siegel wrote: > > > > > James Willmore <jwillmore@fastmail.us> wrote in comp.lang.perl.misc: > > >> On Wed, 10 Nov 2004 13:30:34 -0800, Zhiliang Hu wrote: > > >> > > >> <snip> > > >> > Yes, I did - 'perldoc' is in /usr/local/bin/ and it is in both my and > > >> > ~root's path. (I double checked them and I still got the same as > > >> > before). > > >> > > > >> > Following commands work fine: > > >> > > perloc -V > > >> > > perldoc -h > > >> > > perldoc NONEexist (this returns "No do***entation found") > > >> > > perldoc -l WWW::Search > > >> > > > >> > but "perldoc WWW::Search" will show nothing but login prompts. > > >> > > >> As a "quick fix", you could (since you're on a *nix box) try: > > >> perldoc -t WWW::Search | less > > >> > > >> If this works, then you can at least use perldoc until you hunt down the > > >> cause of the problem. > > > > > > What makes you think "perldoc -t" would work? My guess is it's a > > > permission problem that doesn't exist for root. > > > > I took it the poster at his word that the only thing he couldn't do was > > view the do***entation. I was under the impression that if you try to run > > perldoc as root, then it would always issue an error message about it > > being unsafe to run as root - regardless of what option. The error > > mentioned in the OP was he tried to run perldoc to view do***entation and > > got nothing. > > I see. However, OP said it works for him(?) as root, but not as an > ordinary user. In such a case, I tend to check permissions first. > > Otherwise I believe perldoc is root-safe now and the warning is gone. > (Yup, v3.13 is fine with root) > > In any case, someone (Sean Burke, to give credit where credit is due) > has done a tremendous job of cleaning up the code. Perldoc used to be > a horror of a script -- I remember I tried to fix something minor once, > but had to give up because I couldn't make sure in reasonable time > that the fix wouldn't break something else. When I looked at it last > night I found a well-organized program, neatly divided up in modules. > It would be a joy to fix if I knew of anything that needed fixing. > > > I agree that it might be a permission problem ... OTOH, if it's working > > for an unprivileged user, it might be the pager setting for root. Trying > > to run perldoc with the -t option might (dis)prove this. Besides, as I > > mentioned, this was a temporary fix ... what does it hurt to try it and > > find it doesn't work. :-) > > There's certainly nothing wrong with trying it, I was just curious > what gave you the idea, given the symptoms. > > Anno |