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
('abc'));
# Check to see the class is the right kind of thing:
say $test.WHAT
# Output the class as a readable string
say $test.perl;
- Original Message
From: Matthew Keene [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 15, 2007 5:02:56 AM
Subject: Error calling bless
:56 AM
Subject: Error calling bless in non-default constructor
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
]
Sent: Tuesday, May 15, 2007 5:02:56 AM
Subject: Error calling bless in non-default constructor
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