Skip Menu |

This queue is for tickets about the MooseX-Method-Signatures CPAN distribution.

Report information
The Basics
Id: 80355
Status: new
Priority: 0/
Queue: MooseX-Method-Signatures

People
Owner: Nobody in particular
Requestors: MAUKE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.43
Fixed in: (no value)



Subject: Default arguments underdocumented/broken(?)
#!perl use MooseX::Method::Signatures; method foo($v = sqrt 2) { } __END__ Error parsing parameter near 'sqrt' in '$v = sqrt 2' at /home/mauke/usr/lib/perl5/site_perl/5.16.1/MooseX/Method/Signatures/Meta/Method.pm line 199. I don't understand what's wrong with this code. The default argument seems perfectly sensible to me. Unfortunately the only documentation I could find for this feature is "method foo ($a = 42) # defaults to 42". It would be good if the documentation explained how exactly default arguments work.