Backward compatibility to 5.005.

Also, I couldn't figure out how to get Sub::Signature to handle a simple open ended named parameter hash like

function_name( aname => 'value', anothername => 'value' );

Honestly, given the docs, I'm not sure it can.

And Sub::Signatures shows a disconcerting tendency to break even simple code.

#!/usr/local/bin/perl use strict; use Sub::Signatures; my $example = { 'null_sub' => sub { null_sub( handle => 'Test', 'thing' => 'someth +ing')}, }; sub null_sub { }

The above runs fine only if you comment out the 'use Sub::Signatures;'.

Wierdly, changing the everywhere that says 'null' to 'method' works fine:

#!/usr/local/bin/perl use strict; use Sub::Signatures; my $example = { 'null_method' => sub { null_method( handle => 'Test', 'thing' => ' +something')}, }; exit; sub null_method { }

I think Sub::Signatures is trying to address a different problem. I think he is trying to add 'multi-dispatch' by method signature rather than simplify parameter parsing. I also think it is very fragile.


In reply to Re^2: RFC named parameter syntactic sugar by snowhare
in thread RFC named parameter syntactic sugar by snowhare

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.