File: Changes

package info (click to toggle)
libhtml-tree-perl 3.11-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 412 kB
  • ctags: 135
  • sloc: perl: 2,786; makefile: 55
file content (502 lines) | stat: -rw-r--r-- 17,025 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
# Time-stamp: "2001-03-14 20:11:31 MST"

2001-03-14   Sean M. Burke <sburke@cpan.org>

   Release 3.11

   Bugfix: Klaus-Georg Adams <Klaus-Georg.Adams@sap.com> reported that
   the topmost frameset element in an HTML::TreeBuilder tree wasn't
   getting its _parent attribute set.  Fixed.

   Minor bugfix: the root element of a new HTML::TreeBuilder tree was
   missing its initial "_implicit" attribute.  Fixed.

   Two handy new methods in HTML::TreeBuilder: 
    * HTML::TreeBuilder->new_from_content(...)
    * HTML::TreeBuilder->new_from_file($filename)
       a.k.a.: HTML::TreeBuilder->new_from_file($fh)

2001-03-10   Sean M. Burke <sburke@cpan.org>

   Release 3.10

   Now bundling three relevent The Perl Journal articles by me:
   HTML::Tree::AboutObjects, HTML::Tree::AboutTrees, and
   HTML::Tree::Scanning.

   Vadims_Beilins@swh-t.lv observes that $h->push_content(LoL)
   doesn't take care of _parent bookkeeping right.  FIXED.
   John Woffindin <john@xoren.co.nz> notes a similar bug in clone();
   FIXED.

   Adding no_space_compacting feature to TreeBuilder, at suggestion of
   Victor Wagner <vitus@ice.ru>.

   Incorporating the clever suggestion (from Martin H. Sluka,
   <martin@sluka.de>) that $element->extract_links's returned LoL
   should contain a third item (for the attribute name) in the
   per-link listref.  I also add a fourth item, the tagname of the
   element.

   New method, "elementify", in HTML::TreeBuilder.

   Various improvements and clarifications to the POD in
   HTML::TreeBuilder and HTML::Element.

   Some new methods in HTML::Element: "number_lists",
   "objectify_text", and "deobjectify_text".

   HTML::Element and HTML::TreeBuilder versions both bumped up from
   3.08 to 3.10, to keep pace with the HTML::Tree version.

2001-01-21   Sean M. Burke <sburke@cpan.org>

   Release 3.09

   Changed HTML/Element/traverse.pod to HTML/Element/traverse.pm

   Wrote overview file: HTML/Tree.pm

2000-11-03   Sean M. Burke <sburke@cpan.org>

   Release 3.08

   In Element and TreeBuilder: fixed handling of textarea content --
   Thanks to Ronald J Kimball <rjk@linguist.dartmouth.edu> for
   catching this.

   In Element: a few internal changes to make it subclassable by the
   forthcoming XML::Element et al.

2000-10-20   Sean M. Burke <sburke@cpan.org>

   Release 3.07

   In Element: made new_from_lol accept existing HTML::Element objects
   as part of the loltree.  Thanks for Bob Glickstein
   <bobg@zanshin.com> for the suggestion.

   In Element: feeding an arrayref to push_content, unshift_content,
   or splice_content now implicitly calls new_from_lol.

   In Element: reversed the change in as_HTML/XML/Lisp_form that would
   skip dumping attributes with references for values.  It reacted
   undesirably with objects that overload stringify; to wit, URI.pm
   objects.

2000-10-15   Sean M. Burke <sburke@cpan.org>

   Release 3.06
   
   In Element: methods added:  $x->id, $x->idf, $x->as_XML,
   $x->as_Lisp_form

   In Element: internal optimization: as_HTML no longer uses the
   tag() accessor.  Should cause no change in behavior.

   In Element: as_HTML (via starttag) no longer tries to dump
   attributes whose values are references, or whose names
   are null-string or "/".  This should cause no change in
   behavior, as there's no normal way for any document to parse
   to a tree containing any such attributes.

   In Element: minor rewordings or typo-fixes in the POD.

