/[suikacvs]/messaging/manakai/lib/Message/URI/URIReference.pm
Suika

Diff of /messaging/manakai/lib/Message/URI/URIReference.pm

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

revision 1.4 by wakaba, Wed Jun 13 12:04:51 2007 UTC revision 1.5 by wakaba, Mon Jul 16 11:58:02 2007 UTC
# Line 2  package Message::URI::URIReference; Line 2  package Message::URI::URIReference;
2  use strict;  use strict;
3  our $VERSION=do{my @r=(q$Revision$=~/\d+/g);sprintf "%d."."%02d" x $#r,@r};  our $VERSION=do{my @r=(q$Revision$=~/\d+/g);sprintf "%d."."%02d" x $#r,@r};
4    
 require Message::Util::Error::DOMException;  
   
5  package Message::IF::URIImplementation;  package Message::IF::URIImplementation;
6  package Message::DOM::DOMImplementation;  package Message::DOM::DOMImplementation;
7  push our @ISA, 'Message::IF::URIImplementation';  push our @ISA, 'Message::IF::URIImplementation';
# Line 765  uri_path Line 763  uri_path
763    
764  ## TODO: An attribute that returns the number of path segments is necessary.  ## TODO: An attribute that returns the number of path segments is necessary.
765    
766  sub is_uri ($;$) {  *is_uri = \&is_uri_3986;
 if (@_ == 1) {my ($self) = @_;  
 my $r = 0;  
   
 {  
767    
768    sub is_uri_3986 ($) {
769  {    my $self = $_[0];
770      my $r = 0;
 local $Error::Depth = $Error::Depth + 1;  
   
 {  
   
   
   
   $r = $self->  
 is_uri_3986  
 ;  
   
   
   
 }  
   
   
 ;}  
   
 ;  
   
   
 }  
 $r;  
 } else {my ($self) = @_;  
 report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#on' => 'get', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#READ_ONLY_ATTRIBUTE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::URI::Generic::ManakaiURIReference', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'is_uri';  
 }  
 }  
 sub is_uri_3986 ($;$) {  
 if (@_ == 1) {my ($self) = @_;  
 my $r = 0;  
771    
772  {  {
773    
# Line 899  if ($x =~ s/(?:$ipv4|$h16)\z//o) { Line 864  if ($x =~ s/(?:$ipv4|$h16)\z//o) {
864    
865  }  }
866  $r;  $r;
867  } else {my ($self) = @_;  } # is_uri_3986
 report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#on' => 'get', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#READ_ONLY_ATTRIBUTE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::URI::Generic::ManakaiURIReference', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'is_uri_3986';  
 }  
 }  
 sub is_relative_reference ($;$) {  
 if (@_ == 1) {my ($self) = @_;  
 my $r = 0;  
   
 {  
   
   
 {  
   
 local $Error::Depth = $Error::Depth + 1;  
   
 {  
   
   
   
   $r = $self->  
 is_relative_reference_3986  
 ;  
   
   
   
 }  
868    
869    *is_relative_reference = \&is_relative_reference_3986;
870    
871  ;}  sub is_relative_reference_3986 ($) {
872      my $self = $_[0];
 ;  
   
   
 }  
 $r;  
 } else {my ($self) = @_;  
 report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#on' => 'get', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#READ_ONLY_ATTRIBUTE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::URI::Generic::ManakaiURIReference', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'is_relative_reference';  
 }  
 }  
 sub is_relative_reference_3986 ($;$) {  
 if (@_ == 1) {my ($self) = @_;  
873  my $r = 0;  my $r = 0;
874    
875  {  {
# Line 1037  if ($x =~ s/(?:$ipv4|$h16)\z//o) { Line 967  if ($x =~ s/(?:$ipv4|$h16)\z//o) {
967    
968  }  }
969  $r;  $r;
970  } else {my ($self) = @_;  } # is_relative_reference_3986
 report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#on' => 'get', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#READ_ONLY_ATTRIBUTE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::URI::Generic::ManakaiURIReference', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'is_relative_reference_3986';  
 }  
 }  
 sub is_uri_reference ($;$) {  
 if (@_ == 1) {my ($self) = @_;  
 my $r = 0;  
   
 {  
   
   
 {  
   
 local $Error::Depth = $Error::Depth + 1;  
   
 {  
   
971    
972    *is_uri_reference = \&is_uri_reference_3986;
973    
974    $r = $self->  sub is_uri_reference_3986 ($) {
975  is_uri_reference_3986    my $self = $_[0];
 ;  
   
   
   
 }  
   
   
 ;}  
   
 ;  
   
   
 }  
 $r;  
 } else {my ($self) = @_;  
 report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#on' => 'get', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#READ_ONLY_ATTRIBUTE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::URI::Generic::ManakaiURIReference', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'is_uri_reference';  
 }  
 }  
 sub is_uri_reference_3986 ($;$) {  
 if (@_ == 1) {my ($self) = @_;  
976  my $r = 0;  my $r = 0;
977    
978  {  {
# Line 1110  is_relative_reference_3986 Line 1005  is_relative_reference_3986
1005    
1006  }  }
1007  $r;  $r;
1008  } else {my ($self) = @_;  } # is_uri_reference_3986
 report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#on' => 'get', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#READ_ONLY_ATTRIBUTE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::URI::Generic::ManakaiURIReference', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'is_uri_reference_3986';  
 }  
 }  
 sub is_absolute_uri ($;$) {  
 if (@_ == 1) {my ($self) = @_;  
 my $r = 0;  
1009    
1010  {  *is_absolute_uri = \&is_absolute_uri_3986;
1011    
1012    sub is_absolute_uri_3986 ($) {
1013  {    my $self = $_[0];
   
 local $Error::Depth = $Error::Depth + 1;  
   
 {  
   
   
   
   $r = $self->  
 is_absolute_uri_3986  
 ;  
   
   
   
 }  
   
   
 ;}  
   
 ;  
   
   
 }  
 $r;  
 } else {my ($self) = @_;  
 report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#on' => 'get', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#READ_ONLY_ATTRIBUTE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::URI::Generic::ManakaiURIReference', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'is_absolute_uri';  
 }  
 }  
 sub is_absolute_uri_3986 ($;$) {  
 if (@_ == 1) {my ($self) = @_;  
1014  my $r = 0;  my $r = 0;
1015    
1016  {  {
# Line 1180  is_uri_3986 Line 1040  is_uri_3986
1040    
1041  }  }
1042  $r;  $r;
1043  } else {my ($self) = @_;  } # is_uri_reference_3986
 report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#on' => 'get', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#READ_ONLY_ATTRIBUTE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::URI::Generic::ManakaiURIReference', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'is_absolute_uri_3986';  
 }  
 }  
 sub is_empty_reference ($;$) {  
 if (@_ == 1) {my ($self) = @_;  
 my $r = 0;  
   
 {  
   
1044    
1045  $r = ($$self eq '');  sub is_empty_reference ($) {
1046      return ${$_[0]} eq '';
1047    } # is_empty_reference
1048    
1049    *is_iri = \&is_iri_3987;
1050    
1051  }  sub is_iri_3987 ($) {
1052  $r;    my $self = $_[0];
 } else {my ($self) = @_;  
 report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#on' => 'get', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#READ_ONLY_ATTRIBUTE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::URI::Generic::ManakaiURIReference', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'is_empty_reference';  
 }  
 }  
 sub is_iri ($;$) {  
 if (@_ == 1) {my ($self) = @_;  
 my $r = 0;  
   
 {  
   
   
 {  
   
 local $Error::Depth = $Error::Depth + 1;  
   
 {  
   
   
   
   $r = $self->  
 is_iri_3987  
 ;  
   
   
   
 }  
   
   
 ;}  
   
 ;  
   
   
 }  
 $r;  
 } else {my ($self) = @_;  
 report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#on' => 'get', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#READ_ONLY_ATTRIBUTE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::URI::Generic::ManakaiURIReference', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'is_iri';  
 }  
 }  
 sub is_iri_3987 ($;$) {  
 if (@_ == 1) {my ($self) = @_;  
1053  my $r = 0;  my $r = 0;
1054    
1055  {  {
# Line 1338  if ($x =~ s/(?:$ipv4|$h16)\z//o) { Line 1151  if ($x =~ s/(?:$ipv4|$h16)\z//o) {
1151    
1152  }  }
1153  $r;  $r;
1154  } else {my ($self) = @_;  } # is_iri_3987
 report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#on' => 'get', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#READ_ONLY_ATTRIBUTE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::URI::Generic::ManakaiURIReference', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'is_iri_3987';  
 }  
 }  
 sub is_relative_iri_reference ($;$) {  
 if (@_ == 1) {my ($self) = @_;  
 my $r = 0;  
   
 {  
   
   
 {  
   
 local $Error::Depth = $Error::Depth + 1;  
   
 {  
   
   
   
   $r = $self->  
 is_relative_iri_reference_3987  
 ;  
   
1155    
1156    *is_relative_iri_reference = \&is_relative_iri_reference_3987;
1157    
1158  }  sub is_relative_iri_reference_3987 ($) {
1159      my $self = $_[0];
   
 ;}  
   
 ;  
   
   
 }  
 $r;  
 } else {my ($self) = @_;  
 report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#on' => 'get', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#READ_ONLY_ATTRIBUTE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::URI::Generic::ManakaiURIReference', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'is_relative_iri_reference';  
 }  
 }  
 sub is_relative_iri_reference_3987 ($;$) {  
 if (@_ == 1) {my ($self) = @_;  
1160  my $r = 0;  my $r = 0;
1161    
1162  {  {
# Line 1480  if ($x =~ s/(?:$ipv4|$h16)\z//o) { Line 1258  if ($x =~ s/(?:$ipv4|$h16)\z//o) {
1258    
1259  }  }
1260  $r;  $r;
1261  } else {my ($self) = @_;  } # is_relative_iri_reference_3987
 report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#on' => 'get', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#READ_ONLY_ATTRIBUTE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::URI::Generic::ManakaiURIReference', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'is_relative_iri_reference_3987';  
 }  
 }  
 sub is_iri_reference ($;$) {  
 if (@_ == 1) {my ($self) = @_;  
 my $r = 0;  
   
 {  
   
   
 {  
   
 local $Error::Depth = $Error::Depth + 1;  
   
 {  
   
   
   
   $r = $self->  
 is_iri_reference_3987  
 ;  
   
1262    
1263    *is_iri_reference = \&is_iri_reference_3987;
1264    
1265  }  sub is_iri_reference_3987 ($) {
1266      my $self = $_[0];
   
 ;}  
   
 ;  
   
   
 }  
 $r;  
 } else {my ($self) = @_;  
 report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#on' => 'get', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#READ_ONLY_ATTRIBUTE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::URI::Generic::ManakaiURIReference', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'is_iri_reference';  
 }  
 }  
 sub is_iri_reference_3987 ($;$) {  
 if (@_ == 1) {my ($self) = @_;  
1267  my $r = 0;  my $r = 0;
1268    
1269  {  {
# Line 1553  is_relative_iri_reference_3987 Line 1296  is_relative_iri_reference_3987
1296    
1297  }  }
1298  $r;  $r;
1299  } else {my ($self) = @_;  } # is_iri_reference_3987
 report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#on' => 'get', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#READ_ONLY_ATTRIBUTE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::URI::Generic::ManakaiURIReference', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'is_iri_reference_3987';  
 }  
 }  
 sub is_absolute_iri ($;$) {  
 if (@_ == 1) {my ($self) = @_;  
 my $r = 0;  
   
 {  
   
   
 {  
   
 local $Error::Depth = $Error::Depth + 1;  
   
 {  
   
   
   
   $r = $self->  
 is_absolute_iri_3987  
 ;  
1300    
1301    *is_absolute_iri = \&is_absolute_iri_3987;
1302    
1303    sub is_absolute_iri_3987 ($) {
1304  }    my $self = $_[0];
   
   
 ;}  
   
 ;  
   
   
 }  
 $r;  
 } else {my ($self) = @_;  
 report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#on' => 'get', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#READ_ONLY_ATTRIBUTE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::URI::Generic::ManakaiURIReference', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'is_absolute_iri';  
 }  
 }  
 sub is_absolute_iri_3987 ($;$) {  
 if (@_ == 1) {my ($self) = @_;  
1305  my $r = 0;  my $r = 0;
1306    
1307  {  {
# Line 1623  is_iri_3987 Line 1331  is_iri_3987
1331    
1332  }  }
1333  $r;  $r;
1334  } else {my ($self) = @_;  } # is_absolute_iri_3987
1335  report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#on' => 'get', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#READ_ONLY_ATTRIBUTE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::URI::Generic::ManakaiURIReference', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'is_absolute_iri_3987';  
 }  
 }  
1336  sub get_uri_reference ($) {  sub get_uri_reference ($) {
1337  my ($self) = @_;  my ($self) = @_;
1338  my $r;  my $r;

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24