CatalystX::Usul::File::Schema - Base class for schema definitions


CatalystX-Usul documentation  | view source Contained in the CatalystX-Usul distribution.

Index


Name

Top

CatalystX::Usul::File::Schema - Base class for schema definitions

Version

Top

0.3.$Revision: 576 $

Synopsis

Top

   package CatalystX::Usul::File::ResultSource;

   use parent qw(CatalystX::Usul);
   use CatalystX::Usul::File::Schema;
   use Class::C3;
   use Scalar::Util qw(weaken);

   __PACKAGE__->config( schema_class => q(CatalystX::Usul::File::Schema) );

   __PACKAGE__->mk_accessors( qw(schema schema_class) );

   sub new {
      my ($self, $app, $attrs)  = @_;

      my $new = $self->next::method( $app, $attrs );

      $attrs  = { %{ $attrs->{schema_attributes} || {} }, source => $new };

      $new->schema( $new->schema_class->new( $app, $attrs ) );

      weaken( $new->schema->{source} );
      return $new;
   }

Description

Top

This is the base class for schema definitions. Each element in a data file requires a schema definition to define it's attributes that should inherit from this

Subroutines/Methods

Top

new

Creates a new instance of the storage class which defaults to CatalystX::Usul::File::Storage

Diagnostics

Top

None

Configuration and Environment

Top

None

Dependencies

Top

CatalystX::Usul
CatalystX::Usul::File::ResultSet
CatalystX::Usul::File::Storage
Scalar::Util

Incompatibilities

Top

There are no known incompatibilities in this module

Bugs and Limitations

Top

There are no known bugs in this module. Please report problems to the address below. Patches are welcome

Author

Top

Peter Flanigan, <Support at RoxSoft.co.uk>

License and Copyright

Top


CatalystX-Usul documentation  | view source Contained in the CatalystX-Usul distribution.