On Sat, Sep 27, 2008 at 06:50:00PM +0100, Matt S Trout wrote:
> Instead, I think what you really want it one of
> 
> (1) export attribute declarators, so -
> 
> use MooseX::Attributes::File qw(has_file);
> 
> has_file 'infile';
> has_file 'outfile';
> 
> (2) an attribute metaclass that provides what you want as defaults
> 
> has 'infile' => (metaclass => 'File');
> has 'outfile' => (metaclass => 'File');

As to 2, I made a really dorky simple MooseX for doing this easily
a little while ago -- MooseX::AttributeDefaults.  Would love some
feedback on it if it's useful for you. :)

Reply via email to