<html><head><title>Footprintless::Localhost</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
BODY {
background: white;
color: black;
font-family: arial,sans-serif;
margin: 0;
padding: 1ex;
}
A:link, A:visited {
background: transparent;
color: #006699;
}
A[href="#POD_ERRORS"] {
background: transparent;
color: #FF0000;
}
DIV {
border-width: 0;
}
DT {
margin-top: 1em;
margin-left: 1em;
}
.pod { margin-right: 20ex; }
.pod PRE {
background: #eeeeee;
border: 1px solid #888888;
color: black;
padding: 1em;
white-space: pre;
}
.pod H1 {
background: transparent;
color: #006699;
font-size: large;
}
.pod H1 A { text-decoration: none; }
.pod H2 A { text-decoration: none; }
.pod H3 A { text-decoration: none; }
.pod H4 A { text-decoration: none; }
.pod H2 {
background: transparent;
color: #006699;
font-size: medium;
}
.pod H3 {
background: transparent;
color: #006699;
font-size: medium;
font-style: italic;
}
.pod H4 {
background: transparent;
color: #006699;
font-size: medium;
font-weight: normal;
}
.pod IMG {
vertical-align: top;
}
.pod .toc A {
text-decoration: none;
}
.pod .toc LI {
line-height: 1.2em;
list-style-type: none;
}
/*]]>*/-->
</style>
</head>
<body class='pod'>
<!--
generated by Pod::Simple::HTML v3.32,
using Pod::Simple::PullParser v3.32,
under Perl v5.025000 at Wed Aug 22 21:48:30 2018 GMT.
If you want to change this HTML document, you probably shouldn't do that
by changing it directly. Instead, see about changing the calling options
to Pod::Simple::HTML, and/or subclassing Pod::Simple::HTML,
then reconverting this document from the Pod source.
When in doubt, email the author of Pod::Simple::HTML for advice.
See 'perldoc Pod::Simple::HTML' for more info.
-->
<!-- start doc -->
<a name='___top' class='dummyTopAnchor' ></a>
<div class='indexgroup'>
<ul class='indexList indexList1'>
<li class='indexItem indexItem1'><a href='#NAME'>NAME</a>
<li class='indexItem indexItem1'><a href='#VERSION'>VERSION</a>
<li class='indexItem indexItem1'><a href='#DESCRIPTION'>DESCRIPTION</a>
<li class='indexItem indexItem1'><a href='#CONSTRUCTORS'>CONSTRUCTORS</a>
<ul class='indexList indexList2'>
<li class='indexItem indexItem2'><a href='#new(%25options)'>new(%options)</a>
</ul>
<li class='indexItem indexItem1'><a href='#METHODS'>METHODS</a>
<ul class='indexList indexList2'>
<li class='indexItem indexItem2'><a href='#is_alias(%24hostname)'>is_alias($hostname)</a>
<li class='indexItem indexItem2'><a href='#is_loaded(%24source)'>is_loaded($source)</a>
<li class='indexItem indexItem2'><a href='#load_127_subnet()'>load_127_subnet()</a>
<li class='indexItem indexItem2'><a href='#load_all()'>load_all()</a>
<li class='indexItem indexItem2'><a href='#load_etc_hosts()'>load_etc_hosts()</a>
<li class='indexItem indexItem2'><a href='#load_hostfqdn()'>load_hostfqdn()</a>
<li class='indexItem indexItem2'><a href='#load_hostname()'>load_hostname()</a>
</ul>
<li class='indexItem indexItem1'><a href='#AUTHOR'>AUTHOR</a>
<li class='indexItem indexItem1'><a href='#COPYRIGHT_AND_LICENSE'>COPYRIGHT AND LICENSE</a>
<li class='indexItem indexItem1'><a href='#SEE_ALSO'>SEE ALSO</a>
</ul>
</div>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="NAME"
>NAME</a></h1>
<p>Footprintless::Localhost - A localhost alias resolver</p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="VERSION"
>VERSION</a></h1>
<p>version 1.29</p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="DESCRIPTION"
>DESCRIPTION</a></h1>
<p>Provides a <i>fairly</i> thorough attempt to determine if a supplied hostname is an alias for localhost (resolves to the same physical machine).
This can be useful in determining if local commands can be used in place of remote commands.
This is primarily used by the <a href="http://search.cpan.org/perldoc?Footprintless%3A%3ACommandOptionsFactory" class="podlinkpod"
>Footprintless::CommandOptionsFactory</a> to create appropriate command options for configured entities.</p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="CONSTRUCTORS"
>CONSTRUCTORS</a></h1>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="new(%options)"
>new(%options)</a></h2>
<p>Constructs a new <code>Footprintless::Localhost</code> preconfigured with the default aliases (<code>localhost</code>,
<code>127.0.0.1</code>).
The available options are:</p>
<dl>
<dt><a name="aliases"
>aliases</a></dt>
<dd>
<p>An initial set of preconfigured aliases that should resolve to localhost.</p>
<dt><a name="empty"
>empty</a></dt>
<dd>
<p>Sets the value that will be returned if <code>is_alias</code> is called with a <i>falsey</i> value.</p>
<dt><a name="etc_hosts_file"
>etc_hosts_file</a></dt>
<dd>
<p>Location of hosts file,
defaults to <code>/etc/hosts</code>.</p>
<dt><a name="none"
>none</a></dt>
<dd>
<p>Stops the constructor from initializing the default aliases: <code>localhost</code>,
<code>127.0.0.1</code>.</p>
</dd>
</dl>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="METHODS"
>METHODS</a></h1>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="is_alias($hostname)"
>is_alias($hostname)</a></h2>
<p>Returns a <i>truthy</i> value if <code>$hostname</code> is an alias for localhost.</p>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="is_loaded($source)"
>is_loaded($source)</a></h2>
<p>Returns a <i>truthy</i> value if <code>$source</code> has already been loaded.
Each source is loaded using the <code>load_$source</code> method.</p>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="load_127_subnet()"
>load_127_subnet()</a></h2>
<p>Same effect as loading all <code>127.x.x.x</code> addresses,
but done with regex during call to <a href="#is_alias(%24hostname)" class="podlinkpod"
>is_alias</a>.</p>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="load_all()"
>load_all()</a></h2>
<p>Loads aliases from all sources.</p>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="load_etc_hosts()"
>load_etc_hosts()</a></h2>
<p>Loads aliases from the <code>/etc/hosts</code> file.</p>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="load_hostfqdn()"
>load_hostfqdn()</a></h2>
<p>Loads aliases from the <code>hostfqdn</code> command.</p>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="load_hostname()"
>load_hostname()</a></h2>
<p>Loads aliases from the <code>hostname</code> command.</p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="AUTHOR"
>AUTHOR</a></h1>
<p>Lucas Theisen <lucastheisen@pastdev.com></p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="COPYRIGHT_AND_LICENSE"
>COPYRIGHT AND LICENSE</a></h1>
<p>This software is copyright (c) 2016 by Lucas Theisen.</p>
<p>This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.</p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="SEE_ALSO"
>SEE ALSO</a></h1>
<p>Please see those modules/websites for more information related to this module.</p>
<ul>
<li><a href="http://search.cpan.org/perldoc?Footprintless" class="podlinkpod"
>Footprintless</a></li>
<li><a href="http://search.cpan.org/perldoc?Footprintless" class="podlinkpod"
>Footprintless</a></li>
<li><a href="http://search.cpan.org/perldoc?Footprintless%3A%3ACommandOptionsFactory" class="podlinkpod"
>Footprintless::CommandOptionsFactory</a></li>
</ul>
<!-- end doc -->
</body></html>