Path to Perl difficulties

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Path to Perl difficulties

Postby RAJ » 22. June 2006 09:37

Apologies if this is a really stupid question, but I am fairly new to Linux and am trying to port my web applications from a Windows to Linux enviroment, and have successfully set up XAMPP under PCLinuxOS.

But in order to load all the additional Perl modules I needed I used the CPAN install procedure, and had to change the default path to perl /usr/bin/perl to a sym link pointing to /opt/lampp/bin/perl. But doing that breaks existing Linux dependancies (eg Control Center won't load).

It seems I can either keep the default Linux path to perl intact OR use XAMPP, but not both. Surely this is not the case?
RAJ
 
Posts: 8
Joined: 22. June 2006 09:22

Postby Wiedmann » 22. June 2006 10:29

and had to change the default path to perl /usr/bin/perl to a sym link pointing to /opt/lampp/bin/perl.

As you can see, this is really a dirty quickfix...
Each CGI or shell script knows the desired interpreter from the shebang (first line in the script):

So, e.g. for a perl script, if you want use your system perl the shebang must be:
#!/usr/bin/perl

And if you want use the XAMPP perl ist must be:
#!/opt/lampp/bin/perl

But in order to load all the additional Perl modules I needed I used the CPAN install procedure,

It's similar as before:

If you want install a module for your system perl, use cpan from that perl:
/usr/bin/cpan

And if you want install a module for the XAMPP perl, use the cpan from XAMPP:
/opt/lampp/bin/cpan

BTW:
If you disable mod_perl, you can use your system perl in XAMPP too.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby RAJ » 22. June 2006 12:04

If you disable mod_perl, you can use your system perl in XAMPP too.


Thanks for the reply, but disabling mod_perl is not an option so I will have to find a work-around. I'm sure there must be a simple solution to this, as it must be very common practice to install pre-compiled LAMP bundles and then add to the default Perl packages.
RAJ
 
Posts: 8
Joined: 22. June 2006 09:22


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 4 guests