#!/usr/bin/perl

use lib qw( /usr/lib/swish-e/perl );


         use SWISH::Filter;
         my $was_filtered = $filter->filter(
               document     => \$scalar_ref,  # path or ref to a doc
               content_type => $content_type, # content type if doc reference
               name         => $real_path,    # optional name for this file (useful for debugging)
               user_data    => $whatever,     # optional data to make available to filters
          );
 
         # Print out the doc
         if ( $was_filtered ) {
             my $doc_ref = $filter->fetch_doc;
             print $$doc_ref;
         }
 
         # Fetch the content type of the document
         my $content_type = $filter->content_type;
                                                                                
         # Fetch swish-e parser type (TXT*, XML*, HTML*)
         my $doc_type = $filter->swish_parser_type;

