Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DBD-Oracle CPAN distribution.

Report information
The Basics
Id: 63475
Status: rejected
Priority: 0/
Queue: DBD-Oracle

People
Owner: Nobody in particular
Requestors: ceverett [...] ceverett.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.23
Fixed in: (no value)



Subject: Can't use DBD::Oracle and Readonly pragma
# DBD::Oracle chokes on strings assigned to Readonly scalar: use strict; use Readonly; use DBI; Readonly::Scalar my $SQL => 'select * from Foo.Bar'; # and later: my $dbh = $DBI->connect( 'dbi::oracle::$DB_SRV', $DB_USR, $DB_PWD ); my $sth = $dbh->prepare($SQL); # call to prepare blows up
On Tue Nov 30 14:39:19 2010, ceverett@ceverett.com wrote: Show quoted text
> # DBD::Oracle chokes on strings assigned to Readonly scalar: > > use strict; > use Readonly; > use DBI; > > Readonly::Scalar my $SQL => 'select * from Foo.Bar'; > > # and later: > > my $dbh = $DBI->connect( 'dbi::oracle::$DB_SRV', $DB_USR, $DB_PWD ); > my $sth = $dbh->prepare($SQL); # call to prepare blows up
Are you sure? There are at least 3 mistakes in the code above: 1. "$DBI" => DBI 2. :: in connect string should be single colons 3. "oracle" in connect string should be "Oracle" and once I correct all of these to something like: use strict; use Readonly; use DBI; Readonly::Scalar my $SQL => 'select * from market_type'; # and later: my $dbh = DBI->connect( 'dbi:Oracle:xxx', 'xxx', 'xxx' ); my $sth = $dbh->prepare($SQL); It works fine for me. Martin -- Martin J. Evans Wetherby, UK
On Mon Dec 06 11:56:59 2010, MJEVANS wrote: Show quoted text
> On Tue Nov 30 14:39:19 2010, ceverett@ceverett.com wrote:
> > # DBD::Oracle chokes on strings assigned to Readonly scalar: > > > > use strict; > > use Readonly; > > use DBI; > > > > Readonly::Scalar my $SQL => 'select * from Foo.Bar'; > > > > # and later: > > > > my $dbh = $DBI->connect( 'dbi::oracle::$DB_SRV', $DB_USR, $DB_PWD ); > > my $sth = $dbh->prepare($SQL); # call to prepare blows up
> > Are you sure? > > There are at least 3 mistakes in the code above: > > 1. "$DBI" => DBI > 2. :: in connect string should be single colons > 3. "oracle" in connect string should be "Oracle" > > and once I correct all of these to something like: > > use strict; > use Readonly; > use DBI; > > Readonly::Scalar my $SQL => 'select * from market_type'; > > # and later: > > my $dbh = DBI->connect( 'dbi:Oracle:xxx', 'xxx', 'xxx' ); > my $sth = $dbh->prepare($SQL); > > It works fine for me. > > Martin
As I said, I don't see a problem here. Can you provide an example demonstrating the problem or I will close this rt. Thanks Martin -- Martin J. Evans Wetherby, UK