11

Is there an easy to use "what-you-see-is-what-you-get" editor for Pod available?

I'm not that used to the Pod syntax yet so having the option of writing the Pod and immediatly see what the output would look like will help a lot. Ideally this editor would have some kind of "code-completion" to help with the correct syntax.

Is there an editor like this?

Jonas
  • 121,568
  • 97
  • 310
  • 388
Fredrik
  • 10,626
  • 6
  • 45
  • 81
  • 3
    Don't know if one, but you could poke the Padre folks about it. http://search.cpan.org/dist/Padre – Schwern Jan 29 '10 at 19:25
  • 1
    There's no hope of such a thing. Pod is a format designed for easily translation to other formats. You shouldn't care what it looks like because what you see isn't what other people are going to see. Pod isn't a presentation language. It's a structural markup that something else decides to present. – brian d foy Jan 29 '10 at 20:19
  • What problem are you having with Pod that makes you want this? – brian d foy Jan 29 '10 at 20:19
  • Thanks for the input guys. I've abandoned the idea now. I had a 'manual' for a perlprogram that was written in plain text. As such it was difficult to organise and structure with headings, chapters, subchapters etc. My initial idea was to convert it to perldoc to add some sort of easy readability while still being able to view it from commandline. But the prospect of converting 500+ lines of text to perldoc without the support from a decent editor was not appealing :) – Fredrik Feb 02 '10 at 15:49
  • http://padre.perlide.org/trac/ticket/844 – szabgab Feb 05 '10 at 13:43

4 Answers4

5

No, at least not that I've ever heard whisper of. Pod is a very simple form of markup; it shouldn't take long to learn it.

That said, any decent text editor should be configurable to recognize Pod directives and apply syntax highlighting to them. If your editor does code-completion of keywords you'd get that too. (Note: code-completion wouldn't apply to a hypothetical WYSIWYG editor.)

As for seeing the output, there's no standard way of rendering Pod. It can be rendered as plain text, HTML, or anything else for which someone was written a translator. Depending on your text editor you could add a "user command" to translate the current document and show it in an appropriate viewer. For example, run it through pod2html and open the resulting page in Firefox.

Edit: The Hints for Writing Pod section of perlpod says

If you're more familiar with writing in HTML than with writing in Pod, you can try your hand at writing documentation in simple HTML, and converting it to Pod with the experimental Pod::HTML2Pod module

which would allow you to use a WYSIWYG HTML editor to write documentation. (At least in principle; much would depend on what kind of output the editor produced.)

Michael Carman
  • 30,628
  • 10
  • 74
  • 122
  • HTML isn't WYSIWYG though. What you see is what you see and not what other people might see. :) – brian d foy Jan 29 '10 at 20:20
  • Yea, that could work I guess, but HTML2Pod says: "Try to avoid using a WYSIWYG HTML editor, as they often produce scary source" ... which more or less puts me in the same position. If I have to handcode the syntax anyway, I might aswell do it in perldoc right away. Anyway, it wasn't anything major, so I've scrapped the idea. Thanks for the help though. – Fredrik Feb 02 '10 at 15:55
3

POD Web View allows you to upload a POD file, get it from a URL, or paste its contents and edit it on the fly. The generated HTML can be displayed in the style of your choice, mimicking how it would look on CPAN, MetaCPAN, or GitHub.

To give credit where it's due, the backend is built on Dancer and uses Pod::Simple::HTML to generate the HTML preview. The user interface is made with Twitter Bootstrap, a lot of JavaScript/jQuery code, and Ace editor.

up on Github

kiavash
  • 66
  • 3
1

There is unfinished App::Wx::PodEditor on CPAN.

Alexandr Ciornii
  • 7,346
  • 1
  • 25
  • 29
1

Although not an editor Gtk2::Ex::PodViewer is an excellent POD GUI viewer based on GTK. It can be used easily also on Windows thanks to Camelbox's GTK bindings(http://code.google.com/p/camelbox/). Camelbox's installer comes out ot the box with a fully functional wrapper to Gtk2::Ex::PodViewer.

register
  • 399
  • 4
  • 14