--- deliantra/server/lib/cf/pod.pm 2007/04/18 17:57:24 1.6 +++ deliantra/server/lib/cf/pod.pm 2007/07/08 14:56:06 1.10 @@ -185,16 +185,17 @@ my ($path) = @_; Coro::Storable::thaw cf::cache "cf::pod::as_paragraphs/$path" => [$path], - 1 => sub { + 2 => sub { my ($src) = @_; cf::fork_call { my $pod = $src->[0]; utf8::decode $pod; - Coro::Storable::freeze pom_as_paragraphs +(Pod::POM->new->parse_text ($pod)) + cf::_store_scalar pom_as_paragraphs +(Pod::POM->new->parse_text ($pod)) } }; } +# format as cfpod-style text sub as_text($) { my ($pars) = @_; @@ -202,18 +203,16 @@ for my $par (@$pars) { if ($par->{type} =~ /^head\d+$/) { - $res .= "$par->{markup}\n\n"; + $res .= "B<$par->{markup}>\n\n"; } elsif ($par->{type} eq "verbatim") { $res .= "\n$par->{markup}\n\n"; } elsif ($par->{type} eq "item") { - $res .= "\n* $par->{markup}\n\n"; + $res .= "\n* I<$par->{markup}>\n\n"; } else { - $res .= "$par->{markup}\n"; + $res .= "$par->{markup}\n\n"; } } - $res =~ s/\n\n+/\n/g; - $res }