in reply to Exporter Problem
Try a singleton, try
our $pipeline; sub pipeline { $pipeline ||= new Lingua::StanfordCoreNLP::Pipeline(1, 1); $pipeline; } sub process_text { my ($self,$text) = @_; $self->pipeline->process( $text ); }
If things go wrong try Dumper-ing $MyModule::pipeline
|
|---|