When I work on code that makes expensive calls to external programs, I mock the dynamic data with cat. I make a static copy of real output (e.g. $ du / > du.txt ) and then I change $binary in my script.
my $du = '/bin/du'; defined $DEBUG and $du = '/bin/cat ./du.txt';
Perhaps something like that could work for you.
In reply to Re: mocking or trapping system calls
by rowdog
in thread mocking or trapping system calls
by wu-lee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |