# $Id: uri.rb,v 1.2 2002/08/07 14:02:44 nobu Exp $

require 'optparse'
unless defined?(URI)
  begin
    require 'URI/uri'		# Akira Yamada version.
  rescue LoadError
    require 'uri/uri'		# Tomoyuki Kosimizu version.
  end
end
if URI.respond_to?(:parse)
  OptionParser.accept(URI) {|s| s ? URI.parse(s) : s}
else
  OptionParser.accept(URI) {|s| s ? URI.create(s) : s}
end
