use strict;
use warnings;
-use base qw/DBIx::Class::Schema/;
-use base qw/Class::Data::Accessor/;
+use base qw/DBIx::Class::Schema Class::Data::Accessor/;
use Carp::Clan qw/^DBIx::Class/;
use UNIVERSAL::require;
use Class::C3;
# brain damage and presumably various other packaging systems too
our $VERSION = '0.03999_01';
-__PACKAGE__->mk_classaccessor('dump_to_dir');
__PACKAGE__->mk_classaccessor('_loader_args' => {});
-__PACKAGE__->mk_classaccessor('_loader_invoked');
+__PACKAGE__->mk_classaccessors(qw/dump_to_dir _loader_invoked _loader/);
=head1 NAME
croak qq/Could not load storage_type loader "$impl": / .
qq/"$UNIVERSAL::require::ERROR"/;
- $impl->new(%$args)->load;
+ $self->_loader($impl->new(%$args));
+ $self->_loader->load;
$self->_loader_invoked(1);
$self;
$target->connection(@$connect_info);
}
+=head2 rescan
+
+Re-scans the database for newly added tables since the initial
+load, and adds them to the schema at runtime, including relationships,
+etc. Does not process drops or changes.
+
+Returns a list of the new monikers added.
+
+=cut
+
+sub rescan { my $self = shift; $self->_loader->rescan($self) }
+
=head1 EXAMPLE
Using the example in L<DBIx::Class::Manual::ExampleSchema> as a basis