The error that you quoted only says that the BEGIN block couldn't be compiled; it doesn't say why the BEGIN couldn't be compiled.

This is the same situation that I explained to you in Re: Re: Re: Re: Gettin ALL errors with carp module; CGI::Carp qw(fatalsToBrowser) only captures the generic "Compilation failed" error message, not all the warnings that explain why compilation failed. The only difference is this time the compilation problems are in a BEGIN block.

Once again, you can easily avoid this situation by testing your scripts from the command line to make sure they compile, before running them through the web server. Otherwise, check the server error logs for all the compilation warnings.


In reply to Re: 'use strict' causing me an error by chipmunk
in thread 'use strict' causing me an error by nysus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.