-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 At 7:55 AM -0400 10/17/01, Kee Hinckley wrote: > sub foo { > local(*set) = DBIx::Recordset... > print $set{bar} > >What is the preferred solution? I could declare a "my (%set)" before >the local. I could temporarily turn off the strict settings. Is >there anything better? What I'd really like is to tell "use strict" >that I want strict vars, but not to let me use local.
Hmm. After some experimenting it seems that the local(*set) doesn't work unless I do a 'use vars qw(*set)' in the package. It seems to me that using my is error prone, since I'm not going to catch all values of 'set' that may be modified. So I should do: use vars qw(*set); at the beginning of my package. And then: local(*set); in any routine that calls Recordset. Is that right, or am I missing something? - -- Kee Hinckley - Somewhere.Com, LLC http://consulting.somewhere.com/ [EMAIL PROTECTED] (or ...!alice!nazgul for time travelers :-) I'm not sure which upsets me more: that people are so unwilling to accept responsibility for their own actions, or that they are so eager to regulate everyone else's. -----BEGIN PGP SIGNATURE----- Version: PGP Personal Security 7.0.3 iQA/AwUBO83FmSZsPfdw+r2CEQLxoACfUNZNRlb+N8aqwEicZ0NzNOuPdDMAnR+q e8uSwdYHy1fGxbr+ohDBgneD =G8Tx -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]