in reply to Variable Name Mistery. Who calls?
Maybe you can reliably do this with some B magic or something but there's no simple solution that I know of. For instance, consider the following code...
With $p, $q, and $r as three different names for the same object, how would you want that to behave?package P; sub new { bless {} } sub print_my_var { ... } package main; my $p = P->new(); my $q = $p; *r = $p; $p->print_my_var(); $q->print_my_var(); $r->print_my_var();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Variable Name Mistery. Who calls?
by porta (Sexton) on Oct 25, 2006 at 18:53 UTC | |
by ikegami (Patriarch) on Oct 25, 2006 at 19:16 UTC | |
by cephas (Pilgrim) on Oct 25, 2006 at 19:26 UTC | |
by porta (Sexton) on Oct 25, 2006 at 22:17 UTC | |
by ikegami (Patriarch) on Oct 26, 2006 at 02:19 UTC | |
by ysth (Canon) on Oct 26, 2006 at 00:01 UTC |