class InDeclareString is dirty { use overload '""' => 'to_string'; has val => (is => 'rw'); method to_string { sprintf "(%s)", $self->val } };
works perfectly.
Many thanks
In reply to Re^4: MooseX::Declare and overload
by FunkyMonk
in thread MooseX::Declare and overload
by FunkyMonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |