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

*sigh* -- I'm spoiled by perl's TAAWTDI (there's always another way to do it) heritage.

Replies are listed 'Best First'.
(bbfu) ($obj-can) Re3: object ref syntax
by bbfu (Curate) on Feb 09, 2002 at 01:43 UTC

    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.

      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