How to set an enviroment variable require for test?

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?

Who is Participating?
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.

How to set Environment Variables in XP
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/
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...

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

tankergoblinAuthor Commented:
Is that mean after installing tha package i can delete the Enviroment variable?
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.