2000-10-02   Sean M. Burke <sburke@cpan.org>

   Release 3.05

   In Element: fixed typo in docs for the content_refs_list method.
   Had:
    foreach my $item ($h->content_array_ref) {
   Corrected to:
    foreach my $item (@{ $h->content_array_ref }) {

   In Element: fixed bug in $h->left that made it useless in scalar
   context.  Thanks to Toby Thurston <toby@wildfire.dircon.co.uk> for
   spotting this.

   In Element: added new method $h->tagname_map

   In TreeBuilder: Some minor corrections to the logic of handling TD
   and TH elements -- basically bug fixes, in response to an astute
   bug report from Toby Thurston <toby@wildfire.dircon.co.uk>.

   In TreeBuilder: Fixed lame bug that made strict-p mode nearly
   useless.  It may now approach usability!

   This dist contains a simple utility called "htmltree" that parses
   given HTML documents, and dumps their parse tree.  (It's not
   actually new in this version, but was never mentioned before.)

   In TreeBuilder, a change of interest only to advanced programmers
   familiar with TreeBuilder's source and perpetually undocumented
   features: there is no $HTML::TreeBuilder::Debug anymore.

   If you want to throw TreeBuilder into Debug mode, you have to do it
   at compile time -- by having a line like this BEFORE any line that
   says "use HTML::TreeBuilder":

      sub HTML::TreeBuilder::DEBUG () {3};
  
   where "5" is whatever debug level (0 for no debug output) that you
   want TreeBuilder to be in.  All the in TreeBuilder that used to say

     print "...stuff..." if $Debug > 1;

   now say

     print "...stuff..." if DEBUG > 1;

   where DEBUG is the constant-sub whose default value set at compile
   time is 0.  The point of this is that for the typical
   compilation-instance of TreeBuilder will run with DEBUG = 0, and
   having that set at compile time means that all the "print ... if
   DEBUG" can be optimized away at compile time, so they don't appear
   in the code tree for TreeBuilder.  This leads to a typical ~10%
   speedup in TreeBuilder code, since it's no longer having to
   constantly interrogate $Debug.

   Note that if you really do NEED the debug level to vary at runtime,
   say:
     sub HTML::TreeBuilder::DEBUG () { $HTML::TreeBuilder::DEBUG };
   and then change that variable's value as need be.  Do this only if
   necessary, tho.

   BTW, useful line to have in your ~/.cshrc:
     alias deparse 'perl -MO=Deparse \!*'
   I found it useful for deparsing TreeBuilder.pm to make sure that
   the DEBUG-conditional statements really were optimized away
   as I intended.

2000-09-04   Sean M. Burke <sburke@cpan.org>

   Release 3.04

   In TreeBuilder: added p_strict, an option to somewhat change
   behavior of implicating "</p>"s.
   Added store_comments, store_declarations, store_pis, to control
   treatment of comments, declarations, and PIs when parsing.

   In Element: documented the pseudo-elements (~comment, ~declaration,
   ~pi, and ~literal).  Corrected as_HTML dumping of ~pi elements.
   
   Removed formfeeds from source of Element and TreeBuilder --
   different editors (and Perl) treat them differently as far as
   incrementing the line counter; so Perl might report an error on
   line 314, but preceding formfeeds might make your editor think that
   that line is actually 316 or something, resulting in confusion all
   around.  Ahwell.

2000-08-26   Sean M. Burke <sburke@cpan.org>

   Release 3.03

   Introduced an optimization in TreeBuilder's logic for checking that
   body-worthy elements are actually inserted under body.  Should
   speed things up a bit -- it saves two method calls per typical
   start-tag.  Hopefully no change in behavior.

   Whoops -- 3.01's change in the return values of TreeBuilder's
   (internal) end(...) method ended up breaking the processing of list
   elements.  Fixed.  Thanks to Claus Schotten for spotting this.

   Whoops 2 -- Margarit A. Nickolov spotted that TreeBuilder
   documented a implicit_body_p_tag method, but the module didn't
   define it.  I must have deleted it some time or other.  Restored.


2000-08-20   Sean M. Burke <sburke@cpan.org>

   Release 3.02

   Fixed a silly typo in Element that made delete_ignorable_whitespace
   useless.

   Made Element's $tree->dump take an optional output-filehandle
   argument.

   Added (restored?) "use integer" to TreeBuilder.


2000-08-20   Sean M. Burke <sburke@cpan.org>

   Release 3.01

   Now depends on HTML::Tagset for data tables of HTML elements and
   their characteristics.

   Version numbers for HTML::TreeBuilder and HTML::Element, as well as
   for the package, moved forward to 3.01.

   Minor changes to HTML::TreeBuilder's docs.

   HTML::TreeBuilder now knows not to amp-decode text children of
   CDATA-parent elements.  Also exceptionally stores comments under
   CDATA-parent elements.

   TreeBuilder should now correctly parse documents with frameset
   elements.  Tricky bunch of hacks.

   TreeBuilder now ignores those pointless "x-html" tags that a
   certain standards-flouting monopolistic American software/OS
   company's mailer wraps its HTML in.

   Introduced "tweaks" in HTML::TreeBuilder -- an experimental
   (and quite undocumented) feature to allow specifying callbacks
   to be called when specific elements are closed; makes possible
   rendering (or otherwise scanning and/or manipulating) documents
   as they are being parsed.  Inspired by Michel Rodriguez's clever
   XML::Twig module.  Until I document this, email me if you're
   interested.

   HTML::Element's as_HTML now knows not to amp-escape children of
   CDATA-parent elements.  Thanks to folks who kept reminding me about this.

   HTML::Element's as_HTML can now take an optional parameter
   specifying which non-empty elements will get end-tags omitted.

   HTML::Element's traverse's docs moved into separate POD,
   HTML::Element::traverse.

   Added HTML::Element methods all_attr_names and
   all_external_attr_names.  Fixed bug in all_external_attr.

   Added HTML::Element method delete_ignorable_whitespace.
   (Actually just moved from HTML::TreeBuilder, where it was
   undocumented, and called tighten_up.)

   Adding a bit of sanity checking to Element's look_down, look_up.

   Added some formfeeds to the source of Element and TreeBuilder,
   to make hardcopy a bit more readable.

2000-06-28   Sean M. Burke <sburke@cpan.org>

   Release 0.68

   Fixed doc typo for HTML::Element's lineage_tag_names method.

   Fixed lame bug in HTML::Element's all_external_attr that made it
   quite useless.  Thanks to Rich Wales <richw@webcom.com> for the bug
   report and patch.

   Changed as_text to no longer DEcode entities, as it formerly did,
   and was documented to.  Since entities are already decoded by time
   text is stored in the tree, another decoding step is wrong.  Neither
   me nor Gisle Aas can remember what that was doing there in the
   first place.

   Changed as_text to not traverse under 'style' and 'script'
   elements.  Rewrote as_text's traverser to be iterative.

   Added a bit of text to HTML::AsSubs to recommend using XML::Generator.


2000-06-12   Sean M. Burke  <sburke@cpan.org>

   Release 0.67.  Just changes to HTML::Element...

   Introduced look_up and look_down.  Thanks to the folks on the
   libwww list for helping me find the right form for that idea.
   Deprecated find_by_attribute

   Doc typo fixed: at one point in the discussion of "consolidating
   text", I said push_content('Skronk') when I meant
   unshift_content('Skronk').  Thanks to Richard Y. Kim (ryk@coho.net)
   for pointing this out.

   Added left() and right() methods.

   Made address([address]) accept relative addresses (".3.0.1")

   Added content_array_ref and content_refs_list.

   Added a bit more clarification to bits of the Element docs here and there.

   Made find_by_tag_name work iteratively now, for speed.


2000-05-18   Sean M. Burke  <sburke@cpan.org>

   Release 0.66

   Noting my new email address.

   Fixed bug in HTML::Element::detach_content -- it would return
   empty-list, instead of returing the nodes detached.

   Fixed big in HTML::Element::replace_with_content -- it would
   accidentally completely kill the parent's content list!
   Thanks to Reinier Post and others for spotting this error.

   Fixed big in HTML::Element::replace_with -- it put replacers
   in the content list of of the new parent, !but! forgot to update
   each replacer's _parent attribute.
   Thanks to Matt Sisk for spotting this error.


2000-03-26   Sean M. Burke  <sburke@netadventure.net>

   Release 0.65

   Important additions to HTML::Element :

     Totally reimplemented the traverse() method, and added features,
     now providing a somewhat-new interface.  It's still
     backwards-compatible both syntactically and semantically.
     
     Added methods: content_list, detach_content, replace_linkage,
     normalize_content, preinsert, postinsert, and has_insane_linkage.

     $h->attr('foo', undef) now actually deletes the attribute
     'foo' from $h, instead of setting it to undef.  Hopefully
     this won't break any existing code!

   Rearranged the order of some sections in the Element docs
   for purely pedagogical reasons.

   Bugfix:  $tree->clone failed to delete the internal
   _head and _body attributes of the clone (used by TreeBuilder),
   $tree->clone->delete ended up deleting most/all of the original!
   Fixed.  Added cavets to the docs warning against cloning
   TreeBuilder objects that are in mid-parse (not that I think most
   users are exactly rushing to do this).
   Thanks to Bob Glickstein for finding and reporting this bug.

   Added some regression/sanity tests in t/

   A bit more sanity checking in TreeBuilder: checks for _head and
   _body before including it.

   Modded TreeBuilder's calls to traverse() to be use new [sub{...},0]
   calling syntax, for sake of efficiency.

   Added some undocumented and experimental code in Element and
   TreeBuilder for using HTML::Element objects to represent
   comments, PIs, declarations, and "literals".

2000-03-08   Sean M. Burke <sburke@netadventure.net>

   Release 0.64

   Bugfix:  $element->replace_with_content() would cause
   a fatal error if any of $element's content nodes were
   text segments.  Fixed.

2000-03-08   Sean M. Burke <sburke@netadventure.net>

   Release 0.63

   Fixed a typo in the SYNOPSIS of TreeBuilder.pm: I had "->destroy" for
   "->delete"!

   Added $element->clone and HTML::Element->clone_list(nodes) methods,
   as Marek Rouchal very helpfully suggested.

   $tree->as_HTML can now indent, hopefully properly.  The logic to do
   so is pretty frightening, and regrettably doesn't wrap, and it's
   not obvious how to make it capable of doing so.

   $tree->as_text can now take a 'skip_dels' parameter.

   Added $h->same_as($j) method.

   Added $h->all_attr method.

   Added $h->new_from_lol constructor method.


1999-12-18   Sean M. Burke <sburke@netadventure.net>

   Release 0.62

   Incremented HTML::AsSubs version to 1.13, and HTML::Parse version
   to 2.7, to avoid version confusion with the old (<0.60) HTML-Tree
   dist.

   Re-simplified the options to HTML::Element::traverse, removing the
   verbose_for_text option.  (The behavior that it turned on, is now
   always on; this should not cause any problems with any existing
   code.)

   Fixed HTML::Element::delete_content, and made an
   HTML::TreeBuilder::delete to override it for TreeBuilder nodes,
   which have their own special attributes.  

   HTML::Element::find_by_attribute, find_by_attribute, and get_attr_i
   now behave differently in scalar context, if you're the sort that
   likes context on method calls.  HTML::Element::descendant is now
   optimized in scalar context.

   Fixed up some of the reporting of lineages in some $Debug-triggered
   messages.

   Fixed minor bug in updating pos when a text node under HTML
   implicates BODY (and maybe P).

   You should not use release 0.61

   

1999-12-15   Sean M. Burke <sburke@netadventure.net>

   Release 0.61

   Versions in this dist:
    HTML::Parse:  2.6
    HTML::TreeBuilder: 2.91
    HTML::Element:  1.44
    HTML::AsSubs: 1.12

   No longer including the Formatter modules.

   Lots of new methods and changes in HTML::Element; reorganized docs.

   Added new HTML tags to HTML::Element's and HTML::TreeBuilder's
   internal tables.

   Reworked the logic in HTML::TreeBuilder.  Previous versions dealt
   badly with tables, and attempts to enforce content-model rules
   occasionally went quite awry.  This new version is much less
   agressive about content-model rules, and works on the principle
   that if the HTML source is cock-eyed, there's limits to what can be
   done to keep the syntax tree from being cock-eyed.

   HTML::TreeBuilder now also tries to ignore ignorable whitespace.
   The resulting parse trees often have half (or fewer) the number of
   nodes, without all the ignorable "     " nodes like before.



1999-12-15   Gisle Aas <gisle@aas.no>

   Release 0.53

   Make it compatible with HTML-Parser-3.00



1999-11-10   Gisle Aas <gisle@aas.no>

   Release 0.52

   Fix SYNOPSIS for HTML::FormatText as suggested by
   Michael G Schwern <schwern@pobox.com>

   Updated my email address.



1998-07-07   Gisle Aas <aas@sn.no>

   Release 0.51

   Avoid new warnings introduced by perl5.004_70



1998-04-01   Gisle Aas <aas@sn.no>

   Release 0.50, the HTML::* modules the dealt with HTML syntax trees
   was unbundled from libwww-perl-5.22.