aboutsummaryrefslogtreecommitdiffstats
path: root/bin/make_css
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-08-29 17:10:32 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-08-29 17:10:32 +0100
commit07d3568a02b5efb4286bccd9f869c8e1605928b5 (patch)
tree85770a4d1d8745a06b3bb8849c5444bb200f5693 /bin/make_css
parent759b5ef970546c0a70fb4f8d051b1f6dd54e4d2d (diff)
parent77d4d7096a3f0f83e5c19260a320fd2b11455a48 (diff)
Merge branch 'some-dev-improvements'
Diffstat (limited to 'bin/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;