Name
CatalystX::Usul::File::Storage - Factory subclass loader
Version
0.3.$Revision: 576 $
Synopsis
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
Loads and instantiates a factory subclass
Subroutines/Methods
new
Loads the subclass specified by the class package attribute and returns an instance of it
Diagnostics
None
Configuration and Environment
None
Dependencies
Incompatibilities
There are no known incompatibilities in this module
Bugs and Limitations
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Author
Peter Flanigan, <Support at RoxSoft.co.uk>
License and Copyright
Copyright (c) 2008 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE