From: | "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com> |
---|---|
To: | pgsql-general general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: exception handling in plperlu |
Date: | 2007-03-16 15:05:41 |
Message-ID: | 8D7DE746-7E8A-40D3-B71F-222B14696CA0@themactionfaction.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mar 16, 2007, at 10:54 , Jasbinder Singh Bali wrote:
> just wondeng why doesn't it let me put
> my $dbh=DBI->connect("dbi:Pg:dbname=dbunmask; host=192.168.0.120;
> port=5432;", "", "");
> in eval
>
> says
> Global symbol "$dbh" requires explicit package name at line <where
> ever dbh is used>
>
There is a mailing list for DBD::Pg:
http://gborg.postgresql.org/mailman/listinfo/dbdpg-general/
But your problem in not related to the driver, rather it's a Perl
issue. Your variable is defined within the block, so its scope is the
eval block ("my" implies lexical scoping). If you define it outside
the block and assign inside the block, then it will work.
Cheers,
M
From | Date | Subject | |
---|---|---|---|
Next Message | Adam Rich | 2007-03-16 15:06:28 | Re: exception handling in plperlu |
Previous Message | Robin Ericsson | 2007-03-16 14:55:15 | Re: simple coordinate system |