diff options
| author | Serge van Ginderachter | 2014-11-26 13:57:28 +0100 |
|---|---|---|
| committer | Serge van Ginderachter | 2014-11-26 13:57:28 +0100 |
| commit | 3a92a5e3d05d2eee78fc9202a673b1861563c60c (patch) | |
| tree | 21598ee3b51dcc9b027d677fda40558b9029e6ec /scripts | |
| parent | f818d80fe33e3a0754d52bd10a0823ff06f6de70 (diff) | |
| download | scripts.irssi.org-3a92a5e3d05d2eee78fc9202a673b1861563c60c.tar.bz2 | |
fnotify.pl: fix perlcritic errors
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/fnotify.pl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/fnotify.pl b/scripts/fnotify.pl index f53205e..42a7eb8 100644 --- a/scripts/fnotify.pl +++ b/scripts/fnotify.pl @@ -1,4 +1,5 @@ use strict; +use warnings; use vars qw($VERSION %IRSSI); use Irssi; @@ -73,9 +74,14 @@ sub hilight { sub filewrite { my ($text) = @_; # FIXME: there is probably a better way to get the irssi-dir... - open(FILE, ">>$ENV{HOME}/.irssi/fnotify"); + my $fnfile = "$ENV{HOME}/.irssi/fnotify"; + if (!open(FILE, ">>", $fnfile)) { + print_err("cannot open $fnfile: $!"); + } print FILE $text . "\n"; - close(FILE); + if (!close(FILE)) { + print_err("cannot close $fnfile: $!"); + } } # |
