Subject: | Not only from files |
Alexander Wirt <formorer@formorer.de> says:
Hi,
I integrated mealmaster support into ikiwiki but I came to the problem the
lib is only able to read recipes only from files, but this is easy so solve
:). Maybe it would be nicer to create a new function which is able to
get the
recipe as a scalar, but this should be easy.
It would be nice if you can integrate my patch.
Thanks in advance
Alex
Subject: | Mealmaster.patch |
11,12c11,18
< open(my $fh, $filename) || die $!;
< my $file = join '', <$fh>;
---
> my $file = "";
> if (-f $filename) {
> open(my $fh, $filename) || die $!;
> $file = join '', <$fh>;
> close($fh);
> } else {
> $file = $filename;
> }