The answer to your first question is Yes. Maybe I should add "needed" after the version?

The three constructs shown in the Synopsis are the ones needed in the example code there. It's the programmer's responsibility to track them and list them. So yes, the human factor is the weakest part of the system.

Under 5.14, keys $ref already work without any switch. Specifying use Syntax::Construct qw{ auto-deref }; wouldn't change anything for you running on 5.14 (or higher), but it would give meaningful error messages to you or anyone else trying to run it on 5.12 and below. For keys $ref, the default message isn't so bad:

Type of arg 1 to keys must be hash (not scalar dereference)

but for example for $x //= 1, I'm getting

Search pattern not terminated

in 5.8.3.

It's in fact a triple-win situation:

  1. You win as the programmer, as you have all the constructs in one place (i.e. Syntax::Construct's documentation) and you don't waste your time searching through perldeltas and other places.
  2. Users of your modules win as they get meaningful error messages telling them to what Perl version they need to upgrade.
  3. The programmer they hired to workaround the problem wins as they know what constructs to replace in the code to make it run in the ancient version.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

In reply to Re^4: Tests were run but no plan was declared and done_testing() was not seen. (Syntax::Construct) by choroba
in thread Tests were run but no plan was declared and done_testing() was not seen. by thanos1983

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.