| CatalystX-Usul documentation | view source | Contained in the CatalystX-Usul distribution. |
CatalystX::Usul::File::Storage - Factory subclass loader
0.3.$Revision: 576 $
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;
}
Loads and instantiates a factory subclass
Loads the subclass specified by the class package attribute and returns an instance of it
None
None
There are no known incompatibilities in this module
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Peter Flanigan, <Support at RoxSoft.co.uk>
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
| CatalystX-Usul documentation | view source | Contained in the CatalystX-Usul distribution. |