DateTime-Format-Human
view release on metacpan or search on metacpan
lib/DateTime/Format/Human.pm view on Meta::CPAN
my $evening = 18;
my $night = 22;
sub new {
my $class = shift;
my %args = validate( @_,
{
evening => {
type => SCALAR,
callbacks => {
'is >= 0 <= 23' => sub { $_[0] >= 0 && $_[0] <= 23 },
'is integer' => sub { $_[0] =~ /^\d+$/ },
},
default => $evening,
},
night => {
type => SCALAR,
callbacks => {
'is >= 0 <= 23' => sub { $_[0] >= 0 && $_[0] <= 23 },
'is integer' => sub { $_[0] =~ /^\d+$/ },
},
default => $night,
},
},
);
my $self = {
( run in 1.853 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )