in reply to Re^3: $obj->method v.s. $obj->method()
in thread $obj->method v.s. $obj->method()

IIRC it's $obj->$method that wouldn't work in 5.4 (and 5.6?) while $obj->$method() would.

Replies are listed 'Best First'.
Re^5: $obj->method v.s. $obj->method()
by Burak (Chaplain) on May 09, 2009 at 17:03 UTC
    You're possibly right :)
      FWIW: In both versions 5.004_02 and 5.004_04 (from different builds) that I have:
      • $obj->method; (no arguments) and  $obj->method(@args); (with arguments) both work;
      • no non-parenthesized invocation with arguments (of those I have tried) works.
        can you also try this:
        my $method = "foo"; $obj->$method; $obj->$method @args;