diff options
author | Jonas Smedegaard <dr@jones.dk> | 2021-05-20 21:21:19 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2024-08-27 23:39:36 +0200 |
commit | 8598858ea12a92299ab8588d906095c35b6daced (patch) | |
tree | 24e50bd437ab9c717c9f951810a71cc80a74d04d | |
parent | 359db04b8273c89f07ee573a460feb9891305c3e (diff) |
tidy: define scope start and end when used
-rwxr-xr-x | bin/events2md.pl | 4 |
1 files changed, 2 insertions, 2 deletions
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 ) { |