9 |
sub create_uri_reference ($$) { |
sub create_uri_reference ($$) { |
10 |
if (UNIVERSAL::isa ($_[1], 'Message::IF::URIReference')) { |
if (UNIVERSAL::isa ($_[1], 'Message::IF::URIReference')) { |
11 |
local $Error::Depth = $Error::Depth + 1; |
local $Error::Depth = $Error::Depth + 1; |
12 |
return $_[1]->clone_uri_reference; |
my $uri = $_[1]->uri_reference; |
13 |
|
return bless \$uri, 'Message::URI::URIReference'; |
14 |
} elsif (ref $_[1] eq 'SCALAR') { |
} elsif (ref $_[1] eq 'SCALAR') { |
15 |
my $uri = $_[1]; |
my $uri = ''.${$_[1]}; |
16 |
return bless $uri, 'Message::URI::URIReference'; |
return bless \$uri, 'Message::URI::URIReference'; |
17 |
} else { |
} else { |
18 |
my $v = "$_[1]"; |
my $uri = ''.$_[1]; |
19 |
return bless \$v, 'Message::URI::URIReference'; |
return bless \$uri, 'Message::URI::URIReference'; |
20 |
} |
} |
21 |
} |
} # create_uri_reference |
|
|
|
|
our $HasFeature; |
|
|
$HasFeature->{'http://suika.fam.cx/www/2006/feature/uri'}->{''} = 1; |
|
|
$HasFeature->{'http://suika.fam.cx/www/2006/feature/uri'}->{'4.0'} = 1; |
|
22 |
|
|
23 |
package Message::IF::URIReference; |
package Message::IF::URIReference; |
24 |
package Message::URI::URIReference; |
package Message::URI::URIReference; |
2250 |
, |
, |
2251 |
fallback => 1; |
fallback => 1; |
2252 |
|
|
2253 |
|
# Portions of the Perl implementation contained in the module |
2254 |
|
# are derived from the example parser (April 7, 2004) available at |
2255 |
|
# <URI::http://www.gbiv.com/protocols/uri/rev-2002/uri_test.pl> |
2256 |
|
# that is placed in the Public Domain by Roy T. Fielding |
2257 |
|
# and Day Software, Inc. |
2258 |
|
|
2259 |
1; |
1; |
2260 |
## License: <http://suika.fam.cx/~wakaba/archive/2004/8/18/license#Perl+MPL> |
## License: <http://suika.fam.cx/~wakaba/archive/2004/8/18/license#Perl+MPL> |
2261 |
## $Date$ |
## $Date$ |