Troubleshooting of POD permissions in perl

Source: Internet
Author: User
Tags perl script

At the beginning, I plan to use perldoc to view the Apache2: Request module. The following error occurs during running:

Copy codeThe Code is as follows: Error in tempfile () using/tmp/XXXXXXXXXX: parent directory (./) is
Not writable at/usr/lib/perl5/5.8.8/Pod/Perldoc. pm line 1483.

Change to/tmp/to execute the command or report an error. It seems that it has nothing to do with PWD. It has something to do with/tmp's own permissions ~~ (Because I often perform experiments under/tmp, I may not know when I accidentally changed the permission)

Chmod 777/tmp

Run the command again. OK ~~

After reading the doc of Apache2: Request, I didn't find any header-related settings. I decided to directly look at the pm of apache. However, I just installed CPAN in a hurry, but I never care where they are all installed ......

/Usr/five or six directories are perl, which is not easy to find ~ (Remember that in the previous test, every time the perl script is executed, it takes several hundred milliseconds to find the position of the module ......)

I went to Baidu for a while and it was quite good. Seeing CPAN's FAQ set, there is exactly this method:

Copy codeThe Code is as follows: perl-MFile: Find = find-MFile: Spec: Functions-Tlwe 'Find {wanted => sub {print canonpath $ _ if /. pmz/}, no_chdir => 1}, @ INC'

Then grep Apache, you will see the results, are installed in the/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Apache2 path. Go to grep '$ r-> header' * and you will immediately see that it is in RequestRec. pm.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.