| Fey-ORM documentation | Contained in the Fey-ORM distribution. |
Fey::Meta::Attribute::FromColumn - An attribute metaclass for column-based attributes
version 0.43
package MyApp::Song;
has_table( $schema->table('Song') );
for my $attr ( grep { $_->can('column') } $self->meta()->get_all_attributes )
{
...
}
This attribute metaclass is used when Fey::ORM::Table creates attributes for the class's associated table.
This class adds a single method to those provided by
Moose::Meta::Attribute:
Returns the Fey::Column object associated with this attribute.
Dave Rolsky <autarch@urth.org>
This software is copyright (c) 2011 by Dave Rolsky.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
| Fey-ORM documentation | Contained in the Fey-ORM distribution. |
package Fey::Meta::Attribute::FromColumn; BEGIN { $Fey::Meta::Attribute::FromColumn::VERSION = '0.43'; } use strict; use warnings; use namespace::autoclean; use Moose; extends 'Moose::Meta::Attribute'; has 'column' => ( is => 'ro', isa => 'Fey::Column', required => 1, ); # The parent class's constructor is not a Moose::Object-based # constructor, so we don't want to inline one that is. __PACKAGE__->meta()->make_immutable( inline_constructor => 0 ); 1; # ABSTRACT: An attribute metaclass for column-based attributes
__END__