| 1 | package Plucene::SearchEngine::Index::PPT; | ||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | our $VERSION = '0.001'; # VERSION | |||||||||
| 5 | # ABSTRACT: a Plucene backend for indexing Microsoft Powerpoint presentations | ||||||||||
| 6 | 1 | ▶ | use parent qw(Plucene::SearchEngine::Index::HTML); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | use IPC::Run3; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | ▶ | use File::Temp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 1 | __PACKAGE__->register_handler('text/ppt', '.ppt'); | |||||||||
| 12 | |||||||||||
| 13 | |||||||||||
| 14 | 0 | ▶ | sub gather_data_from_file { | ||||||||
|
Subroutine
gather_data_from_file: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 15 | 0 | my ($self, $filename) = @_; | |||||||||
| 16 | 0 | ▶ | return unless $filename =~ m/\.ppt$/; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | |||||||||||
| 18 | 0 | my $tmp_html = File::Temp->new(); | |||||||||
| 19 | 0 | run3 ['ppthtml', $filename], | |||||||||
| 20 | \undef, # redirect from /dev/null | ||||||||||
| 21 | $tmp_html, # write to a temp file | ||||||||||
| 22 | undef; # inherit the parent's stderr | ||||||||||
| 23 | |||||||||||
| 24 | 0 | $self->gather_data_from_file( $tmp_html->filename ); | |||||||||
| 25 | 0 | return $self; | |||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | 1 | 1; | |||||||||
| 29 | |||||||||||
| 30 | __END__ | ||||||||||