Re: $ME in a method called as a subroutine
[email protected] ("David L. Nicol")
| Newsgroups | perl.perl6.language.objects |
|---|---|
| Organization | University of Missouri - Kansas City supercomputing infrastructure |
| Message-ID | <[email protected]> |
Markus Peter wrote: > > ... then I run into trouble > if the method author does not even know wether its procedural or OO. What I wrote is dependent on an environmnet where the C<method> keyword is used to write methods that are distinct from subroutines, and also, a C<sub> with the same name could be written, causing the sub to be called in procedural-style accesses. Distinguishing methods from subroutines syntacticly is trivial, we already knows what happens when a procedure is called as a method. So if the author wants to distinguish he can write both versions! One will probably generally wrap something up and call the other.