- or download this
sub DoTask1 {
my ($object, @arguments) = @_;
...
}
return $object->CommonTask(@arguments);
}
- or download this
sub Helper {
my ($object, $defaults, @arguments) = @_;
...
}
return $object->Helper([ qw(ARG3 ARG5 ARG7) ], @arguments);
}
- or download this
sub Helper {
my ($object, $code, $defaults, @arguments) = @_;
...
$object->DoSomeMoreSetup();
}, [ qw(ARG3 ARG5 ARG7) ], @arguments);
}
- or download this
my $original_state = Module::GetServiceState();
Module::SetServiceState(0); # temporarily disable the service, if it's
+ not already
...
$object->DoSomethingElse();
Module::SetStatus($original_state); # restore it to what it was before
- or download this
sub TempDisableService {
my $code = shift;
...
$object->DoSomethingAlso();
};
- or download this
TempDisableService {
$object->DoSomething();
$object->DoSomethingElse();
};