Let's test it:
perl-5.8.1-ithread -le 'require threads; print $threads::threads; require threads::shared; print join "\n", \&threads::shared::share, \&threads::shared::share_disabled;'
1
CODE(0x80f12e8)
CODE(0x80f1384)
There are not the same. I didn't figure out yet why, but if I move the require parts into a BEGIN {} block everything works OK:
perl-5.8.1-ithread -le 'BEGIN {require threads; require threads::shared;}; $x; threads::shared::share($x);'
But I can't have them in the BEGIN block, I need to conditionally load them at run time. Does this ring any bells?
This reminds me of a discussion about a year ago about p5p or dbi-dev. Something about not being able to require threads(::shared) conditionally at run-time. You might want to check the archives and/or contact Arthur about this.
Liz