To Do:

General
--------
- Change to use placeholders for the dbi sql functions.

- Change to useing a hash instead of individual options in the module
subroutine calls.

- Change and/or create help message subroutine = HELP_MESSAGE  
(see documentation of Getops::Std)

- Use File::Spec where appropriate.

- The option used to define which type of database to use does not currently
do any error checking on that type;  the script will fail if a correct DBD name
is not used.  If do not explicitly do such error or other checking, document
the standard names for DBI DBD modules like SQlite (default), mysql, cvs, and
postgresql.

- The use of special characters like periods in table names is a more general
issue where it is not a good idea to use them at all.  Redo the comments in
scripts and modules regarding that, to generalize it.  (Derive function to
validate it and add that to the FTN::Database module?)

- Change to using the options hash from GetOpt::Std instead of the individual
option variables like $opt_l.   Once that has been completed;  move at least
the database related options checking to a subroutine in FTN::Database?

- Use the "if (defined $opt_l)" construct for checking options?

- Separate out the submodules, like FTN::Database::Nodelist, into separate
distributions so that only the functionality needed is installed?


FTN::Database
--------------
- Derive a generic drop_table subroutine from the drop_nodelist_table.
- Add an explicit function to create a database, create_ftndb (not explicitly
  needed for default DBD SQLite but it can be for others).  Add function to use
  it, to the ftndbadm program.  CAlso one for drop_ftndb.)
- Create set_ftndb_acl subroutine? (Same reasoning as for create_ftndb.)
- Possible function/subroutine that checks if a valid database table name is
  being used?  And corrects it if possible?


FTN::Database::Nodelist
------------------------
- Derive and move a function for executing queries on the nodelist table from
  the code used in the listftndb subroutine.
- As part of adding statistics related functions, add a function that counts
  the number of nodes that have a particular flag associated with it.  Could
  use the name get_nodelist_flag_count($dbh,$nodelist_flag).  Also add 
  something that counts the number of things like hubs, nodes marked as
  private, etc. 
- Derive and move function to insert or update an entry from nl2ftndb. Separate
  functions for insert & update, or different options in same function?
- Move get_nodelist_filename subroutine from nl2ftndb script?
- Use a different datatype than "TIMESTAMP" for the 'updated' filed in the
  nodelist table?  (Not generic enough?)

  
FTN::Database::Echolist
------------------------
- Create an FTN database module for echolists which:  Creates or Drops an
  echolist table, default name "Echolist"?  Basic table would consist of
  (at least) the following fields:  name, description, source.
- Create or drop an index on that basic echolist table.
- Create an el2ftndb script, patterned after the nl2ftndb script, which can
  be used to load the echolist table?  Or add the functionality to one of 
  the existing scripts?


ftndbadm
-------- 
- Add better error checking.
- Add quiet option, -q, for logging only operation ? 
- Rename as ftnpldb?  As something like ftnpldb-admin?
- Move display of help message to an appropriately named subroutine.
- Add an explicit function to create a database;  it's not needed for SQLite
  databases but it can be for others.  (See ToDo for FTN:Database)
- Add cammand/options to create or drop the ftnnode index on the nodelist table?
- Reorganize script to use a set of commands, not just parameters.


nl2ftndb
---------
- Change to using placeholders in the insert nodelist code by:
    Change the build sql statement code to being an 'prepare' function that
  builds the insert sql statment using placeholders for the table fields.
  Use the prepare cached version of it?  This will also allow moving that
  part of it out of the loop, so only the execute is in the loop.  Later,
  could move it into the F-D-NL module?  Use $insert_handle as the handle
  returned by the prepare?
    Change the 'do' function to an execute function on the handle from the
  prepare.  (http://www.perlmonks.org/?node_id=7548)  This will also allow
  removal of the existing code to removing single quotes and other code
  needed to make the data safe for insertion into the database as when
  using prepare/execute DBI automatically does any neccessary quoting 
  to insert the data safely.  Note that will still need to keep the code
  for taking care of the EOLs because of cross platform issues.
- Get quoteing working properly for entry into the database for fields like
  $location and $name, so do not have to take out characters like single
  quotes, etc.
- Move functionality into the ftndbadm script?
- Script does not seem to properly handle a file that ends in just blank
  lines, instead of a content line or a ^Z character. (Should fail gracefully
  for a badly formatted file.)
- The nodelist file list is being reverse sorted when there are multiple
  nodelists of the same basename being processed;  that takes care of a set
  of files all from the same year but not ones that are from different years.
- Add quiet option, -q, for logging only operation ? 
- Add a test nodelist for use with this?...


listftndb
----------
- Change to using Text::Template for creating the output.
- Change default output to STDOUT;  i.e., print to the screen.  Selected if the
  "-o" variable is not set.
- Besides the print to screen output & output to text file, add option for html
  formatted output?  And/or just add formated output using a template file?
- Generalize the command line parseing to allow for commands for listing from
  the nodelist or echolist (when that's added) tables.
- Add quiet option, -q, for logging only operation ? 
- Move functionality into the ftndbadm script?


Testing
-------
- Procedure in test script?    
1) get temp directory
2) create working directory there
3) ...  testing...
4) remove test working directory
5) done
  