Subject: | subroutine redefined errors |
ValidatePP.pm is redefining three functions defined in ValidateXS.pm.
Show quoted text
>Subroutine validate_pos redefined at
>/usr/lib/perl5/site_perl/5.8.0/Params/ValidatePP.pm line 53.
>
>Subroutine validate redefined at
>/usr/lib/perl5/site_perl/5.8.0/Params/ValidatePP.pm line 132.
>
>Subroutine validate_with redefined at
>/usr/lib/perl5/site_perl/5.8.0/Params/ValidatePP.pm line 281.
We are using version 0.65 of Params::Validate, but I did not see this mentioned in the changelogs, so I believe it is broken up to the current version.
Validate.pm has a fix for this same issue with validation_options:
if ( $@ || $ENV{PV_TEST_PERL} )
{
# suppress a subroutine redefined warning
undef &Params::Validate::validation_options;
require Params::ValidatePP;
}
The fix is probably as simple as adding the following lines before requiring Params::ValidatePP:
undef &Params::Validate::validate_pos;
undef &Params::Validate::validate;
undef &Params::Validate::validate_with;
The errors can be reproduced by:
#!/usr/bin/perl -w
use Params::Validate;