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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Sat Jun 16 08:05:48 2007 UTC (17 years, 5 months ago) by wakaba
Branch: MAIN
Changes since 1.2: +16 -16 lines
++ manakai/t/ChangeLog	16 Jun 2007 08:01:18 -0000
	* DOM-NodeList.t: New test.

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

++ manakai/lib/Message/DOM/ChangeLog	16 Jun 2007 08:05:30 -0000
	* Attr.pm, AttributeDefinition.pm, DocumentFragment.pm,
	DocumentType.pm, Entity.pm,
	EntityReference.pm (____new): Initialize |child_nodes| by an empty list.

	* Node.pm, DOMCharacterData.pm, ElementTypeDefinition.pm,
	Notation.pm, ProcessingInstruction.pm (child_nodes): Implemetned.

	* DOMDocument.pm (AUTOLOAD): Typo fixed.

	* Node.pm (==, !=): Implemented.
	(manakai_read_only): Implemented.
	(is_same_node): Implemented.
	(is_equal_node): Alpha version.
	(manakai_set_read_only): Alpha version.
	(child_nodes, first_child, last_child, previous_sibling): Duplicate
	definitions are removed.

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

1 wakaba 1.1 package Message::DOM::Notation;
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::DOM::Node', 'Message::IF::Notation';
5     require Message::DOM::Node;
6    
7     sub ____new ($$$) {
8     my $self = shift->SUPER::____new (shift);
9     $$self->{node_name} = $_[0];
10     return $self;
11     } # ____new
12    
13     sub AUTOLOAD {
14     my $method_name = our $AUTOLOAD;
15     $method_name =~ s/.*:://;
16     return if $method_name eq 'DESTROY';
17    
18     if ({
19     ## Read-only attributes (trivial accessors)
20 wakaba 1.2 node_name => 1,
21 wakaba 1.1 }->{$method_name}) {
22     no strict 'refs';
23     eval qq{
24     sub $method_name (\$) {
25     if (\@_ > 1) {
26     require Carp;
27     Carp::croak (qq<Can't modify read-only attribute>);
28     }
29     return \${\$_[0]}->{$method_name};
30     }
31     };
32     goto &{ $AUTOLOAD };
33     } elsif ({
34     ## Read-write attributes (DOMString, trivial accessors)
35     public_id => 1,
36     system_id => 1,
37     }->{$method_name}) {
38     no strict 'refs';
39     eval qq{
40     sub $method_name (\$) {
41     if (\@_ > 1) {
42     \${\$_[0]}->{$method_name} = ''.$_[1];
43     }
44     return \${\$_[0]}->{$method_name};
45     }
46     };
47     goto &{ $AUTOLOAD };
48     } else {
49     require Carp;
50     Carp::croak (qq<Can't locate method "$AUTOLOAD">);
51     }
52     } # AUTOLOAD
53     sub public_id ($;$);
54     sub system_id ($;$);
55    
56     ## The |Node| interface - attribute
57    
58 wakaba 1.3 sub child_nodes ($) {
59     require Message::DOM::NodeList;
60     return bless \\($_[0]), 'Message::DOM::NodeList::EmptyNodeList';
61     } # child_nodes
62 wakaba 1.2
63     sub node_name ($); # read-only trivial accessor
64    
65 wakaba 1.3 sub node_type () { 12 } # NOTATION_NODE
66 wakaba 1.1
67     package Message::IF::Notation;
68    
69     package Message::DOM::Document;
70    
71 wakaba 1.2 sub create_notation ($$) {
72 wakaba 1.1 return Message::DOM::Notation->____new (@_[0, 1]);
73     } # create_notation
74    
75 wakaba 1.3 =head1 LICENSE
76    
77     Copyright 2007 Wakaba <w@suika.fam.cx>
78    
79     This program is free software; you can redistribute it and/or
80     modify it under the same terms as Perl itself.
81    
82     =cut
83    
84 wakaba 1.1 1;
85 wakaba 1.3 ## $Date: 2007/06/15 14:32:50 $

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24