aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <david@yeah.nah.nz>2020-07-12 13:25:08 +1200
committerDavid Phillips <david@yeah.nah.nz>2020-07-12 13:25:08 +1200
commit7b302b87f297604fc733edcdffb1e8662eb71f02 (patch)
tree180f94ffab280de09c4662c74119ed81d98490c1
parentb62c0da644f2000986b628f7a2e5b6faae8d53ba (diff)
downloadidalius-7b302b87f297604fc733edcdffb1e8662eb71f02.tar.xz
Timezone: flatten single-statemnt `do` blocks
-rw-r--r--Plugin/Timezone.pm9
1 files changed, 2 insertions, 7 deletions
diff --git a/Plugin/Timezone.pm b/Plugin/Timezone.pm
index f3386b2..c56a984 100644
--- a/Plugin/Timezone.pm
+++ b/Plugin/Timezone.pm
@@ -65,9 +65,7 @@ sub time {
$d->set_time_zone($tz);
my $timestr = $d->strftime("%H:%M on %a %d %b, %Y (%Z)");
return clock_message($nick, $tz, $timestr);
- } or do {
- return "$requester: ".make_unknown_zone_message $nick;
- }
+ } or return "$requester: ".make_unknown_zone_message $nick;
}
sub zone_convert {
@@ -102,9 +100,6 @@ sub zone_convert {
my $from_message = clock_message($from_arg, $from_tz, $unconverted);
my $to_message = clock_message($to_arg, $to_tz, $converted);
return "$to_message when $from_message";
- } or do {
- return "$requester: I can't figure this time conversion out";
- }
-
+ } or return "$requester: I can't figure this time conversion out";
}
1;