aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-08-29 09:33:20 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-08-29 09:33:20 +0100
commit66bd45b66911860dd2d59e5a6e38586a1641a2d7 (patch)
tree6146fd882aea09a6bbc2acac7458d3cfa6a7f808
parent05c6a4b980b07a7c15b6b9727f6315d326e233a0 (diff)
Stop using File::Slurp in make_css.
-rwxr-xr-xbin/make_css6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/make_css b/bin/make_css
index 7c7a5290d..6a70aba01 100755
--- a/bin/make_css
+++ b/bin/make_css
@@ -14,7 +14,6 @@ BEGIN {
use CSS::Sass;
use File::ChangeNotify;
use File::Find::Rule;
-use File::Slurp;
use Getopt::Long;
use MIME::Base64;
use MIME::Types;
@@ -125,9 +124,10 @@ sub compile {
# Write a file, only if it has changed.
sub write_if_different {
my ($fn, $data) = @_;
- my $current = File::Slurp::read_file($fn, { binmode => ':utf8', err_mode => 'quiet' });
+ $fn = path($fn);
+ my $current = $fn->slurp_utf8;
if (!$current || $current ne $data) {
- File::Slurp::write_file($fn, { binmode => ':utf8' }, $data);
+ $fn->spew_utf8($data);
return 1;
}
return 0;