I use this code with my plexus server (it does the work for me):
--------------------------------------------------------------------------
package inc;
sub init
{
$main'ext{'hacked-html'} = 'text/hacked-html';
$main'trans{'text/hacked-html'} = "text/html:inc'html";
}
sub html
{
# this is a translation filter
while (<STDIN>) {
s/<inc\s+([^>]*)>/&inc($1)/ige;
print;
}
}
sub inc
{
local($_) = $_[0];
return scalar(`$1`) if /^cmd="([^"]+)"/i;
return "<pre>\n".scalar(`$1`)."</pre>\n" if /^precmd="([^"]+)"/i;
return eval "$1" if /^perl="([^"]+)"/i;
return scalar(`cat $1`) if /^file="([^"]+)"/i;
return "<em><inc $1> not understood</em>";
}
1;