Skip Menu |
 

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

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

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

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



Subject: Named arguments do not treat undef arguments differently than unsupplied arguments
Download (untitled) / with headers
text/plain 744b
There should be a way to distinguish whether a method was called as $obj->method() vs. $obj->method(foo => undef) by examining @_. This is possible when using positional arguments ($foo will be missing in the arg list in the former case, and undef in the latter), but not for named arguments. Failing unit test is added as t/undef_method_arg2.t to my github - https://github.com/karenetheridge/moosex-method-signatures/. Somewhat orthogonally, I'm wondering if there should be a separate lexical provided which allows one to examine the arguments passed as a hash, so one can do defined vs. exists checks on the hash keys, as one would do when calling the method in a more vanilla style (processing the args as my ($self, %options) = @_; ).


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.