in reply to threads::shared and DBI fetchrow_hashref
I'm getting an "Invalid value for shared scalar" error...
The hashref returned by $sth->fetchrow_hashref() is not shared, and you cannot store unshared data in a shared data structure. (Obviously:)
You can avoid the problem by sharing the unshared data before assigning it to the shared data structure:
$aCache{$cacheKey} = shared_clone( $sth->fetchrow_hashref() );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: threads::shared and DBI fetchrow_hashref
by matonb (Initiate) on May 27, 2011 at 09:08 UTC |