in reply to Speaking of indirect object notation...

No, because how is perl supposed to guess you want caller's warn() instead of the built-in one?
  • Comment on Re: Speaking of indirect object notation...

Replies are listed 'Best First'.
Re^2: Speaking of indirect object notation...
by blazar (Canon) on Apr 21, 2005 at 16:31 UTC
    Well, you can persuade the parser to parse a builtin with your own sub, I thought there could have been a (arcane, hackery, tricky) way to persuade it to disambiguate the expression giving preference to the indirect object notation.
      . . . you can persuade the parser to parse a builtin with your own sub, . . .

      Actually, you're replacing the builtin with your sub, not "persuading the parser" to do squat. The only ways to "persuade the parser" to do what you want are

      • $caller->warn( ... )
      • my_warn $caller ( ... )

      Sorry.