in reply to Re^2: DateTime->now problem
in thread DateTime->now problem
What's the output of the following?
use strict; use warnings; use Params::Validate qw( validate validate_pos UNDEF SCALAR BOOLEAN HASHREF OBJECT ); print($INC{'Params/ValidateXS.pm'} ?'XS':'PP',"\n"); my $spec = { epoch => { regex => qr/^-?(?:\d+(?:\.\d*)?|\.\d+)$/ }, locale => { type => SCALAR | OBJECT, optional => 1 }, language => { type => SCALAR | OBJECT, optional => 1 }, time_zone => { type => SCALAR | OBJECT, optional => 1 }, formatter => { type => SCALAR | OBJECT, can => 'format_datetime', optional => 1 }, }; use Devel::Peek; Dump($spec->{epoch}{regex}); my $x = $spec->{epoch}{regex}; Dump($spec->{epoch}{regex}); validate( @{[ 'epoch', 1301690690 ]}, $spec );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: DateTime->now problem
by Grimey (Novice) on Apr 01, 2011 at 21:55 UTC | |
by ikegami (Patriarch) on Apr 01, 2011 at 21:58 UTC | |
by Grimey (Novice) on Apr 01, 2011 at 22:30 UTC | |
by ikegami (Patriarch) on Apr 01, 2011 at 22:45 UTC |