Hi guys,
This is for DBIx::Class::Schema::Loader.
I was having some trouble with it mysteriously dieing on otherwise fine
classes intermittently.
I eventually tracked it down to the lines adjusted in the patch
(attached); I think it's fairly clear, let me know if you have any
questions?
I've also filed a bug #40251 with the same patch on rt.cpan.org.. I'm
not sure which is your preferred medium for accepting these.
Cheers,
Toby
--
Strategic Data Pty Ltd
Ph: 03 9340 9000
>From 8245481402859ade8388b0d2df93e0a03a315089 Mon Sep 17 00:00:00 2001
From: Toby Corkindale <[EMAIL PROTECTED]>
Date: Wed, 22 Oct 2008 17:22:05 +1100
Subject: [PATCH] Add eval around a require to avoid false checks of previous $@ values.
---
lib/DBIx/Class/Schema/Loader/Base.pm | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/lib/DBIx/Class/Schema/Loader/Base.pm b/lib/DBIx/Class/Schema/Loader/Base.pm
index fada2be..e91cd29 100644
--- a/lib/DBIx/Class/Schema/Loader/Base.pm
+++ b/lib/DBIx/Class/Schema/Loader/Base.pm
@@ -289,7 +289,9 @@ sub _load_external {
my $real_inc_path = Cwd::abs_path($inc_path);
return if $real_inc_path eq $real_dump_path;
- $class->require;
+ eval {
+ $class->require;
+ };
croak "Failed to load external class definition"
. " for '$class': $@"
if $@;
--
1.5.6.5
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]