Maybe use around?
around 'now' => sub { my $orig = shift; my $self = shift; return $self->$orig( @_ ) + 0; }
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re: Moose - ensuring a getter returns a number
by Fletch
in thread Moose - ensuring a getter returns a number
by perl5ever
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |