Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'topic/fix_2_more_smoke_tests' into devel

  • Loading branch information...
commit 3e82328ed48e0994f15ba68214f73d7cc8fc3ac9 2 parents 65a683b + 9edf50d
@ambs ambs authored
Showing with 3 additions and 2 deletions.
  1. +1 −1  lib/Dancer/Session/YAML.pm
  2. +2 −1  t/08_session/05_yaml.t
View
2  lib/Dancer/Session/YAML.pm
@@ -63,7 +63,7 @@ sub retrieve {
return unless -f $session_file;
- open my $fh, '<', $session_file or die "Can't open '$session_file': $!\n";
+ open my $fh, '+<', $session_file or die "Can't open '$session_file': $!\n";
flock $fh, LOCK_EX or die "Can't lock file '$session_file': $!\n";
my $content = YAML::LoadFile($session_file);
close $fh or die "Can't close '$session_file': $!\n";
View
3  t/08_session/05_yaml.t
@@ -55,9 +55,10 @@ ok( -d $session_dir, "session dir was created");
rmtree($session_dir);
eval { $session = Dancer::Session::YAML->create() };
my $error = $@;
+my $quoted_dir = quotemeta($session_dir);
like(
$@,
- qr/Can't open .* No such file or directory/,
+ qr{Can't open '$quoted_dir.*yml':.*},
'session dir was not recreated',
);
Please sign in to comment.
Something went wrong with that request. Please try again.