From 8b9e43598b0151e00d2ef3642e1f9fd61e037f92 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 20 May 2021 21:21:19 +0200 Subject: tidy: define scope start and end when used --- bin/events2md.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/events2md.pl b/bin/events2md.pl index 89bf43f..9253050 100755 --- a/bin/events2md.pl +++ b/bin/events2md.pl @@ -90,8 +90,6 @@ $log->debugf( 'resolved credentials for user %s', $user ); # fetch and parse calendar data $log->debug('fetch and parse calendar data...'); -my $start = DateTime->now; -my $end = $start->clone->add( months => 1 ); my $calendar = Cal::DAV->new( user => $user, pass => $pass, @@ -132,6 +130,8 @@ if ( $log->is_trace ) { # serialize calendar events $log->debug('serialize calendar events...'); +my $start = DateTime->now; +my $end = $start->clone->add( months => 1 ); my $parser = iCal::Parser->new( start => $start, end => $end ); my $events = $parser->parse_strings( $calendar->as_string ); if ( $log->is_trace ) { -- cgit v1.2.3