On Tue Oct 30 19:14:55 2012, MAUKE wrote:
Show quoted text> $ cat bug/slurpy
> #!perl
> use Method::Signatures::Simple;
> func foo(@x, $y) {}
> __END__
> $ perl bug/slurpy
> $
>
> It would be nice if Method::Signatures::Simple warned (or errored)
about
Show quoted text> putting any parameter after an array/hash in a signature.
That might be nice. But perl doesn't warn about it either:
perl -e '
use strict;
use warnings;
sub foo { my (@x, $y) = @_; return $y }
print foo(1, "foo");
'
Use of uninitialized value in print at -e line 5.
That doesn't mean we couldn't do better, but it does mean I have an
excuse for being lazy ;-)
I actually have some code that looks at the sigils in
CGI::Application::Plugin::RunmodeDeclare, so it wouldn't be too hard to
put this together. Have a look at both if you feel like implementing
this, and see the Github repos to add a pull request.
rhesa