On Mon, Nov 02, 2009 at 09:31:52PM -0600, Jesse Luehrs wrote:
On Mon, Nov 02, 2009 at 08:54:04PM -0600, Jesse Luehrs wrote:
Maybe this is another point in favor of dropping the
whole legal options concept in general?
perigrin on IRC pointed out that we've been thinking about replacing the
When parsing documents, if my code finds more than one title in a document,
it's an error because we don't know which title is needed. The user should be
able to override this in the constructor and provide their own title (this is
actually true for several attributes):
my $parser =
Excerpts from Ovid's message of Tue Nov 03 11:01:12 -0500 2009:
When parsing documents, if my code finds more than one title in a document,
it's an error because we don't know which title is needed. The
user should be able to override this in the constructor and provide their own
title
On Tue, Nov 3, 2009 at 10:01 AM, Ovid publiustemp-catal...@yahoo.com wrote:
When parsing documents, if my code finds more than one title in a document,
it's an error because we don't know which title is needed. The user should
be able to override this in the constructor and provide their own
Excerpts from Evan Carroll's message of Tue Nov 03 11:38:47 -0500 2009:
On Tue, Nov 3, 2009 at 10:01 AM, Ovid publiustemp-catal...@yahoo.com wrote:
When parsing documents, if my code finds more than one title in a document,
it's an error because we don't know which title is needed. The user
This might be preferable to my suggestion if your object's methods are being
called mid-parse, rather than building up a data structure first and setting
attributes based on it after parsing is done. Even then, I think I'd rather
have a separate method than modify the accessor.
Yea that was
Excerpts from Evan Carroll's message of Tue Nov 03 11:55:04 -0500 2009:
has 'attribute' = ( isa = 'Str', is = 'rw', predicate = 'has_attribute' );
around 'attribute' = sub {
my ($next, $this, $key) = @_;
if ( $key ) {
$self-has_attribute ? die 'exception' : $this-$next($key);
}
On Tue, Nov 03, 2009 at 10:30:41AM +0200, Tuomas Jormola wrote:
On Mon, Nov 02, 2009 at 09:31:52PM -0600, Jesse Luehrs wrote:
On Mon, Nov 02, 2009 at 08:54:04PM -0600, Jesse Luehrs wrote:
Maybe this is another point in favor of dropping the
whole legal options concept in general?
On Tue, Nov 03, 2009 at 11:09:19AM -0600, Evan Carroll wrote:
around 'attribute' = sub {
my ($next, $this, $key) = @_;
unless ( $this-meta-get_attribute('attribute')-has_init_arg ) {
if ( $key ) {
$self-has_attribute ? die 'exception' :
In the docs I see this for Moose::Meta::Attribute
## EXCERPT
get_value
set_value
eval { $point-meta-get_attribute('x')-set_value($point, 'forty-two') };
if($@) {
print Oops: $...@\n;
}
Attribute (x) does not pass the type constraint (Int) with 'forty-two'
On Tue, Nov 03, 2009 at 05:21:12PM -0600, Evan Carroll wrote:
perl -Moose -e'has q[format_feed]= ( isa = Str, is = ro );
print Class-new-meta-get_attribute(q[format_feed])-get_value()'
get_value and set_value both require the instance as the first argument,
as pointed out in the docs for
11 matches
Mail list logo