Mar 3, 2002, 1:33 PM
Post #2 of 4
Tying is a more general feature. It can do all you requested, but someone has to write the class.
You can use tie to bind a variable to a class. Whenever that variable is accessed, special methods in that class are being called to fetch a value from the variable or to store a value in it, for example.
All the details are in the [url=http://www.perldoc.com/perl5.6.1/pod/perltie.html]perltie manpage.
At last with an effort he spoke, and wondered to hear his own words, as if some other will was using his small voice. "I will take the Ring," he said, "though I do not know the way."