fayland/dist-zilla-plugin-perltidy — pull request #5 by kentfredric (2013-02-17 21:57:13+00:00)
Title: Fix the excessive production of *.LOG files.

Recently I noticed a very annoying behaviour:

For every value of `foo`, `Dist::Zilla::App::Command::perltidy` created a
corresponding `foo.LOG`

And this behaviour was not exhibited by `perltidy` and there was no way
to fix this behaviour.

Turns out that `*.LOG` are always produced, except normal perltidy cleans
them up **AT EXIT** if nothing serious happened.

However, the `File::Copy::move` stanza was breaking this behaviour
somehow.

In this attached patch, I solve this issue by performing the tidy in a
short-lived fork.

This allows the normal garbage collection `perltidy` relies upon to
occur, and then only moves the file once the fork has exited.

Additionally, I've added a call to `$self->zilla->log_debug` so that

```shell
dzil perltidy -v
```

Will print the files its tidying as it tidies them.