diff --git a/Changes b/Changes index c471233..d94348f 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for Genealogy::ObituaryDailyTimes +0.12 + t/carp.t could sometimes fail + 0.11 Thu Feb 8 09:03:49 EST 2024 Added first, last, age as an index Renamed database to data diff --git a/lib/Genealogy/ObituaryDailyTimes.pm b/lib/Genealogy/ObituaryDailyTimes.pm index e06502c..120c8f2 100644 --- a/lib/Genealogy/ObituaryDailyTimes.pm +++ b/lib/Genealogy/ObituaryDailyTimes.pm @@ -54,6 +54,7 @@ sub new { return bless { %{$class}, %args }, ref($class); } + # if(!defined((my $directory = ($args{'directory'} || $Database::Abstraction::defaults{'directory'})))) { if(!(my $directory = $args{'directory'})) { # If the directory argument isn't given, see if we can find the data $directory ||= Module::Info->new_from_loaded(__PACKAGE__)->file(); diff --git a/t/carp.t b/t/carp.t index ca2a7b2..cbc0fbe 100644 --- a/t/carp.t +++ b/t/carp.t @@ -14,7 +14,7 @@ SKIP: { Test::Carp->import(); - my $search = new_ok('Genealogy::ObituaryDailyTimes'); + my $search = new_ok('Genealogy::ObituaryDailyTimes' => [ directory => 'lib/Genealogy/ObituaryDailyTimes/data' ]); does_carp_that_matches(sub { my @empty = $search->search(); }, qr/^Value for 'last' is mandatory/); does_carp_that_matches(sub { my @empty = $search->search(last => undef); }, qr/^Value for 'last' is mandatory/); diff --git a/t/obituaries.t b/t/obituaries.t index 1ee6c4c..4c0ff35 100644 --- a/t/obituaries.t +++ b/t/obituaries.t @@ -14,6 +14,8 @@ BEGIN { SKIP: { skip 'Database not installed', 12 if(!-r 'lib/Genealogy/ObituaryDailyTimes/data/obituaries.sql'); + Database::Abstraction::init('directory' => 'lib/Genealgy/ObituaryDailyTimes/data'); + my $search; if($ENV{'TEST_VERBOSE'}) { $search = new_ok('Genealogy::ObituaryDailyTimes' => [ logger => MyLogger->new() ]);