Pod-POM-Web

 view release on metacpan or  search on metacpan

lib/Pod/POM/Web.pm  view on Meta::CPAN

  # free the indexer
  delete $self->{indexer};

  # start another process for updating or building the fulltext index
  my $command = "index";
  $command .= "(from_scratch=>1)" if $req->parameters->get('from_scratch');
  warn "STARTING COMMAND $command\n";
  open my $pipe, '-|', qq{perl -Ilib -MPod::POM::Web -e "$command"};

  # pipe progress reports from the subprocess into the HTTP response,
  # using Plack's streaming API
  my $res = Plack::Response->new(200);
  $res->content_type('text/plain');
  $res->body($pipe);
  return $res->finalize;
}

#----------------------------------------------------------------------
# encapsulation of Plack response
#----------------------------------------------------------------------



( run in 0.253 second using v1.01-cache-2.11-cpan-4d50c553e7e )