From: Rafael Kitover Date: Sat, 24 Jul 2010 14:13:58 +0000 (-0400) Subject: simplify moose class check X-Git-Tag: 0.07001~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=250ff758f1758e7a2f2ebd843f3e4e27d652caab;p=dbsrgits%2FDBIx-Class-Schema-Loader.git simplify moose class check --- diff --git a/lib/DBIx/Class/Schema/Loader/Base.pm b/lib/DBIx/Class/Schema/Loader/Base.pm index ee75f06..fc8da77 100644 --- a/lib/DBIx/Class/Schema/Loader/Base.pm +++ b/lib/DBIx/Class/Schema/Loader/Base.pm @@ -1105,7 +1105,7 @@ sub _reload_classes { local *Class::C3::reinitialize = sub {}; use warnings; - if ($class->can('meta') && try { (ref $class->meta)->isa('Moose::Meta::Class') }) { + if ($class->can('meta') && try { $class->meta->isa('Moose::Meta::Class') }) { $class->meta->make_mutable; } Class::Unload->unload($class) if $unload; @@ -1116,7 +1116,7 @@ sub _reload_classes { && ($resultset_class ne 'DBIx::Class::ResultSet') ) { my $has_file = Class::Inspector->loaded_filename($resultset_class); - if ($resultset_class->can('meta') && try { (ref $resultset_class->meta)->isa('Moose::Meta::Class') }) { + if ($resultset_class->can('meta') && try { $resultset_class->meta->isa('Moose::Meta::Class') }) { $resultset_class->meta->make_mutable; } Class::Unload->unload($resultset_class) if $unload;