>Currently, the current object context is passed into a sub as the first >element of @_, leading to the familiar construct: > my $self = shift; >However, this is a big PITA. In particular, if you support lots of >different calling forms (like CGI.pm), you have to check whether $_[0] >is a ref, etc, etc, etc. It is? I don't see that this is a pain at all. It seems like a beautiful point of homogenization. You don't force the user to say $self; they could use $this if they wanted. Heck, they don't need it at all. my(undef, @args) = @_; Or as in shift->fn(@_) This is one of the things that Larry, in borrowing much of Perl's OO from Python, carefully preserved from the parent tongue. Don't see why you would break it. --tom
- RFC 152 (v1) Replace $self in @_ with self() builtin (... Perl6 RFC Librarian
- Re: RFC 152 (v1) Replace $self in @_ with self() ... Hildo Biersma
- Re: RFC 152 (v1) Replace $self in @_ with sel... Dave Rolsky
- Re: RFC 152 (v1) Replace $self in @_ with sel... Nathan Wiger
- Re: RFC 152 (v1) Replace $self in @_ with... Randal L. Schwartz
- Re: RFC 152 (v1) Replace $self in @_ with self() ... Tom Christiansen
- Re: RFC 152 (v1) Replace $self in @_ with sel... Nathan Wiger
- Re: RFC 152 (v1) Replace $self in @_ with... Bart Lateur
- Re: RFC 152 (v1) Replace $self in @_ with... Tom Christiansen
- Re: RFC 152 (v1) Replace $self in @_ ... Nathan Wiger
- Re: RFC 152 (v1) Replace $self in @_ with self() ... Michael Maraist
- Re: RFC 152 (v1) Replace $self in @_ with self() ... Damian Conway
- Re: RFC 152 (v1) Replace $self in @_ with sel... Nathan Wiger
- Re: RFC 152 (v1) Replace $self in @_ with... Jonathan Scott Duff
- RE: RFC 152 (v1) Replace $self in @_ with self() ... Myers, Dirk