Damian Conway <[EMAIL PROTECTED]> writes:

> I didn't see any mention of my plea that C<tie> should pass the 
> original variable being tied as one of its arguments. :-(
> 
> E.g.:
> 
>       sub ReadOnly::TIESCALAR {
>               my ($class, $original, @otherargs) = @_;
>               bless {
>                       internals => \@otherargs,
>                       value     => $original,
>                     }, $class
>       }
> 
>       sub ReadOnly::FETCH { return $_[0]->{value} }
> 
>       # and later:
> 
>       my $x = 10;
>       tie $x, 'ReadOnly';
>       print $x;       # still prints 10
> 
> 
> I feel that additional functionality is *very* important.

Seconded. Really, really strongly. Even if it does smack of *very*
spooky action at a distance if one isn't careful. But that's the whole
point of tie...

-- 
Piers

Reply via email to