can no longer store a database handle in an environment variable

Posted by bkent on 2017-03-20 10:35

After installing ActivePerl 5.24.0, we can no longer store a database handle in an environment variable.

We get the following error when trying to prepare a sql statement:

Can't locate object method "prepare" via package

The scripts works when I change the database handle from an environment variable to a local variable.

Is there an easy fix for this or do I have to change all of our code to use local variables to store a database handle?

grahams
ActiveState Staff
Fri, 2017-03-24 12:57

Perl 5.24 introduced a change to improve the consistency of values returned from the environment:
http://search.cpan.org/dist/perl-5.24.0/pod/perldelta.pod#Remove_duplica...