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() );
In reply to Re: threads::shared and DBI fetchrow_hashref
by BrowserUk
in thread threads::shared and DBI fetchrow_hashref
by matonb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |