Skip Menu |

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

Report information
The Basics
Id: 47291
Status: rejected
Priority: 0/
Queue: MooseX-Declare

Owner: rafl [...]
Requestors: mschwern [...]

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

Subject: Make is => 'rw' the default for has()
Download (untitled) / with headers
text/plain 411b
This couldn't be changed in Moose for compatibility reasons, but MooseX::Declare doesn't have the same strictures. Could has() be changed so the default for "is" is "rw"? It would save a lot of lines of repeated code. The current behavior when you leave off "is", you get no accessor, is not generally useful and is difficult to debug. Instead replace it with "no_accessor => 1" or something more explicit.
Download (untitled) / with headers
text/plain 422b
It's not just backwards compatability; every time this comes up, we have a discussion, and we agree that a default for 'is' is undesirable for more reasons. Read the mailing list archives (I don't have a message-id sadly, but it just came up a week or two ago). I don't think anything about MooseX::Declare changes that. (The fact that you want is => 'rw' and many people would want is => 'ro' is one of those reasons.)
Download (untitled) / with headers
text/plain 269b
I mostly agree with hdp. I might add new syntax for changing the default for 'is' and other attribute properties explicitly. class Foo is rw { ... } might be one way of providing what you want. But I won't change the default for 'is'. Hence I'm rejecting this bug.

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

Please report any issues with to