DBD-Informix

 view release on metacpan or  search on metacpan

lib/DBD/Informix/TestHarness.pm  view on Meta::CPAN


    use strict;
    use DBD::Informix::TestHarness;
    &memory_leak_test(\&test_subroutine);
    exit;

When it is called, memory_leak_test forks, and the parent process runs
the given subroutine with no arguments.
The subroutine will do the sequence of database operations which show
that there is a memory leak, or that the memory leak is fixed.
The child process checks that the parent is still alive, and runs the
C<ps> command to determine the size of the process.
The output of C<ps> is not parsed, so you have to run the test in a
verbose mode to see whether there is a memory leak or not.

    &memory_leak_test(\&test_subroutine);
    &memory_leak_test(\&test_subroutine, 10, "ps -l | grep");

The C<ps> command string has a process number appended to the end
after a space, and should report the size of the given process.
Note that the last example is not as reliable as requesting the



( run in 0.870 second using v1.01-cache-2.11-cpan-39bf76dae61 )