in reply to temporary files in .t scripts

You've had two recommendations for File::Temp. Consider this a third - I use tempfiles in the test suites for DBM::Deep, PDF::Template, and Excel::Template. The common denominator is that I have a t/common.pm which manages the creation and destruction. You will probably want something similar.

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^2: temporary files in .t scripts
by esobchenko (Beadle) on Mar 25, 2008 at 09:19 UTC
    You'll laugh: I need a tempfile for DBM::Deep which is used by default in my module. :-) Thanks for your answer.
      Oooh. What does your module do? What do you use DBM::Deep for? Inquiring minds want to know!

      My criteria for good software:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
        I'm working on small library that provides persistence for Perl objects. Persistence is implemented by abstract CRUD methods that need to be overridden in subclass. I use DBM::Deep as default data store in module and tests, however I use PostgreSQL and Amazon S3 for production.