+ if ($options->{group}) {
+ $self->_launch_group($options, @_);
+ } elsif ($options->{single}) {
+ $self->_launch_single($options, @_);
+ } else {
+ $self->_launch($options, @_);
+ }
+}
+
+sub _launch {
+ my $self = shift;
+ my $options = shift;
+
+ if ($options->{fork}) {
+ for my $file_or_uri (@_) {
+ my $pid = fork;
+ next if $pid;
+
+ my $handler = $self->_get_handler($file_or_uri);
+ $handler->($file_or_uri) if $handler;
+ return;
+ }
+ } else {
+ for my $file_or_uri (@_) {
+ my $handler = $self->_get_handler($file_or_uri);
+ $handler->($file_or_uri) if $handler;