Subject: | Add in selective mocking |
e.g. pass in a hash anywhere you'd pass in a codref and it builds a dispatch function for you.
use T::M::C system => {
'halt' => sub { 1 },
'foo' => sub { 2 },
};
system('halt', …) # does 1
system('foo', …) # does 2
system("whatebver", …) # does normal system