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.
|