#!/usr/bin/perl

die "
   This is a simple test driver for Ptml.pm.  It displays a 
   Ptml document with no additional logic.

   Usage: doPtml [-vd] template-file-name [section names(s)]
   Where: -v                 : turn on document debug mode
          -d                 : turn on debugging
          template-file-name : your template file
          sections name(s)   : select which `.SECTION name's
                               to display. space delimited list 
" if @ARGV < 1;                             

# we don't know where Ptml is installed, so try both

BEGIN{ 
   eval "require ::Ptml";  
   eval "require Ptml";  
   eval "require Text::Ptml";
   import Text::Ptml qw{PtmlPrint};
}


if ($ARGV[0] =~ m/^-/oi)
{  $options=shift;
   %options=(set_verify=>ON)    if $options =~ m/v/;
   $options{debugging}=1        if $options =~ m/d/;
}

PtmlPrint( shift , \@ARGV, \%options);
