Skip Menu |

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

Report information
The Basics
Id: 42814
Status: resolved
Priority: 0/
Queue: MooseX-AttributeHelpers

People
Owner: stevan.little [...] gmail.com
Requestors: perl [...] galumph.com
Cc:
AdminCc:

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



CC:
Subject: Sense of empty() on MooseX::AttributeHelpers::MethodProvider::ImmutableHash is backwards
Date: Mon, 26 Jan 2009 19:47:06 +0000 (GMT)
To: bug-MooseX-AttributeHelpers [...] rt.cpan.org
From: perl [...] galumph.com
Given that the code exists, I don't know that there's any fix other than putting a warning in the POD, but the empty() method on MooseX::AttributeHelpers::MethodProvider::ImmutableHash returns true when the hash isn't empty.
Actually it works exactly as the empty method in MethodProvider::List works. I think the name is probably confusing, it is meant to be used in a similar way to the predicate option in Moose. If you look at the test cases and the names used there you will see (ex: empty => has_options). I think the real solution here is to make this clear in the docs, and honestly the docs for MX::AH need a lot of care and feeding that I currently don't have time to provide. Commit bits for Moose are given out freely and people who patch docs are held in very high esteem :) - Stevan
I have gone ahead and written some (small) documentation fixes for specifically this ticket. Created commit de9d98c: documentation fixes Closing this ticket. Please re-open with better documentation patches, or swing past #moose on irc.perl.org for a commit bit.