Karl Williamson <[email protected]> writes:

> I'm not sure I understand what "fail on generation" means.  I think it
> might mean just not generate a pod, rather than generate one with an error
> section.

Correct -- it will exit with an error message.

lothlorien:~$ cat > foo.pod
=item foo

Invalid POD.
lothlorien:~$ pod2man foo.pod > foo.1
foo.pod around line 1: '=item' outside of any '=over'
foo.pod around line 1: =over without closing =back
POD document had syntax errors at /usr/bin/pod2man line 68.
lothlorien:~$ echo $?
255

> What I was intending was to add a scream() call. The only failure that I
> saw in Pod::Simple that stopped parsing was when it was clear the
> encoding of the pod was not understandable, so there was no point in
> continuing.  So I don't understand what you do, unless it is to die on
> pod errors, or some such.

Correct, the scripts die on POD errors, unless the --errors flag is used
to request some other behavior.

    -errors=style
        Set the error handling style.  "die" says to throw an exception on
        any POD formatting error.  "stderr" says to report errors on
        standard error, but not to throw an exception.  "pod" says to
        include a POD ERRORS section in the resulting documentation
        summarizing the errors.  "none" ignores POD errors entirely, as
        much as possible.

        The default is "die".

(Now let me go fix the missing - in the pod2man docs....)

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print

Reply via email to