brucemiller/LaTeXML — pull request #8 by dginev (2013-10-31 19:08:50+00:00)
Title: Post finalize hook

Please disregard the spurious merge commits for now, I am just getting used to using rebase, but there were some merge trials to align the branches. As you can see from the diff, perltidy helped a lot and the diff actually shows only meaningful code differences.

That wasn't the case before, I had a bunch of spurious spacing diffs in Post.pm.

Anyhow, this pull request suggest introducing a new hook for post-processor objects.

I introduced a finalize() hook for post-processors that is useful for things like Manifest and Pack which need to write a file at the very end of post-processing. Currently, both of the former feel very appropriate as terminal post-processors that get executed at the end of post-processing (especially Manifest, which benefits from the order of ->process() invocations to generate a proper table of contents for the split document).

And of course, any post-processor that isn't aware of the finalize method would simply have it as a no-op.