DlfCategoriser->init $config = {}

Francis J. Lacoste flacoste at logreport.org
Mon Jul 25 17:04:57 CEST 2005


On July 21, 2005 05:54, Joost Bekkers wrote:
> Hi
>
> I'm building my own DlfCategoriser with the dev-manual as my guide.
> When the init sub is called the $config param contains a ref to an
> empty hash. Looking at the example it should be an array containing
> the configuration for the categoriser, right?
>
> I found out why it is an empty hash:
>
> ReportConfig.pm:637
>
> my $process = new Lire::DlfAnalyserProcess( $store,
> 					    $analysers->[0]->name(),
> 					    {} );
>
> But I can't quite figure out what should go there.

Indeed, that is a bug. It is that way because the use case was that analyser 
were configured (through the lire command) when run in a persistent store. 
The ReportConfig::create_analyser_streams is somewhat a backward 
compatibility path for report generated directly from a log file without 
using a persistent store which could contain configuration. But, it is still 
a bug since the default value of the analyser's configuration wouldn't even 
be used.

I'm attaching a patch which solves that problem.

>
> On a side note, the example config spec doc/example/page-categoriser.xml
> contains to closing </lrcsml:list> tags but only one opening tag.

Thanks, I've corrected this in CVS. (Btw, the first one should be removed, 
e.g. the <lrcml:param> is inside the <lrcsml:list>.

Francis J. Lacoste

-- 
Francis J. Lacoste              . .           http://www.logreport.org
/^LogReport$/               . .               flacoste at logreport.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ReportConfig-1.35.patch
Type: text/x-diff
Size: 1151 bytes
Desc: not available
Url : http://lists.logreport.org/pipermail/questions/attachments/20050725/0767ef11/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.logreport.org/pipermail/questions/attachments/20050725/0767ef11/attachment-0001.bin 


More information about the Questions mailing list