# Temporary fix for HTML::TreeBuilder inheiritance from HTML::Parser
# From Michael A. Chase, mchase@ix.netcom.com
# 
# To apply this patch:
# STEP 1: Chdir to the source directory.
# STEP 2: Run the 'applypatch' program with this patch file as input.
#
# If you do not have 'applypatch', it is part of the 'makepatch' package
# that you can fetch from the Comprehensive Perl Archive Network:
# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
# In the above URL, 'x' should be 2 or higher.
#
# To apply this patch without the use of 'applypatch':
# STEP 1: Chdir to the source directory.
# STEP 2: Run the 'patch' program with this file as input.
#
#### End of Preamble ####

#### Patch data follows ####
diff -ub 'old\HTML-Tree-0.51\lib\HTML\TreeBuilder.pm' 'new\HTML-Tree-0.51\lib\HTML\TreeBuilder.pm'
Index: ./lib/HTML/TreeBuilder.pm
--- ./lib/HTML/TreeBuilder.pm	Tue Dec 14 20:28:20 1999
+++ ./lib/HTML/TreeBuilder.pm	Tue Dec 14 20:55:14 1999
@@ -123,7 +123,13 @@
 {
     my $class = shift;
     my $self = HTML::Element->new('html');  # Initialize HTML::Element part
-    $self->{'_buf'} = '';  # The HTML::Parser part of us needs this
+
+    # Copy HTML::Parser attributes into current object
+    my $hp = HTML::Parser->new();
+    foreach ( keys %$hp ) {
+	$self->{$_} = $hp->{$_};
+    }
+    $self->{_hparser_obj} = $hp; # keep HTML::Parser object alive
 
     # Initialize parser settings
     $self->{'_implicit_tags'}  = 1;
#### End of Patch data ####

#### ApplyPatch data follows ####
# Data version        : 1.0
# Date generated      : Tue Dec 14 20:56:31 1999
# Generated by        : makepatch 2.00_03
# Recurse directories : Yes
# Excluded files      : (\A|.*/)CVS(/.*|\Z)
#                       (\A|.*/)RCS(/.*|\Z)
#                       ,v\Z
#                       (\A|.*/)SCCS(/.*|\Z)
#                       (\A|.*/)[sp]\..+\Z
# p 'lib/HTML/TreeBuilder.pm' 8955 945233714 037777700600
#### End of ApplyPatch data ####

#### End of Patch kit [created: Tue Dec 14 20:56:31 1999] ####
#### Patch checksum: 36 1331 27799 ####
#### Checksum: 55 2067 23802 ####
