How to set an enviroment variable require for test?

Hi!
i want to connect to postresplus database thru' perl
im using DBD::pgpp driver.
In readme i notice that i need to change the variable to test my driver but where to change?

LVL 7
tankergoblinAsked:
Who is Participating?
 
sreindl04Commented:
Yes, the variable is only used for isntalling the software and therefore it's not needed any more.
Most perl packages provide some kind of funtionality and integration test during installation.
This is a problem for database packages and they need to know to which database they want to test against.Therefore they ask for connection properties using environment variables.

0
 
RawdustCommented:
How to set Environment Variables in XP
http://support.microsoft.com/kb/310519
0
 
tankergoblinAuthor Commented:
the actual error message i received is

DBI connect('dbname =$dbname;host=$host;port=$port','$username',...)failed:
couldn't connect to /tmp/.s.PGSQL.5444: at C:/Perl/site/lib/DBD/PgPP.pm
0
 
sreindl04Commented:
The Environment-Variable "TEST" is only used during installation of the package...

Do you still need to install the package? It seems that your problem is not related to installation but to passing the correct parameters to the connection string...


#!/bin/perl 
use DBI;
 
my $dbname = 'my_famous_db';
my $hostname = 'localhost';
my $port = 5432; # optional, but to keep it complete
my $user = 'username';
my $password = "I won't tell";
 
my $dbh = DBI->connect("dbi:PgPP:dbname=$dbname;host=$hostname;port=$port", $username, $password)
    or die $DBI::errstr;

Open in new window

0
 
tankergoblinAuthor Commented:
Is that mean after installing tha package i can delete the Enviroment variable?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.