Skip Menu |

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

Report information
The Basics
Id: 57023
Status: resolved
Priority: 0/
Queue: MooseX-ConfigFromFile

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

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



Subject: Unnecessary use of ->meta considered harmful
This is all wrong; my $cfmeta = $class->meta->get_attribute('configfile'); $configfile = $cfmeta->default if $cfmeta->has_default; Really. What is the point of that over something like; $configfile = eval { $class->configfile }; In my example code, it is actually WRONG because I want to specify an array ref as the default. Going through ->meta for things like this is like using $object->{attribute}
On Wed Apr 28 22:43:35 2010, SAMV wrote: Show quoted text
> Really. What is the point of that over something like; > > $configfile = eval { $class->configfile }; >
I second this. get_attribute does not work in subclasses, it should really be find_attribute_by_name - but using eval as above would solve this problem as well.
Fixed in 0e88ec8