The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Changes for version 0.3.0 - 2014-12-18

  • This release, in brief:
  • improves clarity through nomenclature:
    • renames "(output layer) backend implementation" to "(capture) strategy", for more standard nomenclature (and less of a mouthful);
    • renames "pseudo-layer" to "multi-layer" (if so declared) or "non-trapping layer" (neither is a direct analogue to PerlIO pseudo layers, so the nomenclature was misleading);
  • adds (import) options to the TempFile and SystemSafe capture strategy factories, allowing for different ways to handle PerlIO layers;
  • using these for two new standard capture strategies, "tempfile-preserve" and "systemsafe-preserve"; and
  • fixes a bug in SystemSafe. And, in more detail ... Test::Trap::Builder:
  • Changes method names per the nomenclature changes, leaving back-compat aliases behind.
  • Changes error message per the nomenclature changes. (No back-compat possible, sorry.)
  • Updates the documentation. Test::Trap::Builder::{TempFile,SystemSafe}:
  • Import now takes arguments: strategy name (default {"tempfile","systemsafe"}); and strategy options (default empty hash).
  • The following options are supported: preserve_io_layers (boolean; default false); and io_layers (colon-separated string; default unset). Test::Trap::Builder::SystemSafe:
  • Fixes a bug where the original perlio layers were not restored after the trap was sprung. Test::Trap::Builder::{PerlIO,TempFile,SystemSafe}:
  • Updates the code in accordance with Test::Trap::Builder changes; see above.
  • Updates the documentation. Test::Trap:
  • Imports new capture strategy, "tempfile-preserve", from TempFile with option preserve_io_layers.
  • Imports new capture strategy, "systemsafe-preserve", from SystemSafe with option preserve_io_layers.
  • Updates the code in accordance with Test::Trap::Builder changes; see above.
  • Updates the documentation. Tests:
  • changes variable names and comments in accordance with nomenclature changes;
  • adds tests for the no-restore bug in t/03-files.pl (hence for each tested strategy);
  • adds t/03-files-{tempfile,systemsafe}-preserve.t to run the basic tests against the new capture strategies;
  • accounts for the changed error message in t/06-layers.t;
  • adds t/{15-tempfile,16-systemsafe}-options.t to check capture strategies of varying options.

Modules

Trap exit codes, exceptions, output, etc.
Backend for building test traps
Capture strategy using PerlIO::scalar
"Safe" capture strategies using File::Temp
Capture strategies using File::Temp