From: rkinyon Date: Thu, 20 Sep 2007 02:33:23 +0000 (+0000) Subject: Extended _throw_error per brian d foy's suggestion X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a34e9b3f1bcf17ede294643d0eb66cee2c6e3067;p=dbsrgits%2FDBM-Deep.git Extended _throw_error per brian d foy's suggestion --- diff --git a/Changes b/Changes index 850dc44..54128dc 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Revision history for DBM::Deep. +1.0002 Sep ?? ??:??:?? 2007 EDT + - Expanded _throw_error() so that it provides better information. + (Thanks brian d foy!) + 1.0001 Mar 12 16:15:00 2007 EDT - (This version is compatible with 1.0000) - Added a missing dependency on IO::Scalar (RT #25387) diff --git a/lib/DBM/Deep.pm b/lib/DBM/Deep.pm index 6a005a0..f5ecd68 100644 --- a/lib/DBM/Deep.pm +++ b/lib/DBM/Deep.pm @@ -5,7 +5,7 @@ use 5.006_000; use strict; use warnings; -our $VERSION = q(1.0001); +our $VERSION = q(1.0002); use Fcntl qw( :flock ); @@ -390,6 +390,14 @@ sub _fh { sub _throw_error { die "DBM::Deep: $_[1]\n"; + my $n = 0; + while( 1 ) { + my @caller = caller( ++$n ); + next if $caller[0] =~ m/^DBM::Deep/; + + die "DBM::Deep: $_[1] at $0 line $caller[2]\n"; + last; + } } sub STORE {