Fix "redefined" errors resulting from loading a Schema twice.
Jess Robinson [Sat, 29 Sep 2007 22:37:07 +0000 (22:37 +0000)]
lib/DBIx/Class/Schema.pm

index 6e8b7fc..81f050c 100644 (file)
@@ -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(@_) };