in reply to Re: Re: object ref syntax
in thread object ref syntax

Just to elucidate on merlyn's can method (no pun intended), the following works just fine:

$b = "foo"; $o->can($b . "_edit")->();

bbfu
Seasons don't fear The Reaper.
Nor do the wind, the sun, and the rain.
We can be like they are.

Replies are listed 'Best First'.
Re: (bbfu) ($obj-can) Re3: object ref syntax
by Anonymous Monk on Feb 10, 2002 at 01:31 UTC
    If you call a method like a function, and in this case you do, you want to pass the object as the first argument. $o->can($b . "_edit")->($o); -Anomo