From d784473cef147a0d64e3c4835b26ac4f0f08def9 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 1 Nov 2025 16:26:00 +0200 Subject: Update content for gemtext --- gemfeed/2025-11-02-perl-new-features-and-foostats.gmi | 9 ++------- gemfeed/2025-11-02-perl-new-features-and-foostats.gmi.tpl | 9 ++------- gemfeed/atom.xml | 11 +++-------- 3 files changed, 7 insertions(+), 22 deletions(-) (limited to 'gemfeed') diff --git a/gemfeed/2025-11-02-perl-new-features-and-foostats.gmi b/gemfeed/2025-11-02-perl-new-features-and-foostats.gmi index 97f40137..52b02504 100644 --- a/gemfeed/2025-11-02-perl-new-features-and-foostats.gmi +++ b/gemfeed/2025-11-02-perl-new-features-and-foostats.gmi @@ -244,7 +244,6 @@ Loops over like `$stats->{page_ips}->{urls}->%*` or `$merge{$key}->{$_}->%*` sho use v5.38; print "Hello, world!\n"; # old way - say "Hello, world!"; # new way ``` @@ -257,13 +256,10 @@ This is an example of a lexical sub named `trim`, which is only visible within t ```perl use v5.38; -sub process_lines { - my @lines = @_; - +sub process_lines (@lines) { my sub trim ($str) { $str =~ s/^\s+|\s+$//gr; } - return [ map { trim($_) } @lines ]; } @@ -365,8 +361,7 @@ The `defer` block (`use feature 'defer"`) schedules a piece of code to run when ```perl use feature qw(defer); -sub parse_log_file { - my ($path) = @_; +sub parse_log_file ($path) { open my $fh, '<', $path or die "Cannot open $path: $!"; defer { close $fh }; diff --git a/gemfeed/2025-11-02-perl-new-features-and-foostats.gmi.tpl b/gemfeed/2025-11-02-perl-new-features-and-foostats.gmi.tpl index 17afe444..bec86a97 100644 --- a/gemfeed/2025-11-02-perl-new-features-and-foostats.gmi.tpl +++ b/gemfeed/2025-11-02-perl-new-features-and-foostats.gmi.tpl @@ -219,7 +219,6 @@ Loops over like `$stats->{page_ips}->{urls}->%*` or `$merge{$key}->{$_}->%*` sho use v5.38; print "Hello, world!\n"; # old way - say "Hello, world!"; # new way ``` @@ -232,13 +231,10 @@ This is an example of a lexical sub named `trim`, which is only visible within t ```perl use v5.38; -sub process_lines { - my @lines = @_; - +sub process_lines (@lines) { my sub trim ($str) { $str =~ s/^\s+|\s+$//gr; } - return [ map { trim($_) } @lines ]; } @@ -340,8 +336,7 @@ The `defer` block (`use feature 'defer"`) schedules a piece of code to run when ```perl use feature qw(defer); -sub parse_log_file { - my ($path) = @_; +sub parse_log_file ($path) { open my $fh, '<', $path or die "Cannot open $path: $!"; defer { close $fh }; diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml index 067710db..110e2bdf 100644 --- a/gemfeed/atom.xml +++ b/gemfeed/atom.xml @@ -1,6 +1,6 @@ - 2025-11-01T16:18:57+02:00 + 2025-11-01T16:25:00+02:00 foo.zone feed To be in the .zone! @@ -289,7 +289,6 @@ http://www.gnu.org/software/src-highlite -->
use v5.38;
 
 print "Hello, world!\n";    # old way
-
 say "Hello, world!";        # new way
 

@@ -305,13 +304,10 @@ http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite -->
use v5.38;
 
-sub process_lines {
-    my @lines = @_;
-
+sub process_lines (@lines) {
     my sub trim ($str) {
         $str =~ s/^\s+|\s+$//gr;
     }
-
     return [ map { trim($_) } @lines ];
 }
 
@@ -431,8 +427,7 @@ http://www.lorenzobettini.it
 http://www.gnu.org/software/src-highlite -->
 
use feature qw(defer);
 
-sub parse_log_file {
-    my ($path) = @_;
+sub parse_log_file ($path) {
     open my $fh, '<', $path or die "Cannot open $path: $!";
     defer { close $fh };
 
-- 
cgit v1.2.3