summaryrefslogtreecommitdiff
path: root/Xerl
diff options
context:
space:
mode:
authorPaul Buetow (uranus) <paul@buetow.org>2015-01-04 11:51:11 +0100
committerPaul Buetow (uranus) <paul@buetow.org>2015-01-04 11:51:11 +0100
commitda9679c1b9fcd91959211d7601faca93d5eaccc1 (patch)
tree74446623cef89410e1742acc848367ff4ccc1899 /Xerl
parentc6975559f5b311aa78b823fe427f606372aea4d8 (diff)
workaround
Diffstat (limited to 'Xerl')
-rw-r--r--Xerl/Page/Content.pm34
1 files changed, 19 insertions, 15 deletions
diff --git a/Xerl/Page/Content.pm b/Xerl/Page/Content.pm
index c091c70..6cadd9a 100644
--- a/Xerl/Page/Content.pm
+++ b/Xerl/Page/Content.pm
@@ -109,13 +109,17 @@ sub _insertrules {
}
elsif ( lc $name eq 'inject' ) {
-
# Fetch via LWP::Simple
- my $got = get($text);
- $got =~ s/</&lt;/g;
- $got =~ s/>/&gt;/g;
- push @content, $got;
-
+ #my $got = get($text);
+ # Bug in FreeBSD Perl and LWP Module
+ my $got = `curl "$text"`;
+ if ($!) {
+ push @content, "$text: $!";
+ } else {
+ $got =~ s/</&lt;/g;
+ $got =~ s/>/&gt;/g;
+ push @content, $got;
+ }
}
elsif ( lc $name eq 'includerun' ) {
my $scriptpath = $config->get_contentpath() . $text;
@@ -145,8 +149,8 @@ sub _insertrules {
}
else {
push @content,
- "<$name" . ( $succ->params_str() || '' ) . '>',
- $self->_insertrules( $rules, $succ ), $text, "</$name>\n";
+ "<$name" . ( $succ->params_str() || '' ) . '>',
+ $self->_insertrules( $rules, $succ ), $text, "</$name>\n";
}
}
}
@@ -181,21 +185,21 @@ sub _insertrules {
}
$text .= $params->{addback}
- if exists $params->{addback};
+ if exists $params->{addback};
$text = $params->{addfront} . $text
- if exists $params->{addfront};
+ if exists $params->{addfront};
}
my $oadd =
- exists $ruleparams->{addfront}
- ? '<' . $ruleparams->{addfront}
- : '';
+ exists $ruleparams->{addfront}
+ ? '<' . $ruleparams->{addfront}
+ : '';
my $cadd =
- exists $ruleparams->{addback} ? $ruleparams->{addback} . '>' : '';
+ exists $ruleparams->{addback} ? $ruleparams->{addback} . '>' : '';
push @content, $orule, $oadd, $self->_insertrules( $rules, $succ ),
- $text, $cadd, $crule;
+ $text, $cadd, $crule;
}
}