#!/usr/bin/env perl
$|++;
my
$opts
= docopt();
if
(
$opts
->{
'--version'
}) {
print
'mutator: '
.
$Devel::Mutator::VERSION
,
"\n"
;
exit
0;
}
elsif
(
$opts
->{mutate}) {
Devel::Mutator::Command::Mutate->new(
verbose
=> (
$opts
->{
'-v'
} ||
$opts
->{
'--verbose'
}),
recursive
=> (
$opts
->{
'-r'
} ||
$opts
->{
'--recursive'
})
)->run(@{
$opts
->{
'<file>'
}});
}
elsif
(
$opts
->{test}) {
exit
Devel::Mutator::Command::Test->new(
verbose
=> (
$opts
->{
'-v'
} ||
$opts
->{
'--verbose'
}),
remove
=>
$opts
->{
'--remove'
},
timeout
=>
$opts
->{
'--timeout'
},
command
=>
$opts
->{
'--command'
}
)->run;
}