Thanx to Google-Books here the complete passage (underlining added)

Requiring the named arguments to be specified inside a hash ensures that any mismatch, such as:

$line = padded({text=>$line, cols=>20..21, centered=>l, filler=>$SPACE});

will be reported (usually at compile time) in the caller's context:

Odd number of elements in anonymous hash at demo.pl line 42

Passing those arguments as raw pairs:

$line = padded(text=>$line, cols=>20..21, centered=>l, filler=>$SPACE);

would cause the exception to be thrown at run time, and from the line inside the subroutine where the odd number of arguments were unpacked and assigned to a hash:

Odd number of elements in hash assignment at Text/Manip.pm line 1876

The only difference in error handling that I can think of might result from unquoted keys ... (?)

Cheers Rolf


In reply to Re: Named Subroutine Parameters: Compile-time errors vs. Run-time warnings by LanX
in thread Named Subroutine Parameters: Compile-time errors vs. Run-time warnings by AnomalousMonk

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.