--- Ovid <[EMAIL PROTECTED]> wrote:

> Later, the 'Our::Test::Database' has a DESTROY method which drops the
> database.  At the beginning and end of every .t file, the database is
> created from scratch and destroyed.

I forgot to mention something very important if you use this technique.
 We cache the parent process PID and in the destroy method, we verify
that the current PID matches the cached PID.  Otherwise, we do *not*
drop the database.  This is because forks can easily drop a database
when you didn't intend for this to happen.

Cheers,
Ovid

--

Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/

Reply via email to