On Tue, 2 Dec 2003, Jost Krieger wrote:
> t/21bad_params..........Subroutine validate_pos redefined at
> /usr/local/perl-5.8.1/lib/site_perl/5.8.1/Params/ValidatePP.pm line 53.
> Subroutine validate redefined at
> /usr/local/perl-5.8.1/lib/site_perl/5.8.1/Params/ValidatePP.pm line 198.
> Subroutine validate_with redefined at
> /usr/local/perl-5.8.1/lib/site_perl/5.8.1/Params/ValidatePP.pm line 357.
> Use of uninitialized value in subtraction (-) at
> /net/sunu991/disc1/.cpanplus/5.8.1/build/DateTime-0.19/blib/lib/DateTime.pm line 431.
> Use of uninitialized value in numeric gt (>) at
> /net/sunu991/disc1/.cpanplus/5.8.1/build/DateTime-0.19/blib/lib/DateTime.pm line 164.
> # Failed test (t/21bad_params.t at line 26)
> # 'The 'name' parameter (undef) to DateTime::TimeZone::new was an
> 'undef', which is not one of the allowed types: scalar
> # Params::Validate::__ANON__('The \'name\' parameter (undef) to
> DateTime::TimeZone::new was...') called at
> /usr/local/perl-5.8.1/lib/site_perl/5.8.1/Params/ValidatePP.pm line 448
> #
> Params::Validate::_validate_one_param('undef','HASH(0x2e9098)','HASH(0x2e7a3c)','The
> \'name\' parameter (undef)') called at
> /usr/local/perl-5.8.1/lib/site_perl/5.8.1/Params/ValidatePP.pm line 338
> # Params::Validate::validate('ARRAY(0x3292a4)','HASH(0x2e9110)') called at
> /usr/local/perl-5.8.1/lib/site_perl/5.8.1/DateTime/TimeZone.pm line 30
> # DateTime::TimeZone::new('undef','name','undef') called at
> /net/sunu991/disc1/.cpanplus/5.8.1/build/DateTime-0.19/blib/lib/DateTime.pm line 181
> # DateTime::new('undef','year',2000) called at t/21bad_params.t line 25
> # eval {...} called at t/21bad_params.t line 25
> # '
> # doesn't match '(?-xism:did not pass)'
This turns out to be a bug in the pure Perl implementation of
Params::Validate. It's fixed in 0.72, along with the warnings you were
seeing.
-dave