On Wed, 23 Aug 2000 18:02:21 -0700, Nathan Wiger 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? These serve to check if a sub is called as a function or as a method. A dirty hack if you ask me, and buggy, because if you call it as a function with a certain string as a first argument, it will erroniously think it was a class method. >We have ref(), want(), and other calls to find out context, why not >self() to backtrace package context? my $self = self() && shift; Now that is ugly. Or, do you mean: my $class = ref self() || self(); How much overhead would this have over $ME? What advantages would it give? -- Bart.
- Re: RFC 124 (v1) Sort order for any hash Damian Conway
- 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