garu/Data-Printer — pull request #37 by bessarabov (2012-12-05 15:19:18+00:00)
Title: Fixing failing tests to work with DATAPRINTERRC

In my environment I have set up DATAPRINTERRC=
/home/bessarabov/felix/tilde/.dataprinter (you can see the content of this
file: https://gist.github.com/4216269)

With this ENV variable set I had some tests failing. Now I have managed to
find why it happens. The problem is with the BEGIN section in tests. If
`use DDP` is in the BEGIN section of the test file then the import() method
from file Data/Printer.pm is executed before the things written in the test
BEGIN section.

To prevent tests from failng I have moved `use DDP` out ouf BEGIN section. And
now all my tests pass.

I think if you accept this solution other test files also need to be fixed:
with my rc file they pass, but I think that the otther rc file can cause them
to fail.