develooper Front page | perl.perl5.porters | Postings from March 2000

Re: magic

Thread Previous
From:
Ilya Zakharevich
Date:
March 28, 2000 16:30
Subject:
Re: magic
Message ID:
200003290030.TAA03256@monk.mps.ohio-state.edu
Hugo writes:
> 
> [The suggestions here are not intended for 5.6.0, but I wanted to write
> them down while they were fresh on my soul.]
> 
> I've spent the last couple of days trying to implement a tied variable
> using U magic. After looking at Nick's comments near Tk's use of a
> similar approach (thanks Nick!), I wonder if there is a reason that
> user-definable magics ('U', '~') of the same type should not
> automatically chain.

Agreed.  For many types of magic one should be able to put several
MAGICs of the same type without any conflict, if the API would allow
this.  The current interface does not allow for correct removing of
magic if there are several, so an addition to API may be needed
anyway.  So we may add *two* new APIs: sv_magic_noreplace(), and
sv_unmagic_mg(sv, mg).

Ilya

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About