From: Jess Robinson Date: Sat, 29 Sep 2007 22:37:07 +0000 (+0000) Subject: Fix "redefined" errors resulting from loading a Schema twice. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=978b42af8b7a0e58351cc833698c80a4df99e4db;p=dbsrgits%2FDBIx-Class-Historic.git Fix "redefined" errors resulting from loading a Schema twice. --- diff --git a/lib/DBIx/Class/Schema.pm b/lib/DBIx/Class/Schema.pm index 6e8b7fc..81f050c 100644 --- a/lib/DBIx/Class/Schema.pm +++ b/lib/DBIx/Class/Schema.pm @@ -600,6 +600,7 @@ sub compose_namespace { Class::C3->reinitialize(); { no strict 'refs'; + no warnings 'redefine'; foreach my $meth (qw/class source resultset/) { *{"${target}::${meth}"} = sub { shift->schema->$meth(@_) };