Skip Menu |

This queue is for tickets about the CGI-Application-Plugin-DBH CPAN distribution.

Report information
The Basics
Id: 79360
Status: rejected
Priority: 0/
Queue: CGI-Application-Plugin-DBH

People
Owner: Nobody in particular
Requestors: joergprante [...] gmx.de
Cc:
AdminCc:

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



Subject: Can't use string ("1") as an ARRAY ref while "strict refs"
Date: Mon, 03 Sep 2012 01:11:58 +0200
To: bug-CGI-Application-Plugin-DBH [...] rt.cpan.org
From: Jörg Prante <joergprante [...] gmx.de>
There are times when Oracle DB closes a connection at server-side, CGI Application Plugin DBH 4.00 fails to reconnect. [Dispatch] ERROR for request '/xyz': Error executing class callback in init stage: Can't use string ("1") as an ARRAY ref while "strict refs" in use at /usr/local/lib/perl5/5.12.3/vendor_perl/CGI/Application/Plugin/DBH.pm line 42. unless( defined($self->{__DBH}{$name}) && $self->{__DBH}{$name}->ping ) { # create DBH object if(my $config = $self->{__DBH_CONFIG}{$name} ) { # Use a callback if (ref $config eq 'CODE') { $self->{__DBH}{$name} = $config->(); } # use the parameters the user supplied else { require DBI; line 42 --> $self->{__DBH}{$name} = DBI->connect(@{ $self->{__DBH_CONFIG}{$name} }); } } else { } }
Show quoted text
> init stage: Can't use string ("1") as an ARRAY ref while "strict refs" > in use at
Show quoted text
> line 42 --> $self->{__DBH}{$name} = DBI->connect(@{ > $self->{__DBH_CONFIG}{$name} });
The only arrayref I see on this line is the configuration, which is provided by you your configuration provided to dbh_config() If you submit a Test::More test case that's failing, I'll look into it further, but otherwise it appears this could be an issue with your code. Using Test::MockDBI may be helpful in simulating Oracle's behavior. I'm closing the ticket now, but re-open if a test case or proposed patch is available. Mark