PERL Web Development: Perl module not found, but installed
I insatalled the Perl module HTML::Template via cpan. Perl itself recognise the Template module, but when I try to use as a Perl CGI script, it triggers the follow error:


    $ cat /var/log/httpd/error_log

    [Tue Feb 14 11:28:27 2012] [error] [client 127.0.0.1] Can't locate HTML/Template.pm in @INC (@INC contains: /root/perl5/lib/perjl5/ /usr/local/lib/perl5 /usr/$
    [Tue Feb 14 11:28:27 2012] [error] [client 127.0.0.1] BEGIN failed--compilation aborted at /var/www/cgi-bin/index.pl line 4.
    [Tue Feb 14 11:28:27 2012] [error] [client 127.0.0.1] Premature end of script headers: index.pl

My Perl script (index.pl) is as follow:

    #!/usr/bin/perl -w
    
    use lib "/root/perl5/lib/perjl5"; # is it the correct way to include libs?
    use HTML::Template; # error line
    
    
    print "Content-type: text/html\r\n\r\n";
    print "Hello there!<br />\nJust testing .<br />\n";
    
    for ($i=0; $i<10; $i++)
    {
    print $i."<br />"; 
    }

If I load the script **http://localhost/cgi-bin/index.pl** it retuns a 500 Internal Server Error.


The module is installed and located in: /root/perl5/lib/perl5/HTML/Template.pm

Infact **$ perldoc perllocal** returns:


    [...]
       [1mMon Feb 13 16:43:34 2012: "Module" HTML::Template[0m
           ·   "installed into: /root/perl5/lib/perl5"
    
           ·   "LINKTYPE: dynamic"
    
           ·   "VERSION: 2.6"
    
           ·   "EXE_FILES: "
    
    [...]


It it correctly installe? 
If I type: 
**$ perl -e "use HTML::Template"**  no error is return


Im'using Fedora 16

> Linux version 3.2.5-3.fc16.i686
> (mockbuild@x86-06.phx2.fedoraproject.org) (gcc version 4.6.2 20111027
> (Red Hat 4.6.2-1) (GCC) ) #1 SMP Thu Feb 9 02:24:08 UTC 2012


Thanks for helping.


PERL Web Development: Perl module not found, but installed
===

I insatalled the Perl module HTML::Template via cpan. Perl itself recognise the Template module, but when I try to use as a Perl CGI script, it triggers the follow error:


    $ cat /var/log/httpd/error_log

    [Tue Feb 14 11:28:27 2012] [error] [client 127.0.0.1] Can't locate HTML/Template.pm in @INC (@INC contains: /root/perl5/lib/perjl5/ /usr/local/lib/perl5 /usr/$
    [Tue Feb 14 11:28:27 2012] [error] [client 127.0.0.1] BEGIN failed--compilation aborted at /var/www/cgi-bin/index.pl line 4.
    [Tue Feb 14 11:28:27 2012] [error] [client 127.0.0.1] Premature end of script headers: index.pl

My Perl script (index.pl) is as follow:

    #!/usr/bin/perl -w
    
    use lib "/root/perl5/lib/perjl5"; # is it the correct way to include libs?
    use HTML::Template; # error line
    
    
    print "Content-type: text/html\r\n\r\n";
    print "Hello there!<br />\nJust testing .<br />\n";
    
    for ($i=0; $i<10; $i++)
    {
    print $i."<br />"; 
    }

If I load the script **http://localhost/cgi-bin/index.pl** it retuns a 500 Internal Server Error.


The module is installed and located in: /root/perl5/lib/perl5/HTML/Template.pm

Infact **$ perldoc perllocal** returns:


    [...]
       [1mMon Feb 13 16:43:34 2012: "Module" HTML::Template[0m
           ·   "installed into: /root/perl5/lib/perl5"
    
           ·   "LINKTYPE: dynamic"
    
           ·   "VERSION: 2.6"
    
           ·   "EXE_FILES: "
    
    [...]


It it correctly installe? 
If I type: 
**$ perl -e "use HTML::Template"**  no error is return


Im'using Fedora 16

> Linux version 3.2.5-3.fc16.i686
> (mockbuild@x86-06.phx2.fedoraproject.org) (gcc version 4.6.2 20111027
> (Red Hat 4.6.2-1) (GCC) ) #1 SMP Thu Feb 9 02:24:08 UTC 2012


Thanks for helping.

