+ $template =~ s/$extract/$replacement/g; # Block durch neue Daten ersetzen
+ }
+ $self->set_template($template);
+}
+
+# parse_includes()
+#
+# {INCLUDE}-Anweisungen verarbeiten
+#
+# Parameter: -nichts-
+#
+# Rueckgabe: -nichts- (Template-Objekt wird modifiziert)
+
+sub parse_includes
+{
+ my $self = shift;
+ my $template = $self->get_template;
+
+ while($template =~ /(\{INCLUDE (\S+?)\})/g)
+ {
+ my ($directive,$file) = ($1,$2);
+ my $qm_directive = quotemeta($directive);
+
+ if(-f $file)
+ {
+ my $inc = new Template;
+ $inc->read_file($file);
+
+ $template =~ s/$qm_directive/$inc->get_template/eg;
+ }