{"id":6898,"date":"2022-12-20T19:34:17","date_gmt":"2022-12-20T22:34:17","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/uriheuristic-man3\/"},"modified":"2022-12-20T19:34:17","modified_gmt":"2022-12-20T22:34:17","slug":"uriheuristic-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/uriheuristic-man3\/","title":{"rendered":"URI::Heuristic (man3)"},"content":{"rendered":"<h1 align=\"center\">URI::Heuristic<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#ENVIRONMENT\">ENVIRONMENT<\/a><br \/> <a href=\"#COPYRIGHT\">COPYRIGHT<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">URI::Heuristic \u2212 Expand URI using heuristics<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">use URI::Heuristic qw(uf_uristr); <br \/> $u = uf_uristr(&#8220;perl&#8221;); # http:\/\/www.perl.com <br \/> $u = uf_uristr(&#8220;www.sol.no\/sol&#8221;); # http:\/\/www.sol.no\/sol <br \/> $u = uf_uristr(&#8220;aas&#8221;); # http:\/\/www.aas.no <br \/> $u = uf_uristr(&#8220;ftp.funet.fi&#8221;); # ftp:\/\/ftp.funet.fi <br \/> $u = uf_uristr(&#8220;\/etc\/passwd&#8221;); # file:\/etc\/passwd<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This module provides functions that expand strings into real absolute URIs using some built-in heuristics. Strings that already represent absolute URIs (i.e. that start with a &#8220;scheme:&#8221; part) are never modified and are returned unchanged. The main use of these functions is to allow abbreviated URIs similar to what many web browsers allow for URIs typed in by the user.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The following functions are provided: <br \/> uf_uristr($str)<\/p>\n<p style=\"margin-left:17%;\">Tries to make the argument string into a proper absolute <small>URI<\/small> string. The &#8220;uf_&#8221; prefix stands for &#8220;User Friendly&#8221;. Under MacOS, it assumes that any string with a common <small>URL<\/small> scheme (http, ftp, etc.) is a <small>URL<\/small> rather than a local path. So don\u2019t name your volumes after common <small>URL<\/small> schemes and expect <b>uf_uristr()<\/b> to construct valid file: <small>URL<\/small> \u2019s on those volumes for you, because it won\u2019t.<\/p>\n<p style=\"margin-left:11%;\">uf_uri($str)<\/p>\n<p style=\"margin-left:17%;\">Works the same way as <b>uf_uristr()<\/b> but returns a &#8220;URI&#8221; object.<\/p>\n<h2>ENVIRONMENT <a name=\"ENVIRONMENT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">If the hostname portion of a <small>URI<\/small> does not contain any dots, then certain qualified guesses are made. These guesses are governed by the following environment variables:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"11%\">\n<p><small>COUNTRY<\/small><\/p>\n<\/td>\n<td width=\"4%\"><\/td>\n<td width=\"74%\">\n<p>The two-letter country code ( <small>ISO 3166<\/small> ) for your location. If the domain name of your host ends with two letters, then it is taken to be the default country. See also Locale::Country.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><small>HTTP_ACCEPT_LANGUAGE, LC_ALL, LANG<\/small><\/p>\n<p style=\"margin-left:26%;\">If <small>COUNTRY<\/small> is not set, these standard environment variables are examined and country (not language) information possibly found in them is used as the default country.<\/p>\n<p style=\"margin-left:11%;\"><small>URL_GUESS_PATTERN<\/small><\/p>\n<p style=\"margin-left:26%;\">Contains a space-separated list of <small>URL<\/small> patterns to try. The string &#8221; <small>ACME&#8221;<\/small> is for some reason used as a placeholder for the host name in the <small>URL<\/small> provided. Example:<\/p>\n<p style=\"margin-left:26%; margin-top: 1em\">URL_GUESS_PATTERN=&#8221;www.ACME.no www.ACME.se www.ACME.com&#8221; <br \/> export URL_GUESS_PATTERN<\/p>\n<p style=\"margin-left:26%; margin-top: 1em\">Specifying <small>URL_GUESS_PATTERN<\/small> disables any guessing rules based on country. An empty <small>URL_GUESS_PATTERN<\/small> disables any guessing that involves host name lookups.<\/p>\n<h2>COPYRIGHT <a name=\"COPYRIGHT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Copyright 1997\u22121998, Gisle Aas<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This library is free software; you can redistribute it and\/or modify it under the same terms as Perl itself.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  URI::Heuristic \u2212 Expand URI using heuristics <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3007,3258],"class_list":["post-6898","post","type-post","status-publish","format-standard","hentry","category-sin-categoria","tag-man3","tag-uriheuristic"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6898","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=6898"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6898\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6898"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6898"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6898"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}