From cb4b31d4b67417e759b63ace1dd5af65a22dcc01 Mon Sep 17 00:00:00 2001 From: Lucas Buchala Date: Fri, 24 Jul 2015 16:21:12 -0300 Subject: [PATCH] disallow .later() without any named arguments --- src/core/Temporal.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/Temporal.pm b/src/core/Temporal.pm index 72960442b95..1ec0e178289 100644 --- a/src/core/Temporal.pm +++ b/src/core/Temporal.pm @@ -577,6 +577,9 @@ my class Date does Dateish { die "More than one time unit supplied" if %unit.keys > 1; + die "No time unit supplied" + unless %unit.keys; + my ($unit, $amount) = %unit.kv; self!VALID-UNIT($unit);