This file is indexed.

/usr/share/doc/lire/dev-manual/ch02s03.html is in lire-devel-doc 2:2.1.1-2.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Creating the DLF Converter Skeleton</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Lire Developer's Manual"><link rel="up" href="ch02.html" title="Chapter 2. Writing a New DLF Converter"><link rel="prev" href="ch02s02.html" title="The common_syslog Log Format"><link rel="next" href="ch02s04.html" title="Adding a Constructor"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Creating the DLF Converter Skeleton</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s02.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Writing a New DLF Converter</th><td width="20%" align="right"> <a accesskey="n" href="ch02s04.html">Next</a></td></tr></table><hr></div><div class="section" title="Creating the DLF Converter Skeleton"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id402475"></a>Creating the DLF Converter Skeleton</h2></div></div></div><p>Put simply, a DLF converter is a perl object which
          implements a set of predefined methods (aka an
          <span class="quote">&#8220;<span class="quote">interface</span>&#8221;</span> in the object-oriented jargon). 
        </p><p>Since a DLF converter is a perl object, it must be
          instantiated from a class. Classes in perl are defined in
          packages. We'll name the package which implements our
          converter
          <code class="classname">MyConverters::SyslogCommonConverter</code>.
          To create such a package, you need to create a file named
          <code class="filename">MyConverters/SyslogCommonConverter.pm</code>
          in a directory searched by perl.

          </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>You can obtain perl's default search list by running
                  the command <strong class="userinput"><code><code class="prompt">$</code> perl
                  -V</code></strong>.
                </p></li><li class="listitem"><p>This search list can be modified by setting the
                  <code class="envar">PERL5LIB</code> environment variables.
                </p></li></ul></div></div><p>
        </p><p>Here is a first cut of our DLF
        converter:</p><pre class="programlisting">

package MyConverters::SyslogCommonConverter;

use base qw/Lire::DlfConverter/;

1;

          </pre><p>
          
          The first line declare that the code is in the
          <code class="classname">MyConvertersw::SyslogCommonConverter</code>
          package. The second one specifies that objects in this
          package are subclasses of the
          <code class="interfacename">Lire::DlfConverter</code> packages.
          The last line fullfill perl's requirement that package
          returns a true value once they are initialized.
        </p><p>This is a complete DLF, altough useless, DLF Converter.
          In fact, it isn't complete because if you tried to register
          an instance of that class, you'll get <span class="quote">&#8220;<span class="quote">unimplemented
          method</span>&#8221;</span> errors. Besides, we don't even yet have a
          formal way to create instance of our converter. This is our
          next task.
        </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch02s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The <span class="type">common_syslog</span> Log Format </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Adding a Constructor</td></tr></table></div></body></html>