Ernst Ernst #39
has 'attachments' => (
    is          => 'ro',
    isa         => 'ArrayRef[MooseX::Types::Path::Class::File]',
    default     => sub { [] },
    auto_deref  => 1,
    traits      => ['MetaDescription'],
    description => {
        type             => 'Collection',
        inside_type      => 'String',
        cardinality      => '*',
        traits           => [qw/TT Editable Friendly Transform/],
        label            => 'Attachment',
        transform_source => [map { "attachments.$_" } 0..4 ],
        transform_rule   => sub { [grep { defined } @_] },
    },
);
Copyright © 2008 Jonathan Rockway