in reply to Re^4: DateTime->now problem
in thread DateTime->now problem

Identical to me. I don't know how you could be getting that error. The code in question is
if ((temp = hv_fetch(spec, "regex", 5, 0))) { dSP; IV has_regex = 0; IV ok; SvGETMAGIC(*temp); if (SvPOK(*temp)) { has_regex = 1; } else if (SvROK(*temp)) { SV* svp; svp = (SV*)SvRV(*temp); #if PERL_VERSION <= 10 if (SvMAGICAL(svp) && mg_find(svp, PERL_MAGIC_qr)) { has_regex = 1; } #else if (SvTYPE(svp) == SVt_REGEXP) { has_regex = 1; } #endif } if (!has_regex) { SV* buffer; buffer = sv_2mortal(newSVpv("'regex' validation parameter +for '", 0)); sv_catsv(buffer, get_called(options)); sv_catpv(buffer, " must be a string or qr// regex\n"); FAIL(buffer, options); }

You can probably get around the problem by using the pure Perl backend. You can do that by setting environment variable PV_TEST_PERL to something true.

PV_TEST_PERL=1 perl script.pl
or
BEGIN { $ENV{PV_TEST_PERL} = 1; }

Replies are listed 'Best First'.
Re^6: DateTime->now problem
by Grimey (Novice) on Apr 01, 2011 at 22:30 UTC

    Appears to be working. At this point I don't care about the elegance of the solution, I would rather just not have to come in this weekend to recode these scripts. Thanks for all your help ikegami

      A cleaner solution might be to delete (or rename) the file returned by

      echo $(dirname $(perldoc -l Params::Validate))/../auto/Params/Validate +/Validate.so

      It's very broken, so you don't want to use it, and P::V will fall back on the pure Perl solution.