in reply to Re: Rosetta Dispatch Table
in thread Rosetta Dispatch Table (Interview Question)

some annotations:

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^3: Rosetta Dispatch Table
by tybalt89 (Monsignor) on Nov 26, 2017 at 18:45 UTC

    Is there a case that ->can is needed that is not caught by UNIVERSAL::callback ?

      Is there a case that ->can is needed that is not caught by UNIVERSAL::callback ?

      No, afaik; it rather catches too much. If some package ought to have a callback method which it hasn't due to some fubar, UNIVERSAL::callback kicks in - long faces, head-scratching. But! if someone writes a method/function for package UNIVERSAL, they should know what they are doing, and my bets are that you do.

      perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'