Bart Lateur wrote: > > 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. > > 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. Yikes. Class method calls should perform inheritance, subroutine calls should not. Altering the language to make the two look the same is a bad idea, because it breaks, fatally, as soon as the class supports more than one object at a time. Instead of changing the language to make a crufty interface work, the interface should be changed... Hildo
- How to implement both object->method and module::fu... Garrett Goebel
- Re: How to implement both object->method and m... Bart Lateur
- Re: How to implement both object->method a... Jonathan Scott Duff
- Re: How to implement both object->meth... Hildo Biersma
- Re: How to implement both object->... Graham Barr
- Re: How to implement both object... Hildo Biersma
- Re: How to implement both ob... Philip Newton
- Re: How to implement bot... Hildo Biersma
- Re: How to implement bot... Graham Barr
- Re: How to implement bot... Bart Lateur
- Re: How to implement bot... Hildo Biersma
- Re: How to implement bot... Bart Lateur
- Re: How to implement bot... Graham Barr
- Re: How to implement bot... Graham Barr
- Re: How to implement bot... Bart Lateur
- Re: How to implement both object... John Berthels
- Re: How to implement both ob... Jonathan Scott Duff
- Re: How to implement bot... Graham Barr
- Re: How to implement bot... Chaim Frenkel
- Re: How to implement bot... Graham Barr
- Re: How to implement bot... Chaim Frenkel