Michael G. Schwern
Michael G. Schwern
I just came across this module and it basically solves the architectural problems with Method::Signatures. I think it's superior and would like to make a fully compatible wrapper. There's some...
CC: @chocolateboy I found a strange interaction between Function::Parameters and true.pm. ``` # Foo.pm package Foo; use Function::Parameters; use true; fun foo() {} ``` If I load Foo.pm it's fine....
``` As with hash initialization, you can specify the same key multiple times and the last occurrence wins: rectangle(height => 1, width => 2, height => 2, height => 5);...
``` $ perl -wle 'use Function::Parameters qw(:strict); method foo(@bar = (1,2,3)) {} main->foo()' In method foo: array @bar can't have a default value at -e line 1. ``` I don't...
Method::Signatures supports required slurpies. ``` $ perl -MMethod::Signatures -wle 'method foo (@foo!) {} main->foo' In call to main::foo(), missing required argument @foo at -e line 1. ``` The idea that...
``` $ perl -wle 'use Function::Parameters qw(:strict); method foo($bar) {} main->foo()' Too few arguments for method foo (expected 2, got 1) at -e line 1. main::foo("main") called at -e line...
Add ""=
Similar to #10, it has the same rationale but I'm doing this in a separate issue since it requires making up new syntax. The third common reason to apply a...
Defaults are normally applied when the argument isn't passed in at all. This leaves the problem of what to do when an arg is undefined or false. ``` fun hello($place="World")...
Strict function parameters are about explicitly expressing intent and preventing mistakes, by both the caller and by the person writing the function. `fun foo` should be equivalent to `fun foo()`...
If a command class uses Moose (or Mouse) the "Usage" output will be lost. Even with "no Moose". ``` $ perl -Ilib bin/test foo Error: This will never work Usage:...