PHP sucks dick through a straw

Uri Guttman uri at
Fri Jan 12 19:50:43 GMT 2007

>>>>> "c" == chromatic  <chromatic at> writes:

  c> Did you mean to say "And that does not work all the time because
  c> lazy people write buggy code when they pull out the big stick of
  c> AUTOLOAD()"?  There's no *technical* reason that can() and
  c> AUTOLOAD() are incompatible.

how could you make them work if the AUTOLOAD decides on the fly whether
to support a method or not? AUTOLOAD has to do the method work itself
and it does not have an api just for testing if a method exists. you
could write an AUTOLOAD that even checks its args as to whether to
implement a method or die and can() will never be able to work around
that. AUTOLOAD would need another api which is called by can() so it can
return true/false there. maybe call it AUTOEXISTS :).


Uri Guttman  ------  uri at  --------
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------

More information about the mailing list