Apache-Tika-Async

 view release on metacpan or  search on metacpan

lib/Apache/Tika/Async.pm  view on Meta::CPAN

package Apache::Tika::Async;
use strict;
use Moo 2;
use JSON::XS qw(decode_json);
use File::Temp 'tempfile';

our $VERSION = '0.11';

=head1 NAME

Apache::Tika::Async - connect to Apache Tika

=head1 SYNOPSIS

  use Apache::Tika::Async;

  my $tika= Apache::Tika::Async->new;

  my $fn= shift;

  use Data::Dumper;
  my $info = $tika->get_all( $fn );
  print Dumper $info->meta($fn);
  print $info->content($fn);
  # <html><body>...
  print $info->meta->{"meta:language"};
  # en

=head1 ACCESSORS

=cut

=head2 B<jarfile>

  jarfile => '/opt/tika/tika-standard-2.9.9.jar',

Sets the Tika Jarfile to be used. The default is to look
in the directory C<jar/> below the current directory.

=cut

has 'jarfile' => (
    is => 'rw',
    #isa => 'Str',
# tika-server-1.24.1.jar
# tika-server-standard-2.3.0.jar

    default => sub {
        $ENV{PERL_APACHE_TIKA_PATH} ||
        __PACKAGE__->best_jar_file(
              glob 'jar/tika-server-*.jar'
        );
    },
);

=head2 B<tika_args>

  tika_args => [],

Additional Tika command line options.

=cut




( run in 0.578 second using v1.01-cache-2.11-cpan-600a1bdf6e4 )