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

Diff of /messaging/manakai/lib/Message/DOM/DocumentFragment.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by wakaba, Sun Jun 17 13:37:40 2007 UTC revision 1.5 by wakaba, Sun Jul 8 13:04:36 2007 UTC
# Line 10  sub ____new ($$) { Line 10  sub ____new ($$) {
10    return $self;    return $self;
11  } # ____new  } # ____new
12                            
 sub AUTOLOAD {  
   my $method_name = our $AUTOLOAD;  
   $method_name =~ s/.*:://;  
   return if $method_name eq 'DESTROY';  
   
   if ({  
     ## Read-only attributes (trivial accessors)  
   }->{$method_name}) {  
     no strict 'refs';  
     eval qq{  
       sub $method_name (\$) {  
         if (\@_ > 1) {  
           require Carp;  
           Carp::croak (qq<Can't modify read-only attribute>);  
         }  
         return \${\$_[0]}->{$method_name};  
       }  
     };  
     goto &{ $AUTOLOAD };  
   } elsif ({  
     ## Read-write attributes (DOMString, trivial accessors)  
   }->{$method_name}) {  
     no strict 'refs';  
     eval qq{  
       sub $method_name (\$) {  
         if (\@_ > 1) {  
           \${\$_[0]}->{$method_name} = ''.$_[1];  
         }  
         return \${\$_[0]}->{$method_name};  
       }  
     };  
     goto &{ $AUTOLOAD };  
   } else {  
     require Carp;  
     Carp::croak (qq<Can't locate method "$AUTOLOAD">);  
   }  
 } # AUTOLOAD  
   
13  ## |Node| attributes  ## |Node| attributes
14    
15  sub node_name ($) {  sub node_name () { '#document-fragment' }
   return '#document-fragment';  
 } # node_name  
   
 ## Spec:  
 ## <http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-111237558>  
16    
17  sub node_type ($) { 11 } # DOCUMENT_FRAGMENT_NODE  sub node_type () { 11 } # DOCUMENT_FRAGMENT_NODE
18    
19  package Message::IF::DocumentFragment;  package Message::IF::DocumentFragment;
20    
21  package Message::DOM::Document;  package Message::DOM::Document;
22    
 ## Spec:  
 ## <http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-35CB04B5>  
   
23  sub create_document_fragment ($) {  sub create_document_fragment ($) {
24    return Message::DOM::DocumentFragment->____new ($_[0]);    return Message::DOM::DocumentFragment->____new ($_[0]);
25  } # create_document_fragment  } # create_document_fragment
26    
27    =head1 LICENSE
28    
29    Copyright 2007 Wakaba <w@suika.fam.cx>
30    
31    This program is free software; you can redistribute it and/or
32    modify it under the same terms as Perl itself.
33    
34    =cut
35    
36  1;  1;
 ## License: <http://suika.fam.cx/~wakaba/archive/2004/8/18/license#Perl+MPL>  
37  ## $Date$  ## $Date$

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24