SPUG: Minimal Perl web site & notification requests

Tim Maher tim at consultix-inc.com
Mon Jun 13 18:00:10 PDT 2005

On Mon, Jun 13, 2005 at 05:04:16PM -0700, Allison Randal wrote:
> On Jun 12, 2005, at 15:03, Tim Maher wrote:
> >
> >FYI, I wrote my manuscript in a version of POD, enhanced to be able to
> >extract, execute, and capture output from the embedded program 
> >examples,
> >and with hooks to import tables from troff's tbl command. 8-}
> I'd be interested in seeing your modifications to POD. I wrote 
> Pod::PseudoPod, which parses and formats O'Reilly's variation, so I'm 
> always interested in other variations.
> >I was able to prepare the drafts very rapidly using vim, podspell, and
> >other standard tools, without the time-intensive mousing around
> >(I'm touch typist) that Word requires.
> Aye. It just works. To me it's the nicest way possible to write a 
> manuscript.
> Allison

The main program of the group, called "po2pod" (as in *.po ->
*.pod -- it's a POD pre-processor), is another name linked to the
executable that's known as "Magicpoint-EZ", because they're
similar, I developed them simultaneously, and I ended up sharing
a lot of code between them. This arrangement, of course, is sub-
optimal for distribution, and may make it hard for you to make
much sense out of the associated programs and modules. On the
other hand, the programs work quite well, and have really made my
life a lot simpler.

I'll see if I can spend a few minutes to rework the code into a
more digestible format, and send you something that might
actually be worth looking at on your end 8-}

In the meantime, you can take a gander at
to get an idea of how the "parent" program works, from which po2pod
is excerpted.

The main differences are that there's a much shorter chain of filters for
po2pod than for mg2mgp (*.mg -> *.mgp):  
	skipper -> include -> code_command -> add_newlines

Or to put it Perlishly:

elsif ($0 =~ /\bpo2pod$/) { # It's a pod preprocessor too!
	$REPORT and warn "Running $0\n";
	no strict 'vars';
	local $::nomgp=1;
	local $filename_line=0;
	use strict 'vars';
	my @O = add_newlines (code_command(include(skipper( <>)))) ;
	print @O;

You can read about the four functions named above in:

But ignore all comments about vertical spacing and color changes,
because of course they're beyond the scope of PODly documents, and
only apply to the mg2mgp invocations of these functions, not the
po2pod ones.

| Tim Maher, PhD     (206) 781-UNIX      (866) DOC-PERL     (866) DOC-UNIX |
| tim(AT)Consultix-Inc.Com  http://TeachMePerl.Com  http://TeachMeUnix.Com |
|   Watch for my Summer, 2005 book: "Minimal Perl for UNIX/Linux People"   |
|  See http://manning.com/Maher for details, and email notification signup |

More information about the spug-list mailing list