how to use already installed perl iso Xampp/perl/

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

how to use already installed perl iso Xampp/perl/

Postby s.gopalarathnam » 30. March 2012 08:14

Hi All,
Iam a new user of Xampp but a old user of Activestate perl installed already in my system.
Although I mention the path specifically in the first line of my perl script now stored in htdocs,
#!/perl2/bin/perl -wT
it still takes the perl that comes bundled with xampp.
I end up with errors of missing packages - "Can't locate HTML/ in @INC (@INC contains: C:/xampp/perl/site/lib/ C:/xampp/perl/lib C:/xampp/perl/site/lib . C:/xampp/apache) at C:/xampp/htdocs/gopal/ line 3. "
"Error 500
03/30/12 12:30:12
Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 "

I have many perl packages already installed, also I use a more latest version of the Active state perl perl 5, version 14, subversion 2 (v5.14.2).
I want to make use of the other bundles of apache, mysql, but want to use the perl I had been using earlier.

I hope that this must be possible to do with some configuration file, but I'm unable to locate it.
I found a place where we can mention perl packages, however, there is change in perl versions.
I need to know where I cna just change the perl path to make sure the path used is the first line mentioned in perl files.

why does it run the perl by default with xampp bundled perl version which is (V.5.10.1) as could be seen in the error message, iso using the one mentioned.
Please let me know where the settings are.
Thanks a lot in Advance.
Please see log below that HTML::Template package is already available in the perl path I have mentioned in the first line.

D:\>perl -v

This is perl 5, version 14, subversion 2 (v5.14.2) built for MSWin32-x86-multi-t
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2011, Larry Wall

Binary build 1402 [295342] provided by ActiveState
Built Oct 7 2011 15:49:44

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at, the Perl Home Page.

D:\> perldoc HTML::Template
HTML::Template - Perl module to use HTML Templates from CGI scripts

First you make a template - this is just a normal HTML file with a few
extra tags, the simplest being <TMPL_VAR>

For example, test.tmpl:

<head><title>Test Template</title>
My Home Directory is <TMPL_VAR NAME=HOME>
My Path is set to <TMPL_VAR NAME=PATH>

Now create a small CGI program:

#!/usr/bin/perl -w
use HTML::Template;

# open the html template
my $template = HTML::Template->new(filename => 'test.tmpl');

# fill in some parameters
$template->param(HOME => $ENV{HOME});
$template->param(PATH => $ENV{PATH});

# send the obligatory Content-Type and print the template output
print "Content-Type: text/html\n\n", $template->output;

If all is well in the universe this should show something like this in
your browser when visiting the CGI:

My Home Directory is /home/some/directory
My Path is set to /bin;/usr/bin

This module attempts to make using HTML templates simple and natural. It
extends standard HTML with a few new HTML-esque tags - <TMPL_VAR>,
The file written with HTML and these new tags is called a template. It
is usually saved separate from your script - possibly even created by
someone else! Using this module you fill in the values for the
variables, loops and branches declared in the template. This allows you
to separate design - the HTML - from the data, which you generate in the
Perl script.

Posts: 1
Joined: 30. March 2012 07:30
Operating System: Windows

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 57 guests