... eval { $DT = DateTime->new( year => $year, time_zone => $tz ); }; return if $@; ... #### The 'name' parameter (undef) to DateTime::TimeZone::new was an 'undef', which is not one of the allowed types: scalar at /idcom/weblive/extperl/lib/perl5/site_perl/5.8.5/DateTime/TimeZone.pm line 34 DateTime::TimeZone::new('undef', 'name', 'undef') called at /idcom/weblive/extperl/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/DateTime.pm line 192 DateTime::new('undef', 'year', 2010, 'time_zone', 'Europe/London') called at TZInfo.pm line 33 TZInfo::get_dst_changes(2010, 'Europe/London') called at ./nz.pl line 1039 #### ... sub new { my $class = shift; my %p = validate( @_, $NewValidate ); ... #### @_ set to: $VAR1 = [ 'year', 2010, 'time_zone', 'Europe/London' ]; %p set to: $VAR1 = {};