Fey::Meta::Attribute::FromColumn - An attribute metaclass for column-based attributes


Fey-ORM documentation Contained in the Fey-ORM distribution.

Index


Code Index:

NAME

Top

Fey::Meta::Attribute::FromColumn - An attribute metaclass for column-based attributes

VERSION

Top

version 0.43

SYNOPSIS

Top

  package MyApp::Song;

  has_table( $schema->table('Song') );

  for my $attr ( grep { $_->can('column') } $self->meta()->get_all_attributes )
  {
      ...
  }

DESCRIPTION

Top

This attribute metaclass is used when Fey::ORM::Table creates attributes for the class's associated table.

METHODS

Top

This class adds a single method to those provided by Moose::Meta::Attribute:

$attr->column()

Returns the Fey::Column object associated with this attribute.

AUTHOR

Top

Dave Rolsky <autarch@urth.org>

COPYRIGHT AND LICENSE

Top


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__