Jump to content

Recommended Posts

Posted

Hi,

 

trying to run a test script (http://raycone.helio...cgi-bin/test.pl) on my account (raycone on stevie) dies looking for perl modules. Those modules should be installed on the system. I've added path to the locally installed perl modules to INC but still modules, which "cPanel Perl Modules" says they are installed on the system cannot be found and used. Is there any extra perl modules path that I need to add, so the script runs?

Thank you

Posted

I have done everything written on that page; also on top of that I've included the paths to the local perl modules to @INC as suggested on cPanel's "Perl Modules" page but still attempting to use the modules fails as described in my first post. It seems those modules would be installed at a location that I don't have permissions to browse, so I can't tell what that location would be ...?

Posted

Yes, the code snippet on the page you posted link to is the one I meant above that I have included in my script. I found it to be suggested on cPanel Perl Modules page (the page you posted link to).

 

The script I am testing this with is a very simple one. Basically it only tries to include a few major perl modules required by my perl application - "testing the ground is ready to install the application". It just tries to include the perl modules to see if it can include them and prints out the current time. The one thing that might complicate it but hopefully not (or it can be worked out, so that it can work), is that I am using the more up-to-date version of perl than the default old version. I am using perl 5.14.1 as I found in another post here on HelioNet / HelioHost. The script source is here:

 

#!/usr/bin/env perl5.14.1
BEGIN {
   my $b__dir = (-d '/home/raycone/perl'?'/home/raycone/perl' getpwuid($>) )[7].'/perl');
   unshift @INC,$b__dir.'5/lib/perl5',$b__dir.'5/lib/perl5/x86_64-linux',map { $b__dir . $_ } @INC;
}
use CGI::Carp qw(fatalsToBrowser);
use CGI qw(:standard);
use v5.12;
use strict;
use warnings;

use AnyEvent::Log;
use Moo;
use Moose;
use KiokuDB;

print "Content-type: text/html\n\n";
print '<html>
<body>';
print '<p>Time: '.localtime()."</p><hr />\n";
print '</body></html>';
1; 

 

Moo, Moose and KiokuDB are displayed in the list of installed perl modules on cPanel's Perl Modules page (the link you posted). Still the script dies trying to include them.

Posted

Try this:

 

#!/usr/bin/perl

BEGIN {
   my $b__dir = (-d '/home/raycone/perl'?'/home/raycone/perl':(/> getpwuid($>) )[7].'/perl');
   unshift @INC,$b__dir.'5/lib/perl5',$b__dir.'5/lib/perl5/x86_64-linux',map { $b__dir . $_ } @INC;
}

use CGI::Carp qw(fatalsToBrowser);
use CGI qw(:standard);

#use v5.12;
use strict;
use warnings;

use AnyEvent::Log;
use Moo;
use Moose;
use KiokuDB;


print "Content-type: text/html\n\n";
print '<html>
<body>';
print '<p>Time: '.localtime()."</p><hr />\n";
print '</body></html>';

1;

Posted

Yes, this code works. It uses the default perl version 5.8.8. I would need to make it work with the more up-to-date perl version - like with

#!/usr/bin/env perl5.14.1

 

because other modules I need require perl version at least 5.12.

Do you know if there is a way to get this perl 5.14.1 to work AND be able to install additional perl modules from CPAN to it here? (the Perl modules page accessible from cPanel seems to be tied to the old - default perl, e.g. perl modules that have been installed in the default perl's directory structure don't get installed to local if you try to install them.)

Is there a way to to be able to install other perl modules from CPAN and use them in perl5.14.1 (or any other perl 5.12+) here?

Guest
This topic is now closed to further replies.
×
×
  • Create New...