This release fixes a memory leak with the default tempfile backend
layer implementation for trapping output. The systemsafe alternative
backend had the same kind of leak, and has also been fixed. (The
perlio alternative backend was not affected.) Thanks go again to
Felipe Gasper for discovering this!
Test::Trap::Builder:
- Add a method ExceptionFunction to make it easier to avoid
circular references arising from registered closures.
Document and export this method.
Test::Trap::Builder::TempFile:
- Break a circular reference chain.
Test::Trap::Builder::SystemSafe:
- Break a similar but slightly more complicated circular
reference chain.
Tests:
- Added t/14-leaks.t to check that the reference count is as
expected, at least with trivial code and standard setup for
all three output layer backends.
- Regression test for the stale references.
Library files:
- RT #87263: typo fixes, courtesy dsteinbrunner@pobox.com.
- Localize the trap coderef, so that it does not hold on to
what it closes over, creating stale references, but lets
them go out of scope; thanks go to Felipe Gasper.
Documentation:
- Some clarification for RT #91687: Wrong exit code after die.
Also:
- Use ebhanssen@cpan.org for my email address.
- Update copyright years.
- Update MANIFEST.SKIP &c for use of git (goodbye subversion).
Do it for all packages that
* mention perl, or
* have a directory name starting with p5-*, or
* depend on a package starting with p5-
like last time, for 5.18, where this didn't lead to complaints.
Let me know if you have any this time.
a) refer 'perl' in their Makefile, or
b) have a directory name of p5-*, or
c) have any dependency on any p5-* package
Like last time, where this caused no complaints.
Test::Trap::Builder::TempFile & Test::Trap::Builder::SystemSafe:
- RT #61776: Remove temporary files at first opportunity;
thanks go to Ian Goodacre.
Documentation:
- RT #61773: return from trap function
Document what trap { ... } returns.
Tests:
- RT #75430: Failing tests in 06-layer.t
Convert a number of die_is to die_like, handling cases with
and without trailing comma from carp.
- Unset another taint-checked environment variable, CDPATH;
thanks go to CPAN testers.
This modules is primarily (but not exclusively) for use in test
scripts: A block eval on steroids, configurable and extensible,
but by default trapping (Perl) STDOUT, STDERR, warnings, exceptions,
would-be exit codes, and return values from boxed blocks of test
code.
The values collected by the latest trap can then be queried or
tested through a special trap object.