0
我想在Perl中使用Text::DocumentCollection
。我希望能夠從文件句柄中讀取文本,並從該文本構建文檔集合,但我不確定這是否是此模塊的預期用途。在Perl中添加一個帶有Text :: DocumentCollection的文檔
該文檔指的是添加一個「文檔」,但我不確定文檔是什麼。它是一個文件嗎?它可以是變量中的字符串嗎?
下面的代碼返回一個錯誤:
use Text::DocumentCollection;
my $c = Text::DocumentCollection->new(file => 'test.db');
$doc = 'test_doc';
$c->Add('doc1', $doc);
錯誤:
Can't locate object method "WriteToString" via package "test_doc" (perhaps you forgot to load "test_doc"?) at ...DocumentCollection.pm line 62.
是什麼意思的 「負荷」,什麼是 「包」?
謝謝,我不知道在看的例子的測試信息。很有幫助! – itzy