STL now prints file name on fail open
authorShawn Boyette <sboyette@esilibrary.com>
Fri, 22 May 2009 14:47:20 +0000 (14:47 +0000)
committerShawn Boyette <sboyette@esilibrary.com>
Fri, 22 May 2009 14:47:20 +0000 (14:47 +0000)
Equinox-Migration/lib/Equinox/Migration/SimpleTagList.pm
Equinox-Migration/t/01-SimpleTagList.t

index 0b82c0a..ffe3591 100644 (file)
@@ -60,7 +60,7 @@ sub new {
         if (-r $args{file}) {
             $self->generate($args{file});
         } else {
-            die "Can't open tags file: $!\n";
+            die "Can't open tags file '", $args{file}, "': $!\n";
         }
     }elsif ($args{str}) {
         $self->generate($args{str},'scalar');
index 8ef29c0..0d4c9a4 100644 (file)
@@ -7,7 +7,7 @@ use Equinox::Migration::SimpleTagList;
 
 # baseline object creation
 eval { my $stl = Equinox::Migration::SimpleTagList->new( file => "thefileisalie.txt" ) };
-is ($@ =~ /^Can't open tags file:/, 1, 'cannot open that');
+is ($@ =~ /^Can't open tags file 'thefileisalie\.txt':/, 1, 'cannot open that');
 
 my $stl = Equinox::Migration::SimpleTagList->new();
 is(ref $stl, "Equinox::Migration::SimpleTagList", "self is self");