Bart Lateur wrote: > > >I hate it, it's miserable. Too much hidden trickery and special cases. > > Quite the countrary, I should think. Have you seen the subs > self_or_default and self_or_CGI in the source of CGI.pm? Yep, if you check out my File::Remote module I hijacked them. Thanks again, Lincoln! :-) This is exactly the thing we're trying to fix, so we're on the same page. > my $self = self() && shift; > > Now that is ugly. Blech! You're right. This would be nasty. But that's not the way it would work. :-) Check out the RFC I just submitted on it. Basically, self() would always return something worth using, just like $ME would have something worth using. Nothing would be in @_: sub mysub { ($one, $two) = @_; print "Got one = $one, two = $two" if self->config('Debug'); } self->mysub; # main->mysub print "I'm not feeling my ", self, " today.\n" # hah! Kinda neat, eh? Check out the RFC, I think you'll like it. -Nate
- Re: RFC 124 (v1) Sort order for any hash Jeremy Howard
- Re: RFC 124 (v1) Sort order for any hash Damian Conway
- Re: RFC 124 (v1) Sort order for any ha... David L. Nicol
- Re: RFC for $ME class variable (was R... Damian Conway
- Re: RFC for $ME class variable (w... Randal L. Schwartz
- Re: RFC for $ME class variabl... John Siracusa
- Re: RFC for $ME class variabl... Damian Conway
- Re: RFC for $ME class variabl... John Siracusa
- Re: RFC for $ME class variabl... Nathan Wiger
- Re: RFC for $ME class variabl... Bart Lateur
- Re: RFC for $ME class variabl... Nathan Wiger
- Re: RFC for $ME class variabl... Randal L. Schwartz
- Re: RFC for $ME class variabl... Bryan C . Warnock
- Re: RFC for $ME class variabl... Graham Barr
- Re: RFC for $ME class variable (w... Piers Cawley
- Re: RFC for $ME class variable (w... David L. Nicol
- RFC for $ME class variable (was Re: RF... Nathan Wiger
- Re: RFC 124 (v1) Sort order for any hash Damian Conway
- immediate "with" syntax and Sort ord... David L. Nicol
- RE: RFC 124 (v1) Sort order for any hash Brust, Corwin
- Re: RFC 124 (v1) Sort order for any hash as an exa... David L. Nicol