lhoward has asked for the wisdom of the Perl Monks concerning the following question:
Example code : I want to access the value of $t (or whatever the variable being tied is) in the TIESCALAR call. How can I get it? Or can I get it at all?
I've been through the perltie docs, the Tie chapter of Advanced Perl Programming and the source code for several of the Tie:: modules, but can't seem to find any pointers.package TestTie; sub TIESCALAR{ my $pkg=shift; my $obj=[] ; bless $obj, $pkg; return $obj; } package main; my $t=9; tie $t , 'TestTie';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Access to tied variable in the tie constructor???
by Anonymous Monk on May 27, 2000 at 14:50 UTC | |
by lhoward (Vicar) on May 27, 2000 at 16:07 UTC |