1 |
wakaba |
1.1 |
package Message::DOM::DOMImplementation; |
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::DOMImplementation'; |
5 |
|
|
|
6 |
|
|
sub ____new ($) { |
7 |
|
|
my $self = bless {}, shift; |
8 |
|
|
return $self; |
9 |
|
|
} # ____new |
10 |
|
|
|
11 |
|
|
sub AUTOLOAD { |
12 |
|
|
my $method_name = our $AUTOLOAD; |
13 |
|
|
$method_name =~ s/.*:://; |
14 |
|
|
return if $method_name eq 'DESTROY'; |
15 |
|
|
|
16 |
|
|
my $module_name = { |
17 |
|
|
create_document => 'Message::DOM::DOMDocument', ## TODO: New module name |
18 |
wakaba |
1.2 |
create_document_type => 'Message::DOM::DocumentType', |
19 |
wakaba |
1.3 |
create_mc_decode_handler => 'Message::Charset::Encode', |
20 |
wakaba |
1.1 |
create_uri_reference => 'Message::URI::URIReference', |
21 |
wakaba |
1.3 |
get_charset_name_from_uri => 'Message::Charset::Encode', |
22 |
|
|
get_uri_from_charset_name => 'Message::Charset::Encode', |
23 |
wakaba |
1.1 |
}->{$method_name}; |
24 |
|
|
if ($module_name) { |
25 |
|
|
eval qq{ require $module_name } or die $@; |
26 |
|
|
no strict 'refs'; |
27 |
|
|
goto &{ $AUTOLOAD }; |
28 |
|
|
} else { |
29 |
|
|
require Carp; |
30 |
|
|
Carp::croak (qq<Can't locate method "$AUTOLOAD">); |
31 |
|
|
} |
32 |
|
|
} # AUTOLOAD |
33 |
|
|
## DOMImplementation |
34 |
|
|
sub create_document ($;$$$); |
35 |
wakaba |
1.2 |
sub create_document_type ($$;$$); |
36 |
wakaba |
1.3 |
## MCImplementation |
37 |
|
|
sub create_mc_decode_handler; |
38 |
|
|
sub get_charset_name_from_uri; |
39 |
|
|
sub get_uri_from_charset_name; |
40 |
wakaba |
1.1 |
## URIImplementation |
41 |
|
|
sub create_uri_reference ($$); |
42 |
|
|
|
43 |
|
|
#our $HasFeature; |
44 |
|
|
|
45 |
|
|
## TODO: getFeature |
46 |
|
|
## TODO: hasFeature |
47 |
|
|
|
48 |
|
|
## NOTE: createDocumentType will be defined in DocumentType.pm |
49 |
|
|
|
50 |
|
|
package Message::IF::DOMImplementation; |
51 |
|
|
|
52 |
|
|
1; |
53 |
|
|
## License: <http://suika.fam.cx/~wakaba/archive/2004/8/18/license#Perl+MPL> |
54 |
wakaba |
1.3 |
## $Date: 2007/06/14 13:10:07 $ |