package YAMLScript::Str;
use Mo qw'xxx';

use YAMLScript::NS;

sub val {
    my ($self) = (@_);
    my $value = $$self;
    my $ns = YAMLScript::NS::ns();
    my $vars = $ns->vars;
    $value =~ s{
        \$(\w+)
    }{
        $vars->{$1} //
        ZZZ [
            $vars,
            "Can't find '$1' in namepspace vars",
        ];;
    }gex;
    $value;
}

1;
