in reply to object ref syntax
If i do my $b=$bar."_edit" and $o->$b() it works, but I don't wanna make temp vars like that.But that's about the only way to do an indirect method call. You can horse around with UNIVERSAL::can to get at it a bit differently, but you're still gonna end up with either a temporary variable or a value in passing.
Symbolic method calls are rare enough that it was deemed reasonable to restrict them to simple scalars.
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: object ref syntax
by jhanna (Scribe) on Feb 08, 2002 at 23:55 UTC | |
by bbfu (Curate) on Feb 09, 2002 at 01:43 UTC | |
by Anonymous Monk on Feb 10, 2002 at 01:31 UTC |