From 3f4e5623e6a134d1a572f7be00f2792f49ae6b37 Mon Sep 17 00:00:00 2001 From: mono Date: Sat, 5 Dec 2015 12:18:23 +0900 Subject: [PATCH] Check if `elapsed_time_sec` is defined before send to server `elapsed_time_sec` isn't nullable in Ukigumo::Server. --- lib/Ukigumo/Client.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Ukigumo/Client.pm b/lib/Ukigumo/Client.pm index e7d8e6d..bcf28e9 100644 --- a/lib/Ukigumo/Client.pm +++ b/lib/Ukigumo/Client.pm @@ -284,7 +284,7 @@ sub send_to_server { vc_log => $self->vc_log, body => [$log_filename || $self->logfh->filename], compare_url => $self->compare_url, - elapsed_time_sec => $self->elapsed_time_sec, + (defined $self->elapsed_time_sec ? (elapsed_time_sec => $self->elapsed_time_sec) : ()), ]; my $res = $ua->request($req); $res->is_success or die "Cannot send a report to @{[ $self->server_url ]}/api/v1/report/add:\n" . $res->as_string;