From: Brandon Black Date: Tue, 6 Jun 2006 01:33:37 +0000 (+0000) Subject: released 0.03002, exception fix, better warn output X-Git-Tag: 0.03002 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fc2b71fda3e7cebcb8df6430eb866754bf009350;p=dbsrgits%2FDBIx-Class-Schema-Loader.git released 0.03002, exception fix, better warn output --- diff --git a/Changes b/Changes index bc29ce5..d60b6c3 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for Perl extension DBIx::Class::Schema::Loader +0.03002 Tue Jun 6 01:27:25 UTC 2006 + - rethrow exceptions that occur during make_schema_at + 0.03001 Mon Jun 5 23:17:57 UTC 2006 - load_from_connection deprecation notice now mentions upgrading Catalyst::Model::DBIC::Schema if that module diff --git a/lib/DBIx/Class/Schema/Loader.pm b/lib/DBIx/Class/Schema/Loader.pm index bc04069..0bd0049 100644 --- a/lib/DBIx/Class/Schema/Loader.pm +++ b/lib/DBIx/Class/Schema/Loader.pm @@ -13,7 +13,7 @@ use Scalar::Util qw/ weaken /; # Always remember to do all digits for the version even if they're 0 # i.e. first release of 0.XX *must* be 0.XX000. This avoids fBSD ports # brain damage and presumably various other packaging systems too -our $VERSION = '0.03001'; +our $VERSION = '0.03002'; __PACKAGE__->mk_classaccessor('dump_to_dir'); __PACKAGE__->mk_classaccessor('loader'); @@ -121,7 +121,6 @@ sub _invoke_loader { $class->loader($impl->new(%{$self->_loader_args})); $class->loader->load; - $self; } diff --git a/lib/DBIx/Class/Schema/Loader/Base.pm b/lib/DBIx/Class/Schema/Loader/Base.pm index 53ea95e..1bed409 100644 --- a/lib/DBIx/Class/Schema/Loader/Base.pm +++ b/lib/DBIx/Class/Schema/Loader/Base.pm @@ -325,10 +325,11 @@ sub _dump_to_dir { my ($self) = @_; my $target_dir = $self->dump_directory; + my $schema_class = $self->schema_class; die "Must specify target directory for dumping!" if ! $target_dir; - warn "Dumping manual schema to $target_dir ...\n"; + warn "Dumping manual schema for $schema_class to directory $target_dir ...\n"; if(! -d $target_dir) { mkdir($target_dir) or die "mkdir('$target_dir') failed: $!"; @@ -338,7 +339,6 @@ sub _dump_to_dir { my $datestr = POSIX::strftime('%Y-%m-%d %H:%M:%S', localtime); my $tagline = qq|# Created by DBIx::Class::Schema::Loader v$verstr @ $datestr|; - my $schema_class = $self->schema_class; $self->_ensure_dump_subdirs($schema_class); my $schema_fn = $self->_get_dump_filename($schema_class);