summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Douillet <vincent@vdouillet.fr>2024-10-18 16:13:26 +0200
committerVincent Douillet <vincent@vdouillet.fr>2024-10-18 16:13:26 +0200
commitfa0cf06d10fb5f75b0458a32f6b8756dab04dbd2 (patch)
treedc969ea1ab40b189689b53ac3ae0d28cd800cd7c
parentfcac1f4cce88e9666f5fa79a75709423a3d0f63a (diff)
remove File::Cat dependency
-rwxr-xr-xmakesite.pl10
1 files changed, 9 insertions, 1 deletions
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) {