Re: Tying sub arguments is rare?
[email protected] (Graham Barr) Wed, 13 Oct 1999 16:24:43 -0500
| Newsgroups | perl.perl6.porters |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Oct 13, 1999 at 02:10:07PM -0700, Chip Salzenberg wrote:
> > But then Tk will need a lot of work if XS is not going to be
> > compatible as it stresses XS now :-)
>
> I see a thin thread of hope. Are the ties via references user-visible?
I am not sure what you mean, but I have seen tie used as
sub abc {
# ... code ...
tie $_[1], 'Package';
# ... code ...
}
and also
sub def {
my $ref = shift;
tie $$ref, 'Package';
# ... code ...
}
It is the latter of the two that I seem to remember being used
with some Tk modules. Normally to detect when the variable
was changed.
--
For myself I am an optimist--it does not seem to be much use being
anything else. -- Winston Churchill