package Suae; # bunch of functions..... #Function that establishes the connection #my $CONEXION = "dbi:Sybase:server=$host"; my $CONEXION = "dbi:Pg:dbname=mydb;host=myhost.com"; # print "
Suae::DEBUGE conectando: dbi:Pg:dbname=avc;host=myhost.com
"; # print STDERR "Suae::DEBUGE conectando: dbi:Pg:dbname=avc;host=myhost.com\n"; my $suaedbh = DBI->connect($CONEXION,"user","pass"); if(!defined($suaedbh)){ $r->log_error("Error connecting to the database ($DBI::errstr)\n"); return(undef); }