fix loader version check
Rafael Kitover [Wed, 8 Dec 2010 22:20:05 +0000 (22:20 +0000)]
Changes
lib/Catalyst/Helper/Model/DBIC/Schema.pm

diff --git a/Changes b/Changes
index 5abe1f1..2db2a16 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,7 @@
 Revision history for Perl extension Catalyst::Model::DBIC::Schema
 
+        - fix loader version check
+
 0.46  Wed Dec  8 13:35:28 UTC 2010
         - make use_moose detection more robust
 
index 4ed267b..5ca4862 100644 (file)
@@ -443,7 +443,7 @@ sub _build_result_namespace {
 
         return 'Result' if $@;
 
-        return DBIx::Class::Schema::Loader->VERSION('0.05') ? 'Result' : '';
+        return try { DBIx::Class::Schema::Loader->VERSION('0.05') } ? 'Result' : '';
     }
 
     open my $fh, '<', $schema_pm or die "Could not open $schema_pm: $!";