Note that there are some explanatory texts on larger screens.

plurals
  1. POPerl issue with DateTime::Format::ISO8601 tracked to issue with Params::Validate?
    primarykey
    data
    text
    <p>Hope someone can shed some light on this...</p> <p>I, and many other developers in the team have a large scale in house perl app running. Despite this all working fine, across everyones laptops (linux and mac's), I can't for the life of me get this run on my big PC at home.</p> <p>I've installed all the dependencies via cpan, but i'm getting the following in the apache error logs when visiting the site:</p> <pre><code>The 'regex' parameter ("(?x-ism:^ (\d{4}) (\d\d) (\d\d) $)") to DateTime::Format::Builder::Parser::create_single_parser was an 'unknown', which is not one of the allowed types: scalarref at /usr/local/lib/perl/5.12.4/Params/ValidatePP.pm line 651 Params::Validate::__ANON__('The \'regex\' parameter ("(?x-ism:^ (\d{4}) (\d\d) (\d\d) $)"...') called at /usr/local/lib/perl/5.12.4/Params/ValidatePP.pm line 491 Params::Validate::_validate_one_param('Regexp=REGEXP(0x7f8a3aad06e8)', 'HASH(0x7f8a3aaea840)', 'HASH(0x7f8a3aa75aa8)', 'The \'regex\' parameter ("(?x-ism:^ (\d{4}) (\d\d) (\d\d) $)")') called at /usr/local/lib/perl/5.12.4/Params/ValidatePP.pm line 353 Params::Validate::validate('ARRAY(0x7f8a3aa33808)', 'HASH(0x7f8a3aa32db8)') called at /usr/local/share/perl/5.12.4/DateTime/Format/Builder/Parser.pm line 312 DateTime::Format::Builder::Parser::create_single_parser(undef, 'params', 'ARRAY(0x7f8a3aad0640)', 'length', 8, 'regex', 'Regexp=REGEXP(0x7f8a3aad06e8)') called at /usr/local/share/perl/5.12.4/DateTime/Format/Builder/Parser.pm line 504 DateTime::Format::Builder::Parser::sort_parsers('DateTime::Format::Builder::Parser', 'HASH(0x7f8a3aa4e2b8)', 'ARRAY(0x7f8a3aa3f148)') called at /usr/local/share/perl/5.12.4/DateTime/Format/Builder/Parser.pm line 398 DateTime::Format::Builder::Parser::create_multiple_parsers('DateTime::Format::Builder::Parser', 'HASH(0x7f8a3aa4e2b8)', 'HASH(0x7f8a3aad06b8)', 'HASH(0x7f8a3aad0808)', 'HASH(0x7f8a3aad0910)', 'HASH(0x7f8a3aad0a00)', 'HASH(0x7f8a3aad0b08)', 'HASH(0x7f8a3aad0cb8)', 'HASH(0x7f8a3aad0e50)', ...) called at /usr/local/share/perl/5.12.4/DateTime/Format/Builder/Parser.pm line 603 DateTime::Format::Builder::Parser::create_parser('DateTime::Format::Builder::Parser', 'ARRAY(0x7f8a3a72fc88)', 'HASH(0x7f8a3aad06b8)', 'HASH(0x7f8a3aad0808)', 'HASH(0x7f8a3aad0910)', 'HASH(0x7f8a3aad0a00)', 'HASH(0x7f8a3aad0b08)', 'HASH(0x7f8a3aad0cb8)', 'HASH(0x7f8a3aad0e50)', ...) called at /usr/local/share/perl/5.12.4/DateTime/Format/Builder.pm line 158 DateTime::Format::Builder::create_parser('DateTime::Format::Builder', 'ARRAY(0x7f8a3aae5450)') called at /usr/local/share/perl/5.12.4/DateTime/Format/Builder.pm line 177 DateTime::Format::Builder::create_end_parser('DateTime::Format::Builder', 'ARRAY(0x7f8a3aae5450)') called at /usr/local/share/perl/5.12.4/DateTime/Format/Builder.pm line 106 DateTime::Format::Builder::create_class(undef, 'parsers', 'HASH(0x7f8a3aae8f18)') called at /usr/local/share/perl/5.12.4/DateTime/Format/ISO8601.pm line 175 </code></pre> <p>I've stuck some noddy <code>print STDERR</code>'s directly in the <code>ValidatePP.pm</code> so if you are looking at the line numbers and they are slightly out, but basically in <code>ValidatePP.pm</code> it is getting to the following code block in <code>sub _get_type</code>:</p> <pre><code> # I really hope this never happens. return UNKNOWN; </code></pre> <p>If it helps, running a perl -v returns the following version on this PC</p> <blockquote> <p>This is perl 5, version 12, subversion 4 (v5.12.4) built for x86_64-linux-gnu-thread-multi</p> </blockquote> <p>Anybody?</p> <p>UPDATE:</p> <p>If it helps, the subroutine <code>_get_type</code> is basically deciding (using <code>UNIVERSAL::isa</code>) that <code>regex: !!perl/regexp (?x-ism:^ (\d{4}) (\d\d) (\d\d) $)</code> is not one if the following:</p> <pre><code>my %isas = ( 'ARRAY' =&gt; ARRAYREF, 'HASH' =&gt; HASHREF, 'CODE' =&gt; CODEREF, 'GLOB' =&gt; GLOBREF, 'SCALAR' =&gt; SCALARREF, ); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload