9 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
use strict;
use warnings;
use HTML::Template;
my $ht = HTML::Template->new(filename => 'page.html');
my @files = liste_der_Content_html-Dateien();
for my $content (@files) {
my %pArgs = param_hash_bilden($content);
$ht->param(%pArgs);
open (F, ">../$file") or die $file;
print F $ht->output();
close F;
}
1
2
3
4
5
6
7
sub param_hash_bilden {
my $file = shift;
open (I, $file) or die $file;
my $include;
{ local $/; $include = <I>; }
(INCLUDE => $include);
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
sub param_hash_bilden {
my $file = shift;
open (I, $file) or die $file;
my $include;
if (file_muss_templaten($file)) {
my $hti = HTML::Template->new (filehandle=>*I);
my %iArgs = include_param_hash_bilden($file);
$hti->param(%iArgs);
$include = $hti->output();
} else {
local $/;
$include = <I>;
}
(INCLUDE => $include);
}
1
2
3
4
5
6
7
8
9
10
11
12
use strict;
use warnings;
use HTML::Template;
my @files = liste_der_Content_html-Dateien();
for my $content (@files) {
my $ht = HTML::Template->new(filename => 'page.html');
my %pArgs = param_hash_bilden($content);
$ht->param(%pArgs);
open (F, ">../$file") or die $file;
print F $ht->output();
close F;
}
9 Einträge, 1 Seite |