-package WWW::OpenSearch::Url;\r
-\r
-use base qw( Class::Accessor::Fast );\r
-\r
-use URI;\r
-use URI::Escape;\r
-\r
-__PACKAGE__->mk_accessors( qw( type template method params macros ) );\r
-\r
-=head1 NAME\r
-\r
-WWW::OpenSearch::Url\r
-\r
-=head1 SYNOPSIS\r
-\r
-=head1 DESCRIPTION\r
-\r
-=head1 CONSTRUCTOR\r
-\r
-=head2 new( [%options] )\r
-\r
-=head1 METHODS\r
-\r
-=head2 parse_macros( )\r
-\r
-=head2 prepare_query( [ \%params ] )\r
-\r
-=head1 ACCESSORS\r
-\r
-=head1 AUTHOR\r
-\r
-=over 4\r
-\r
-=item * Tatsuhiko Miyagawa E<lt>miyagawa@bulknews.netE<gt>\r
-\r
-=item * Brian Cassidy E<lt>bricas@cpan.orgE<gt>\r
-\r
-=back\r
-\r
-=head1 COPYRIGHT AND LICENSE\r
-\r
-Copyright 2006 by Tatsuhiko Miyagawa and Brian Cassidy\r
-\r
-This library is free software; you can redistribute it and/or modify\r
-it under the same terms as Perl itself. \r
-\r
-=cut\r
-\r
-sub new {\r
- my( $class, %options ) = @_;\r
- \r
- $options{ method } ||= 'GET';\r
- $options{ template } = URI->new( $options{ template } );\r
- \r
+package WWW::OpenSearch::Url;
+
+use strict;
+use warnings;
+
+use base qw( Class::Accessor::Fast );
+
+use URI::Template;
+
+__PACKAGE__->mk_accessors( qw( type template method params ns ) );
+
+=head1 NAME
+
+WWW::OpenSearch::Url - Object to represent a target URL
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+=head1 CONSTRUCTOR
+
+=head2 new( [%options] )
+
+=head1 METHODS
+
+=head2 prepare_query( [ \%params ] )
+
+=head1 ACCESSORS
+
+=over 4
+
+=item * type
+
+=item * template
+
+=item * method
+
+=item * params
+
+=item * ns
+
+=back
+
+=head1 AUTHOR
+
+=over 4
+
+=item * Tatsuhiko Miyagawa E<lt>miyagawa@bulknews.netE<gt>
+
+=item * Brian Cassidy E<lt>bricas@cpan.orgE<gt>
+
+=back
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2007 by Tatsuhiko Miyagawa and Brian Cassidy
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+sub new {
+ my( $class, %options ) = @_;
+
+ $options{ method } ||= 'GET';
+ $options{ template } = URI::Template->new( $options{ template } );
+