Re: RFC 200 (v2) Objects: Revamp tie to support extensibility (Massive tie changes)

[email protected] (Damian Conway) Thu, 21 Sep 2000 07:34:27 +1100 (EST)
Newsgroups perl.perl6.language.objects
Message-ID <[email protected]>
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.

Damian