develooper Front page | perl.perl5.porters | Postings from March 2008

Re: pod wiki?

Thread Previous | Thread Next
Michael G Schwern
March 23, 2008 14:01
Re: pod wiki?
Message ID:
Reini Urban wrote:
>> If someone would write one up we'll install it.  Syntax can be as 
>> simple as:
>> {pod:
>> ...your pod here...
>> }
>> POD goes in, HTML comes out.

Digging around some more, it looks like what you want is a WaflBlock.  That's 
what implements things like...

     my $code = "That isn't formatted";

So you could have

=head1 NAME


You should be able to crib from the inner classes in 
lib/Socialtext/Formatter/ in the source that implement .pre and .html

It should be something like this:

package Socialtext::Formatter::POD;

use strict;
use warnings;

use base 'Socialtext::Formatter::WaflBlock';

use Class::Field qw( const );

const wafl_id => 'pod';

sub html {
     my $self = shift;
     my $pod = $self->matched();

     ...code to turn POD into an HTML snippet that fits with ST's CSS...

If you can write the bit that converts POD into SocialText friendly HTML we 
can take care of the rest.  Don't worry about testing it against SocialText if 
you don't have an installation, just save a wiki page and copy your generated 
HTML in place.  Hack on it until it plays nice with the CSS.

Look at me talking when there's science to do.
When I look out there it makes me glad I'm not you.
I've experiments to be run.
There is research to be done
On the people who are still alive.
     -- Jonathan Coulton, "Still Alive"

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About