Index: trunk/doc/misc/buildIndex.pl
===================================================================
--- trunk/doc/misc/buildIndex.pl	(revision 2471)
+++ trunk/doc/misc/buildIndex.pl	(revision 2591)
@@ -5,9 +5,10 @@
 # $Id: buildIndex.pl,v 1.1 2004/04/20 22:16:17 jhoblitt Exp $
 
+use 5.008;
+
 use strict;
 use warnings;
 
-use vars qw( $VERSION );
-$VERSION = '0.01';
+our $VERSION = '0.01';
 
 use File::Basename qw();
@@ -21,9 +22,9 @@
 use Pod::Usage qw( pod2usage );
 
-my ($verbose, $help, $path, $index_dir);
+my ($verbose, $help, $path, $indexDir);
 GetOptions(
     'verbose' => \$verbose,
     'path=s'  => \$path,
-    'index=s' => \$index_dir,
+    'index=s' => \$indexDir,
     )
     or pod2usage(2);
@@ -32,10 +33,10 @@
 pod2usage(-msg => "Required option: --path|-p", -exitval => 2) unless $path;
 
-$index_dir = $path . "/.index" unless defined $index_dir;
+$indexDir = $path . "/.index" unless defined $indexDir;
 
 ##my $stripper = HTML::Strip->new;
 
 my $writer = Plucene::Index::Writer->new(
-    $index_dir,
+    $indexDir,
     Plucene::Plugin::Analyzer::PorterAnalyzer->new(),
     1    # Create the index from scratch
@@ -44,37 +45,37 @@
 my $doc = Plucene::Document->new;
 
-foreach my $file_name (File::Find::Rule->file->name(qr/^msg\d+\.html/)->in($path)) {
-    print "indexing: $file_name\n" if $verbose;
-    $writer->add_document(parse_mhonarc_html($file_name));
+foreach my $filename (File::Find::Rule->file->name(qr/^msg\d+\.html/)->in($path)) {
+    print "indexing: $filename\n" if $verbose;
+    $writer->add_document(parseMhonarcHtml($filename));
 }
 
-sub parse_mhonarc_html
+sub parseMhonarcHtml
 {
-    my $file_name = shift;
-
-    my $tree = HTML::TreeBuilder->new_from_file($file_name);
+    my $filename = shift;
+
+    my $tree = HTML::TreeBuilder->new_from_file($filename);
     my $doc  = Plucene::Document->new;
 
-    $doc->add(Plucene::Document::Field->Keyword(file_name => File::Basename::basename($file_name),));
+    $doc->add(Plucene::Document::Field->Keyword(file_name => File::Basename::basename($filename),));
 
     # get the header values for to, cc, from, date, and subject
 
     # find the <div> tag labeled header
-    my $header_tag = $tree->look_down(_tag => "div", id => "header");
+    my $headerTag = $tree->look_down(_tag => "div", id => "header");
 
     my %headers;
 
-    foreach my $row_node ($header_tag->look_down(_tag => "tr")) {
+    foreach my $rowNode ($headerTag->look_down(_tag => "tr")) {
 
         # process each row of the header
 
         # get name of header field
-        my $name_node = $row_node->look_down(_tag => "td");
-        my $name = lc($name_node->look_down(_tag => "em")->as_text);
-        $name_node->delete;
+        my $nameNode = $rowNode->look_down(_tag => "td");
+        my $name = lc($nameNode->look_down(_tag => "em")->as_text);
+        $nameNode->delete;
 
         # get content of header field
-        my $content_node = $row_node->look_down(_tag => "td");
-        my $content      = $content_node->as_text;
+        my $contentNode = $rowNode->look_down(_tag => "td");
+        my $content     = $contentNode->as_text;
 
         # index "cc" as part of "to"
@@ -90,9 +91,9 @@
 
     # find the <div> tag labeled content
-    my $content_tag = $tree->root->look_down(_tag => "div", id => "content");
+    my $contentTag = $tree->root->look_down(_tag => "div", id => "content");
 
     # index message body
     print "\tadding to index content\n" if $verbose;
-    $doc->add(Plucene::Document::Field->UnStored(content => $content_tag->as_text));
+    $doc->add(Plucene::Document::Field->UnStored(content => $contentTag->as_text));
 
     return $doc;
@@ -105,17 +106,17 @@
 =head1 NAME
 
-build_index.pl - generate Plucene/Lucene index of MHonarc archives
+buildIndex.pl - generate Plucene/Lucene index of MHonarc archives
 
 =head1 SYNOPSIS
 
-    build_index.pl --path dir [--index dir] [--verbose]
+    buildIndex.pl --path dir [--index dir] [--verbose]
 
     or
 
-    build_index.pl -p dir [-i dir] [-v]
+    buildIndex.pl -p dir [-i dir] [-v]
 
     or
 
-    build_index.pl [--help | -h | -? | --version]
+    buildIndex.pl [--help | -h | -? | --version]
 
 =head1 DESCRIPTION
@@ -148,5 +149,5 @@
 =back
 
-=head1 DEVELOPERS
+=head1 DEVELOPER NOTES
 
 The parser extracts the C<to>, C<cc>, C<from>, C<subject>, and C<date> headers
@@ -201,6 +202,6 @@
 Place - Suite 330, Boston, MA  02111-1307, USA.
 
-The full text of the license can be found in the LICENSE file included with
-this module, or in the L<perlgpl> Pod as supplied with Perl 5.8.1 and later.
+The full text of the license can be found in the L<perlgpl> Pod as supplied
+with Perl 5.8.1 and later.
 
 =head1 SEE ALSO
