On Thursday, October 10, 2002, at 05:11 PM, Larry Wall wrote:
my MyClass $obj = .new;
<snip>
Thanks for the clarification. I like those two OK, personally. If I were chained to one of those, I wouldn't chew my leg off.my new MyClass $obj;
Tying it together with the other thread to make people *really* scream:
On Tue, Oct 08, 2002 at 06:07:09PM -0700, Larry Wall wrote:
I've always wondered what the ! postfix operator means. The mathematiciansMaybe postfix ! on a class name means to autoinstantiate an object of the named class only if/when first accessed:
think they know. :-)
our FancyCache $cache; # declare, but leave undef
our FancyCache! $cache; # undef, but new() it if/when we need it
our $cache returns FancyCache!; # the same
(That's just a joke. Um, I think. Hmm...)
:-) :-) :-)
MikeL