#!/usr/bin/perl6
class Valute {
has Str $.currency is rw = "test";
has $.fun;
method new(Str $currency_?, Str :$currency = $currency_) {
say "asd";
}
method fun{
self.currency.say
}
}
my $a = Valute.new(currency=>"asdf");
$a.fun;
IyEvdXNyL2Jpbi9wZXJsNgpjbGFzcyAgVmFsdXRlIHsKICAgIGhhcyBTdHIgJC5jdXJyZW5jeSBpcyBydyA9ICJ0ZXN0IjsKICAgIGhhcyAkLmZ1bjsKICAgCiAgICBtZXRob2QgbmV3KFN0ciAkY3VycmVuY3lfPywgU3RyIDokY3VycmVuY3kgPSAkY3VycmVuY3lfKSB7CiAgICAgICAgc2F5ICJhc2QiOwoKICAgIH0KCiAgICBtZXRob2QgZnVuewogICAgICAgIHNlbGYuY3VycmVuY3kuc2F5CiAgICB9Cgp9Cm15ICRhID0gVmFsdXRlLm5ldyhjdXJyZW5jeT0+ImFzZGYiKTsKJGEuZnVuOw==