From fa0cf06d10fb5f75b0458a32f6b8756dab04dbd2 Mon Sep 17 00:00:00 2001 From: Vincent Douillet Date: Fri, 18 Oct 2024 16:13:26 +0200 Subject: remove File::Cat dependency --- makesite.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'makesite.pl') diff --git a/makesite.pl b/makesite.pl index 7b9ad92..fa55cf8 100755 --- a/makesite.pl +++ b/makesite.pl @@ -2,13 +2,21 @@ use strict; use warnings; -use File::Cat; use File::Slurp; use Text::Markdown "markdown"; use Time::Piece; my $BASE_URL="https://blog.vdouillet.fr/"; +sub cat { + my ($inFile, $outHandle) = @_; + open my $inHandle, "<", $inFile; + while(<$inHandle>) { + print $outHandle $_; + } + close $inHandle; +} + sub page { my ($pageFile, $pageTitle, $pageContent, $pageType, $id) = @_; unless(defined $pageType) { -- cgit v1.2.3