Skip Menu |

This queue is for tickets about the Test-Mock-Cmd CPAN distribution.

Report information
The Basics
Id: 84976
Status: resolved
Priority: 0/
Queue: Test-Mock-Cmd

People
Owner: Nobody in particular
Requestors: dmuey [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.6



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 }; … }