Subject: | add typical testing example |
e.g.
use vars qw($current_system); # this allows us to: local $current_system = sub …
$current_system = sub {
diag( explain( \@_ ) );
return 0;
};
use Test::Mock::Cmd 'system' => sub { $current_system->(@_) };
…
{
local *$current_system = sub { X };
…
}
{
local *$current_system = sub { Y };
…
}