fix bug where non-result files were picked up for Moose check
[catagits/Catalyst-Model-DBIC-Schema.git] / lib / Catalyst / Helper / Model / DBIC / Schema.pm
index 8b1a68b..e0f98c9 100644 (file)
@@ -416,6 +416,8 @@ sub _build_is_moose_schema {
 
     try {
         finddepth(sub {
+            return if $File::Find::name !~ /\.pm\z/;
+
             open my $fh, '<', $File::Find::name
                 or die "Could not open $File::Find::name: $!";