On Dec 14, 2005, at 16:22, Russ Allbery wrote:

Would you override 'parse_file' and 'parse_from_file' so they call
'reinit'? Potential threading issues there, but a tolerable kludge
for backward compatibility.

Hm, sure, I can do that.  Those are the only two interfaces that older
callers of Pod::Man would likely be using.  (parse_from_filehandle and
parse_from_file, actually.)

Okay, I've added a 'reinit' method to the core guts of Pod::Simple:

http://svn.lohutok.net/nam/trunk/perl5/modules/Pod/Simple/lib/Pod/ Simple/BlackBox.pm

Calling this method before reusing the parser object deletes the state information from the object so it can be reused. (Previous comments about thread-safety still apply. Only call 'reinit' when you know it's safe to call it.)

Russ, could you try this out in Pod::Man and see if it solves the backward compatibility problem?

I'll release Pod::Simple 3.04 as soon as you confirm it works (or we fix anything that doesn't work), and as soon as I hear back from Steve on his test patches for including Pod::Simple in the core.

Thanks,
Allison

Reply via email to