aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2024-08-28 01:04:18 +0200
committerJonas Smedegaard <dr@jones.dk>2024-08-28 01:12:50 +0200
commitd1fc0bb1954d468e1c07245fe5af2b16799f7f38 (patch)
tree2d7619f7f01dda80dd0597a47fd0f3d439e25772
parent3505e0d8e96fb57a90989b168f09850a4e0efa46 (diff)
use modern Perl, and use signatures
-rwxr-xr-xbin/events2md.pl13
1 files changed, 4 insertions, 9 deletions
diff --git a/bin/events2md.pl b/bin/events2md.pl
index 12fe7a3..725e8f5 100755
--- a/bin/events2md.pl
+++ b/bin/events2md.pl
@@ -1,9 +1,9 @@
#!/usr/bin/perl
-use v5.14;
+use v5.36;
+use strict;
use utf8;
use open qw(:std :encoding(UTF-8));
-use strictures;
use autodie;
use Feature::Compat::Try;
@@ -188,16 +188,13 @@ else {
print $content;
}
-sub resolve_event
+sub resolve_event ( $entry, $start, $end = undef )
{
- my ( $entry, $start, $end, $path ) = @_;
-
if ( $log->is_trace ) {
use DDP;
p $entry;
p $start;
p $end;
- p $path;
}
my $summary = get_property_string( $entry, 'summary' );
my $description = get_property_string( $entry, 'description' );
@@ -255,10 +252,8 @@ sub resolve_event
};
}
-sub get_property_string
+sub get_property_string ( $entry, $key )
{
- my ( $entry, $key ) = @_;
-
return ''
unless $entry->property($key);