HTML::DOM, version 0.032
HTML::DOM is a Perl implementation of the HTML Document Object Model
This is an alpha release. So far, the level-2 core HTML and event DOM
interfaces have been implemented, and some of the level-2 style sheet
interfaces.
RECENT CHANGES
See the Changes file for the long version.
0.032
-----
Incompatible change:
• An event_attr_handler that provides a subroutine ending with a line
like ‘defined $ret and !$ret and $event->preventDefault’ will now
end up triggering preventDefault in the case of an undefined $ret.
This is the result of the first new feature:
New features:
• Distinction between event listeners and event handlers based on
HTML 5; preventDefault is called automatically based on the lat-
ter’s return value.
• An event handler can now be an object with a call_with method.
• insertAdjacentHTML and insertAdjacentElement
Various bug fixes
Other changes:
• attr_event_listener has been renamed to event_handler. The old name
is still available but will be removed in a future release.
0.031
-----
Bug fix: To conform to what ‘real’ web browsers do, a form’s elements
collection no longer includes image buttons. Thanks to Steven Nikkel
for reporting this problem.
0.030
-----
New methods:
• EventTarget’s attr_event_listener method
• lastModified
• Form’s encoding method
• A and area elements now have hash, host, etc. properties that refer
to parts of the linked URL.
Other stuff:
• The body element now delegates ‘onload’ et al. to the window.
• Improvements to the init method of event objects.
• The write and writeln methods now accept multiple arguments.
• Various bug fixes
TO DO
- Finish Level 2 CSS support
- outerHTML/innerText?
- Other DOM interfaces (the rest of level 2, and level 3)
- HTML 5 stuff
- Write more complete documentation
- Write more tests
- Finishing checking for memory leaks (run all tests under
Devel::Leak::Object)
INSTALLATION
The easiest way to install this module is to use the CPAN module or
the cpan script:
[sudo] perl -MCPAN -e "install HTML::DOM"
[sudo] cpan HTML::DOM
Or you can use the following:
perl Makefile.PL
make
make test
[sudo] make install
DEPENDENCIES
This module requires perl 5.8.2 or later and the following
Perl modules:
- Scalar::Util 1.14 or later
- Exporter 5.57 or later
- HTML::TreeBuilder and HTML::Element (both part of the HTML::Tree
distribution) (tested with 3.23)
- URI (tested with 1.35)
- LWP 1.13 or later
- CSS::DOM 0.07 or later
- HTML::Encoding is required if the parse_file method is to be used.
- constant::lexical
- Hash::Util::FieldHash::Compat
DOCUMENTATION
After installing, you can find documentation for this module with the
perldoc command.
perldoc HTML::DOM
Or try using man (it's faster, in my experience):
man HTML::DOM
COPYRIGHT AND LICENCE
Copyright (C) 2007-9 Father Chrysostomos
This program is free software; you may redistribute it and/or modify
it under the same terms as perl.