I'm trying to use a non-default constructor for a class under Pugs 6.2.13, like 
so

class MattTest {

  sub new (Class $class : Str $string) {
    say "Passed $string to the constructor for $class" ;
    return $class.bless ;
  }
  
}

my $test = MattTest.new('abc') ;

This is failing with the following output:

D:\Apps\Perl6>pugs ConstructorTest.p6
Passed abc to the constructor for MattTest
*** No such method in class MattTest: "&bless"
    at ConstructorTest.p6 line 5, column 12-25

Am I doing something wrong, or is bless currently unimplemented in Pugs, or is 
something else wrong.  I have more or less copied the code for the constructor 
from the test in oo/construction.t.

              
---------------------------------
How would you spend $50,000 to create a more sustainable environment in 
Australia?  Go to Yahoo!7 Answers and share your idea.

Reply via email to