develooper Front page | perl.perl5.porters | Postings from February 2018

Re: getting at the "invoked" tied variable

Thread Previous
Father Chrysostomos
February 11, 2018 18:08
Re: getting at the "invoked" tied variable
Message ID:
I wrote:
> My previous response was rather quick and I had not thought it
> through.  It's tricky.
> If you want to localise your tied-variable variable properly, then you
> will have to forego Perl's tie mechanism and implement your own, which
> you will of course call from your own get- and set-magic routines.
> If you think that recording the tied variable does not need to be
> undone after the FETCH/STORE call (so the scope is similar to $!),
> then cast after tying.  The last magic to be attached is trig-
> gered first.

And you would probably want to store a weak reference to the tied var-
iable if you use that approach.

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About