[MKDoc-modules] Petal::Mail usage

William McKee william at knowmad.com
Fri Dec 12 15:51:41 GMT 2003


Hello,

It's been a bit quite on the list so I thought I'd create some traffic
<g>. Seriously, I'm considering converting my email templates which have
been using Text::Template to Petal::Mail. Is anyone here using
Petal::Mail currently? I've only seen JM's announcement but no follow-up
traffic about this module.

I also have a question about usage. In the example msg given in the POD,
the signature is encased inside of a <pre> tagset. I tried changing that
to <p> and saw that the system ignored carriage returns which is good
since this is the defined behavior of <p> according to XHTML/HTML4
specs. However, for those of us who are ignorant of the specs, it'd be
nice to add in the docs that <p> tags ignore white space (which includes
carriage returns, extra spaces, tabs, etc.).

While testing, I had problems with Taint again. Specifically at line 63
in Petal/Cache/Disk.pm. I tried setting $Petal::TAINT=1 but that did not
help. I'm not going to debug this problem right now; just wanted to note
it. Well, nix that; it's working now. Not sure what changed though which
worries me a bit.

A few more comments on the docs:
	- shouldn't the Synopsis contain 'use Petal::Mail;'?
	- I presume that the %args hash being passed to process is the same
	  as in Petal. It'd be helpful to describe the process function and
	  its parameters.
	- there is no documentation for the send function

I have attached a patch which includes these proposed changes and a fix
for an unclosed list (the XHTML tags).

BTW, when I run pod2html locally, it is adding 'manpage' to L<> items.
Does anyone know why is this happening?  It's also creating a bogus
link.

Thanks,
William

--
Knowmad Services Inc.
http://www.knowmad.com
-------------- next part --------------
7a8
>   use Petal::Mail;
58a60,68
> =head1 FUNCTIONS
> 
> =head2 process
> 
> This function processes a template. It takes a hash or hashref which is used
> to fill out any elements in the template. It returns the processed template as
> a string. See L<Petal> for further details.
> 
> =cut
66a77,83
> =head2 send
> 
> This function processes and sends an email message according to a template.
> It takes the same parameters as process. Returns null(?) on success or dies on
> failure.
> 
> =cut
352a370,374
> =back
> 
> Text contained in <p> tags will ignore white space characters (e.g., extra
> spaces, tabs, carriage returns, etc.). See the XHTML specs at W3C for complete
> details-- http://www.w3.org/MarkUp/.


More information about the MKDoc-modules mailing list