in reply to DateTime->now problem
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 }, }; validate( @{[ 'epoch', 1301690690 ]}, $spec );
Does it say "PP" or "XS"?
Update: Added PP/XS bit.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DateTime->now problem
by Grimey (Novice) on Apr 01, 2011 at 21:35 UTC | |
by ikegami (Patriarch) on Apr 01, 2011 at 21:47 UTC | |
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 21:39 UTC | |
by Grimey (Novice) on Apr 01, 2011 at 21:45 UTC | |
|
Re^2: DateTime->now problem
by Grimey (Novice) on Apr 01, 2011 at 21:29 UTC | |
by ikegami (Patriarch) on Apr 01, 2011 at 21:34 UTC |