summaryrefslogtreecommitdiffstats
path: root/scripts/timezones.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/timezones.pl')
-rw-r--r--scripts/timezones.pl14
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/timezones.pl b/scripts/timezones.pl
index 65e9ebe..0ca0ece 100644
--- a/scripts/timezones.pl
+++ b/scripts/timezones.pl
@@ -8,6 +8,14 @@
# or add it to an existing one with
# /statusbar window add timezones (window is an exaple, see /statusbar and /help statusbar for comprehensive help)
+use strict;
+use warnings;
+use Irssi;
+use DateTime;
+use Carp qw/croak/;
+
+use vars qw($VERSION %IRSSI);
+
$VERSION = "0.2";
%IRSSI = (
authors => "Jari Matilainen",
@@ -19,10 +27,6 @@ $VERSION = "0.2";
changed => "Tue 24 November 16:00:00 CET 2015",
);
-use strict;
-use Irssi::TextUI;
-use DateTime;
-
my $refresh_tag;
sub timezones {
@@ -38,7 +42,7 @@ sub timezones {
my ($nick, $timezone) = split /:/, $_;
my $now;
eval {
- $now = DateTime->now(time_zone => "$timezone") or die $!;
+ $now = DateTime->now(time_zone => "$timezone") or croak $!;
};
if($@) {