On Wed, Aug 09, 2000 at 02:08:09PM +0200, Bart Lateur wrote:
> On Wed, 09 Aug 2000 11:41:20 +0100, Hildo Biersma wrote:
> 
> >Could we agree on the idea that CGI.pm should be split up?
> 
> No. I could agree that
> 
>       CGI->somemethod(@args);
> 
> would do exactly the same as
> 
>       CGI::somemethod(@args);
> 
> i.e. no difference between function calls and class methods, unless the
> method explicitely wants to know.

Either you are asking for a language change here, or you are suggesting that
the dual API remain so that $cgi->somemethod(@args); calls the same
sub as above. Which is what I think people want to get away from.

> Why make module authors' life even more miserable?
> 
> Passing the class/object in a magic variable, e.g. $SELF, instead of in
> the arguments list, is one way.

That is being considered. IF that does become part of the language I could
see subs do something like

  if (defined $SELF) {
    called as a method
  }
  else {
    called as a sub
  } 

Graham.

Reply via email to