Hello Rakuns, How do i access the declarator block of my object method? I'm trying to do this, but it's not working: class A { #|( This is just a test with 3 parameters: * p1 - parameter 1 * p2 - parameter 1 * p2 - parameter 1 ) method test($p1, $p2, $p3) { say "Invoked: [$p1] [$p2] [$p3]"; } } sub MAIN(*@args) { my $a = A.new; $a.test(|@args); CATCH { when X::AdHoc { say $a.test.WHY; # TODO: This is wrong :-( } } } $ raku test.raku 1 2 Too few positionals passed; expected 4 arguments but got 1 in method test at test.raku line 8 in block at test.raku line 18 in any at test.raku line 16 in method test at test.raku line 8 in sub MAIN at test.raku line 15 in block <unit> at test.raku line 1 Is it possible to do what i want? How can i fix it? I tried several ways (like trying A::test.WHY; ) and all failed... Regards, David Santiago
How to use WHY on a object's method?
David Emanuel da Costa Santiago Mon, 17 Jan 2022 09:34:07 -0800
- How to use WHY on a object's method? David Emanuel da Costa Santiago
- Re: How to use WHY on a object's meth... Clifton Wood
- Re: How to use WHY on a object's ... David Emanuel da Costa Santiago