Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use autodie

  • Loading branch information...
commit e92394c763daae75319418fd6cae767266eee755 1 parent d570ff6
@autarch autarch authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/VegGuide/CachedHierarchy.pm
View
6 lib/VegGuide/CachedHierarchy.pm
@@ -2,6 +2,7 @@ package VegGuide::CachedHierarchy;
use strict;
use warnings;
+use autodie;
use File::Spec;
@@ -51,7 +52,7 @@ my %Times;
sub _touch_file {
my $file = shift;
- open my $fh, ">$file" or die "Cannot write to $file";
+ open my $fh, '>', $file;
# The contents don't matter, only the last mod time.
print $fh "1\n";
@@ -60,8 +61,7 @@ sub _touch_file {
unless ( $> || $< ) {
my ( $uid, $gid ) = _get_uid_gid();
- chown $uid, $gid, $file
- or die "Cannot chown $file to Apache server uid/gid: $!";
+ chown $uid, $gid, $file;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.