Skip Menu |

This queue is for tickets about the DBIx-Class-Schema-Loader CPAN distribution.

Report information
The Basics
Id: 40251
Status: resolved
Priority: 0/
Queue: DBIx-Class-Schema-Loader

People
Owner: Nobody in particular
Requestors: TJC [...] cpan.org
Cc: bsb [...] bereft.net
tjc [...] wintrmute.net
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 0.04005
  • 0.04999_05
Fixed in: 0.04006



CC: bsb [...] bereft.net, tjc [...] wintrmute.net
Subject: [PATCH] Add missing eval {} to avoid checking old $@ values
The schema loader, in one location, checks and dies if $@ is set.. however because the prior statement was not inside an eval {} block, sometimes $@ includes errors from unrelated previous eval's, and thus causes Loader to die here. Attached is a patch to fix this behaviour.
Subject: 0001-Add-eval-around-a-require-to-avoid-false-checks-of-p.patch
From 8245481402859ade8388b0d2df93e0a03a315089 Mon Sep 17 00:00:00 2001 From: Toby Corkindale <tobyc@strategicdata.com.au> 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
This was fixed by kane and included in the 0.04006 release.
Subject: Re: [rt.cpan.org #40251] [PATCH] Add missing eval {} to avoid checking old $@ values
Date: Tue, 16 Jun 2009 11:26:55 +1000
To: bug-DBIx-Class-Schema-Loader [...] rt.cpan.org
From: Brad Bowman <bsb [...] bereft.net>
DelCc: bsb@bereft.net