#!/usr/bin/perl
# debug.cgi - This will test the debug methods of the HTMLObject Base object.
use HTMLObject::Base;
use strict;
my $doc = HTMLObject::Base->new();
$doc->setHTMLInfo(version => "1.0", dtd => "loose", xhtml => 1);
# since I am testing XHTML code, I have to set the background color, etc. via CSS.
$doc->setStyleEntry(tag => "body", string => "color: #ffffff; background-color: #555555; font-size: 10pt;");
$doc->setStyleEntry(tag => "a:link", string => "color: blue; text-decoration: none;");
$doc->setTitle("Debug.cgi");
$doc->setBodyFgcolor("red");
$doc->setBodyBgcolor("blue");
$doc->setFocus("head");
$doc->setLinkDecorations();
$doc->setFocus("body");
$doc->print("This is debug.cgi...
\n");
$doc->print("This is a test!\n
");
$doc->printTag(tag => "", value => "\n
This was inserted via printTag.");
$doc->printTag(tag => "", value => " I just added some more text to this tag!");
my $testTagValue = $doc->readTag(tag => "");
$doc->deleteTag(tag => "");
$doc->printTag(tag => "", value => "The following content was printed, read and then deleted and then re-printed ($testTagValue)\n", mode => "single");
$doc->displayError(title => "Testing Debug Code", message => "Just Testing Debug Code in displayError method.", debug => 1);