/[suikacvs]/messaging/manakai/lib/Message/DOM/DOMConfiguration.pm
Suika

Contents of /messaging/manakai/lib/Message/DOM/DOMConfiguration.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Thu Jun 21 14:57:53 2007 UTC (17 years, 5 months ago) by wakaba
Branch: MAIN
Changes since 1.2: +6 -2 lines
++ manakai/t/ChangeLog	21 Jun 2007 14:57:40 -0000
2007-06-21  Wakaba  <wakaba@suika.fam.cx>

	* DOM-Node.t: Tests for |node_type| are added.

++ manakai/lib/Message/DOM/ChangeLog	21 Jun 2007 14:57:15 -0000
	* Comment.pm (node_type): Node type was incorrect!

	* DOMConfiguration.pm (get_parameter): Alpha.

	* DOMImplementation.pm (create_mc_decode_handler,
	create_charset_name_from_uri, create_uri_from_charset_name):
	New autoload configuration.  Note that the Message::Charset::Encode
	module is subject to change.

	* XMLParserTemp.pm: Now it can be used with new version
	of DOM implementation.  Current plan is to replace it by
	an XML5 parser someday.

2007-06-21  Wakaba  <wakaba@suika.fam.cx>

1 wakaba 1.1 package Message::DOM::DOMConfiguration;
2     use strict;
3 wakaba 1.3 our $VERSION=do{my @r=(q$Revision: 1.2 $=~/\d+/g);sprintf "%d."."%02d" x $#r,@r};
4 wakaba 1.1 push our @ISA, 'Message::IF::DOMConfiguration';
5     require Message::DOM::DOMException;
6    
7     use overload
8     eq => sub {
9     return 0 unless UNIVERSAL::isa ($_[1], 'Message::DOM::DOMConfiguration');
10     return $${$_[0]} eq $${$_[1]};
11     },
12     ne => sub {
13     return not ($_[0] eq $_[1]);
14     },
15     fallback => 1;
16    
17     sub ___report_error ($$) {
18     $_[1]->throw;
19     } # ___report_error
20    
21     ## |DOMConfiguration| methods
22    
23 wakaba 1.3 sub get_parameter ($$) {
24     return ${$${$_[0]}}->{$_[1]};
25     } # get_parameter
26    
27 wakaba 1.1 sub set_parameter ($$;$) {
28 wakaba 1.2 if (defined $_[2]) {
29     ${$${$_[0]}}->{$_[1]} = $_[2];
30     } else {
31     if ($_[1] eq 'http://suika.fam.cx/www/2006/dom-config/clone-entity-reference-subtree' or
32     $_[1] eq 'http://suika.fam.cx/www/2006/dom-config/dtd-default-attribute' or
33     $_[1] eq 'http://suika.fam.cx/www/2006/dom-config/strict-document-children') {
34     ${$${$_[0]}}->{$_[1]} = 1;
35     } elsif ($_[1] eq 'error-handler') {
36     ${$${$_[0]}}->{$_[1]} = sub { };
37     } else {
38     delete ${$${$_[0]}}->{$_[1]};
39     }
40     }
41     ## http://suika.fam.cx/www/2006/dom-config/clone-entity-reference-subtree
42     ## http://suika.fam.cx/www/2006/dom-config/dtd-default-attribute
43     ## http://suika.fam.cx/www/2006/dom-config/xml-id
44     ## error-handler
45     ## xml-dtd
46     ## http://suika.fam.cx/www/2006/dom-config/strict-document-children
47 wakaba 1.1 } # set_parameter
48    
49     package Message::IF::DOMConfiguration;
50    
51     =head1 LICENSE
52    
53     Copyright 2007 Wakaba <w@suika.fam.cx>
54    
55     This program is free software; you can redistribute it and/or
56     modify it under the same terms as Perl itself.
57    
58     =cut
59    
60     1;
61 wakaba 1.3 ## $Date: 2007/06/17 13:37:40 $

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24