Stevan Little skribis 2006-01-19 15:45 (-0500):
> class Foo {
> method new ($class: %params) {
> $class.bless(%params);
Wouldn't that be %params.bless($class), or more directly,
%params.blessed = $class?
> This *won't* work the same in Perl 6 though. This is because,
> what is blessed is not a literal "hash", but an instance of ^Hash.
The mistake here is that Foo doesn't "does Hash", I think.
Sure, in Perl 5, you could have different kinds of references as
instances of the same class. But I don't recall ever having encountered
that.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html