The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>HTML::Mason::ComponentSource - represents information about an component</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:autarch@houseabsolute.urth.org" />
</head>

<body style="background-color: white">


<!-- INDEX BEGIN -->
<div name="index">
<p><A NAME="__index__"></a></p>

<ul>

	<li><A HREF="#name">NAME</a></li>
	<li><A HREF="#synopsis">SYNOPSIS</a></li>
	<li><A HREF="#description">DESCRIPTION</a></li>
	<li><A HREF="#methods">METHODS</a></li>
</ul>

<hr name="index" />
</div>
<!-- INDEX END -->

<p>
</p>
<h1><A NAME="name">NAME</a></h1>
<p>HTML::Mason::ComponentSource - represents information about an component</p>
<p>
</p>
<hr />
<h1><A NAME="synopsis">SYNOPSIS</a></h1>
<pre>
    my $info = $resolver-&gt;get_info($comp_path);</pre>
<p>
</p>
<hr />
<h1><A NAME="description">DESCRIPTION</a></h1>
<p>Mason uses the ComponentSource class to store information about a
source component, one that has yet to be compiled.</p>
<p>
</p>
<hr />
<h1><A NAME="methods">METHODS</a></h1>
<dl>
<dt><strong><A NAME="new" class="item">new</a></strong></dt>

<dd>
<p>This method takes the following arguments:</p>
<ul>
<li><strong><A NAME="comp_path" class="item">comp_path</a></strong>

<p>The component's component path.</p>
</li>
<li><strong><A NAME="last_modified" class="item">last_modified</a></strong>

<p>This is the last modificatoin time for the component, in Unix time
(seconds since the epoch).</p>
</li>
<li><strong><A NAME="comp_id" class="item">comp_id</a></strong>

<p>This is a unique id for the component used to distinguish two
components with the same name in different component roots.</p>
<p>If your resolver does not support multiple component roots, this can
simply be the same as the &quot;comp_path&quot; key or it can be any other id
you wish.</p>
<p>This value will be used when constructing filesystem paths so it needs
to be something that works on different filesystems.  If it contains
forward slashes, these will be converted to the appropriate
filesystem-specific path separator.</p>
<p>In fact, we encourage you to make sure that your component ids have
some forward slashes in them or also <strong>all</strong> of your generated object
files will end up in a single directory, which could affect
performance.</p>
</li>
<li><strong><A NAME="comp_class" class="item">comp_class</a></strong>

<p>The component class into which this particular component should be
blessed when it is created.  This must be a subclass of
<code>HTML::Mason::Component</code>, which is the default.</p>
</li>
<li><strong><A NAME="friendly_name" class="item">friendly_name</a></strong>

<p>This is used when displaying error messages related to the component,
like parsing errors.  This should be something that will help whoever
sees the message identify the component.  For example, for component
stored on the filesystem, this should be the absolute path to the
component.</p>
</li>
<li><strong><A NAME="source_callback" class="item">source_callback</a></strong>

<p>This is a subroutine reference which, when called, returns the
component source.</p>
<p>The reasoning behind using this parameter is that it helps avoid a
profusion of tiny little <code>HTML::Mason::ComponentSource</code> subclasses that
don't do very much.</p>
</li>
<li><strong><A NAME="extra" class="item">extra</a></strong>

<p>This optional parameter should be a hash reference.  It is used to
pass information from the resolver to the component class.</p>
<p>This is needed since a
<a HREF="Resolver.html"><code>HTML::Mason::Resolver</code></a> subclass and a
<a HREF="Component.html"><code>HTML::Mason::Component</code></a> subclass can be
rather tightly coupled, but they must communicate with each through
the interpreter (this may change in the future).</p>
</li>
</ul>
</dd>
<dt><strong>comp_path</strong></dt>

<dt><strong>last_modified</strong></dt>

<dt><strong>comp_id</strong></dt>

<dt><strong>comp_class</strong></dt>

<dt><strong>friendly_name</strong></dt>

<dt><strong>extra</strong></dt>

<dd>
<p>These are all simple accessors that return the value given to the
constructor.</p>
</dd>
<dt><strong><A NAME="comp_source" class="item">comp_source</a></strong></dt>

<dd>
<p>Returns the source of the component.</p>
</dd>
<dt><strong><A NAME="object_code" class="item">object_code ( compiler =&gt; $compiler )</a></strong></dt>

<dd>
<p>Given a compiler, this method returns the object code for the
component.</p>
</dd>
</dl>
<p><a HREF="Mason.html">HTML::Mason</a>,
<a HREF="Admin.html">HTML::Mason::Admin</a>,
<a HREF="Component.html">HTML::Mason::Component</a></p>

</body>

</html>