After download Config::General module from CPAN, I decided to install it to my own directory(just copy Config::General.pm to the directory,I didn't do normal install procedure)

I write a simple test script. It can execute in unix shell.But it can't work when access it by http.Apache will report

Can't locate Config/General.pm in @INC (@INC contains: ../lib /usr/loc +al/lib/per l5/5.8.2/sun4-solaris /usr/local/lib/perl5/5.8.2 /usr/local/lib/perl5/ +site_perl/ 5.8.2/sun4-solaris /usr/local/lib/perl5/site_perl/5.8.2 /usr/local/lib +/perl5/sit e_perl .) at /data/zht/perl/cgi-bin/config line 3. BEGIN failed--compilation aborted at /data/zht/perl/cgi-bin/config lin +e 3. [Fri Apr 16 09:31:06 2004] [error] [client 99.1.64.71] Premature end o +f script h eaders: /data/zht/perl/cgi-bin/config

But why it can find the pm when execute at unix shell ?

So are there any special when script execute at cgi envionment? thanks!

$ pwd /data/zht/perl/cgi-bin $ config Content-type: text/html ok$ more config #!/usr/bin/perl use lib '../lib'; use Config::General; print "Content-type: text/html\n\n"; print "ok"; $ $ ls ../lib Cisco Config Sharefunc.pm $ ls ../lib/Config General General.pm
thanks!

In reply to Strange problem when I install CPAN module to my own directory by iwanthome

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.