CatalystX::Usul::File::Storage - Factory subclass loader


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

Index


Name

Top

CatalystX::Usul::File::Storage - Factory subclass loader

Version

Top

0.3.$Revision: 576 $

Synopsis

Top

   package CatalystX::Usul::File::Schema;

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

   __PACKAGE__->config( storage_class => q(CatalystX::Usul::File::Storage) );

   __PACKAGE__->mk_accessors( qw(storage storage_class) );

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

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

      $attrs  = { %{ $attrs->{storage_attributes} || {} }, schema => $new };
      $new->storage( $new->storage_class->new( $app, $attrs ) );

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

Description

Top

Loads and instantiates a factory subclass

Subroutines/Methods

Top

new

Loads the subclass specified by the class package attribute and returns an instance of it

Diagnostics

Top

None

Configuration and Environment

Top

None

Dependencies

Top

CatalystX::Usul

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.