develooper Front page | perl.perl6.language.objects | Postings from August 2000

RE: RFC for $ME class variable (was Re: RFC 124 (v1) Sort order for any hash)

Thread Previous | Thread Next
From:
Brust, Corwin
Date:
August 21, 2000 15:01
Subject:
RE: RFC for $ME class variable (was Re: RFC 124 (v1) Sort order for any hash)
Message ID:
C9B7EC4FABC7D31199E800105AE670FA432AB2@shadmail1.alldata.net
<snip>

-----Original Message-----
From: Damian Conway [mailto:damian@cs.monash.edu.au]

And don't forget to include my idea that $ME be scoped locally like
$AUTOLOAD, so that the "self" and "this" and "I" and "myself" camps can
have their respective cakes but the rest of us don't have to eat them:

[...]

        sub self() {$ME};

</snip>

wouldn't this be a little slower then say, a pragma?


	package MEish_module;
      use module qw($ME);
	method name($newval) {
		$ME->{name} = $newval if @_;
		return $ME->{name};
	}

	package selfish_module;
	use module qw($self);
	method name($newval) {
		$self->{name} = $newval if @_;
		return $self->{name};
	}


-Corwin

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About