error("There wasn't any R code supplied");
}
- my $image_loc
+ my $image_loc = '';
if (exists $param{fig}) {
$param{width} = '400' unless exists $param{width} and defined $param{width};
$param{height} = '400' unless exists $param{height} and defined $param{height};
$image_loc_esc =~ s/"/\\"/g;
will_render($param{page},$image_loc);
eval {
- $pagestate{$param{page}}{$id}{R}->run(qq{png(filename="$image_loc_esc",width=$param{width},height=$param{height});});
+ $pagestate{$param{page}}{$id}{R}->run(qq|png(filename="$image_loc_esc",width=$param{width},height=$param{height});|);
};
if ($@) {
- error("code 'png(filename="$image_loc_esc",width=$param{width},height=$param{height});' (from internal figure handling) produced error '$@'");
+ error(qq|code 'png(filename="$image_loc_esc",width=$param{width},height=$param{height});' (from internal figure handling) produced error '$@'|);
}
}
my $code_result;
}
if (not exists $param{results} or
(defined $param{results} and
- $param{results} !~ /^(hide|false)$/i;)) {
+ $param{results} !~ /^(hide|false)$/i)) {
$output .= $code_result;
}
if (exists $param{echo} or
# make sure we never try to save an R process
for my $page (keys %pagestate) {
next unless exists $pagestate{$page}{$id};
- next unless ;
if (exists $pagestate{$page}{$id}{R}) {
if (defined $pagestate{$page}{$id}{R}
and $pagestate{$page}{$id}{R}->is_started()) {
$pagestate{$page}{$id}{R}->stop;
}
+ delete $pagestate{$page}{$id}{R};
}
if (exists $pagestate{$page}{$id}{fignum}) {
delete $pagestate{$page}{$id}{fignum}