New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proposed fix for references to tied hash keys #7271
Comments
From @muirCreated by @muirI've run into many bugs with references to tied hash keys. Even if all of the bugs in 27555 were fixed (and the core dumps too), I propose that an additional tie method: GETREF. GETREF would be invoked whenver someone did: $x = \%tiedhash{key} It would return the reference. If a GETREF method isn't provided, perl can fall back to the current broken An example from my module... Values in $hash1 and $hash2 are only loaded into $hash1->{x} = \$hash2->{y}; ... time passes and $hash1 is saved persistently and is $hash1->{z} = \$hash2->{y}; # a ref is made in my module $hash1->{b} is 'a' but that's only possible because I fake Here's how I'm working around the lack of GETREF: use B qw(svref_2object); sub workaround27555 ... application specific code to translate from $tiedaddr to $tied ... $_[0] = $tied->GETREF($key); sub tied_hash_reference It's used like: I also have an explicit getref function alternative: use UNIVERSAL qw(can); sub getref(\%$) It's used as: $x = getref(%tiedhash, 'key'); Perl Info
|
From @jkeenanOn Wed Apr 28 00:57:52 2004, muir@idiom.com wrote:
Was that module ever released to CPAN? (Nothing at
Thank you very much. |
The RT System itself - Status changed from 'new' to 'open' |
From @muirYes. It is OOPS (http://search.cpan.org/~muir/OOPS/). I developed a workaround for the issue that complicates use of my module I would still like the GETREF tie method. Thanks, On Thu, Oct 11, 2012 at 5:21 PM, James E Keenan via RT <
|
From @dcollinsnIs there anything blocking this request to add the GETREF tie method? |
From @muirOn Wed Jul 06 13:17:48 2016, dcollinsn@gmail.com wrote:
Not that I know of. |
From [Unknown Contact. See original ticket]On Wed Jul 06 13:17:48 2016, dcollinsn@gmail.com wrote:
Not that I know of. |
Migrated from rt.perl.org#29224 (status was 'open')
Searchable as RT29224$
The text was updated successfully, but these errors were encountered: