| 1 |
wakaba |
1.1 |
package Message::DOM::DOMImplementation; |
| 2 |
|
|
use strict; |
| 3 |
|
|
our $VERSION=do{my @r=(q$Revision: 1.3 $=~/\d+/g);sprintf "%d."."%02d" x $#r,@r}; |
| 4 |
|
|
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 |
|
|
create_uri_reference => 'Message::URI::URIReference', |
| 19 |
|
|
}->{$method_name}; |
| 20 |
|
|
if ($module_name) { |
| 21 |
|
|
eval qq{ require $module_name } or die $@; |
| 22 |
|
|
no strict 'refs'; |
| 23 |
|
|
goto &{ $AUTOLOAD }; |
| 24 |
|
|
} else { |
| 25 |
|
|
require Carp; |
| 26 |
|
|
Carp::croak (qq<Can't locate method "$AUTOLOAD">); |
| 27 |
|
|
} |
| 28 |
|
|
} # AUTOLOAD |
| 29 |
|
|
## DOMImplementation |
| 30 |
|
|
sub create_document ($;$$$); |
| 31 |
|
|
## URIImplementation |
| 32 |
|
|
sub create_uri_reference ($$); |
| 33 |
|
|
|
| 34 |
|
|
#our $HasFeature; |
| 35 |
|
|
|
| 36 |
|
|
## TODO: getFeature |
| 37 |
|
|
## TODO: hasFeature |
| 38 |
|
|
|
| 39 |
|
|
## NOTE: createDocumentType will be defined in DocumentType.pm |
| 40 |
|
|
|
| 41 |
|
|
package Message::IF::DOMImplementation; |
| 42 |
|
|
|
| 43 |
|
|
1; |
| 44 |
|
|
## License: <http://suika.fam.cx/~wakaba/archive/2004/8/18/license#Perl+MPL> |
| 45 |
|
|
## $Date:$ |