<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
This file was generated by Devel::NYTProf version 3.11
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en-us" />
<title>Profile of /usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/Class/MOP/Mixin/HasAttributes.pm</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="js/jquery-min.js"></script>
<script type="text/javascript" src="js/jquery-tablesorter-min.js"></script>
<link rel="stylesheet" type="text/css" href="js/style-tablesorter.css" />
<script type="text/javascript">
// when a column is first clicked on to sort it, use descending order
// XXX doesn't seem to work (and not just because the tablesorter formatSortingOrder() is broken)
$.tablesorter.defaults.sortInitialOrder = "desc";
// add parser through the tablesorter addParser method
$.tablesorter.addParser({
id: 'fmt_time', // name of this parser
is: function(s) {
return false; // return false so this parser is not auto detected
},
format: function(orig) { // format data for normalization
// console.log(orig);
val = orig.replace(/ns/,'');
if (val != orig) { return val / (1000*1000*1000); }
val = orig.replace(/µs/,''); /* XXX use µ ? */
if (val != orig) { return val / (1000*1000); }
var val = orig.replace(/ms/,'');
if (val != orig) { return val / (1000); }
var val = orig.replace(/s/,'');
if (val != orig) { return val; }
if (orig == '0') { return orig; }
console.log('no match for fmt_time of '.concat(orig));
return orig;
},
type: 'numeric' // set type, either numeric or text
});
</script>
</head>
<body >
<div class="header" style="position: relative; overflow-x: hidden; overflow-y: hidden; z-index: 0; ">
<div class="header_back">
<a href="index.html">← Index</a>
</div>
<div class="headerForeground" style="float: left">
<span class="siteTitle">NYTProf Performance Profile</span>
<span class="siteSubtitle">  <span>« <span class="mode_btn mode_btn_selected">block view</span> • <span class="mode_btn"><a href="Class-MOP-Mixin-HasAttributes-pm-line.html">line view</a></span> • <span class="mode_btn"><a href="Class-MOP-Mixin-HasAttributes-pm-sub.html">sub view</a></span> »</span><br />
For 01.HTTP.t
</span>
</div>
<div class="headerForeground" style="float: right; text-align: right">
<span class="siteTitle"> </span>
<span class="siteSubtitle">Run on Tue May 4 15:25:55 2010<br />Reported on Tue May 4 15:26:15 2010</span>
</div>
<div style="position: absolute; left: 0px; top: 0%; width: 100%; height: 101%; z-index: -1; background-color: rgb(17, 136, 255); "></div>
<div style="position: absolute; left: 0px; top: 2%; width: 100%; height: 99%; z-index: -1; background-color: rgb(16, 134, 253); "></div>
<div style="position: absolute; left: 0px; top: 4%; width: 100%; height: 97%; z-index: -1; background-color: rgb(16, 133, 252); "></div>
<div style="position: absolute; left: 0px; top: 6%; width: 100%; height: 95%; z-index: -1; background-color: rgb(15, 131, 250); "></div>
<div style="position: absolute; left: 0px; top: 8%; width: 100%; height: 93%; z-index: -1; background-color: rgb(15, 130, 249); "></div>
<div style="position: absolute; left: 0px; top: 10%; width: 100%; height: 91%; z-index: -1; background-color: rgb(15, 129, 248); "></div>
<div style="position: absolute; left: 0px; top: 12%; width: 100%; height: 89%; z-index: -1; background-color: rgb(14, 127, 246); "></div>
<div style="position: absolute; left: 0px; top: 14%; width: 100%; height: 87%; z-index: -1; background-color: rgb(14, 126, 245); "></div>
<div style="position: absolute; left: 0px; top: 16%; width: 100%; height: 85%; z-index: -1; background-color: rgb(14, 125, 244); "></div>
<div style="position: absolute; left: 0px; top: 18%; width: 100%; height: 83%; z-index: -1; background-color: rgb(13, 123, 242); "></div>
<div style="position: absolute; left: 0px; top: 20%; width: 100%; height: 81%; z-index: -1; background-color: rgb(13, 122, 241); "></div>
<div style="position: absolute; left: 0px; top: 22%; width: 100%; height: 79%; z-index: -1; background-color: rgb(13, 121, 240); "></div>
<div style="position: absolute; left: 0px; top: 24%; width: 100%; height: 77%; z-index: -1; background-color: rgb(12, 119, 238); "></div>
<div style="position: absolute; left: 0px; top: 26%; width: 100%; height: 75%; z-index: -1; background-color: rgb(12, 118, 237); "></div>
<div style="position: absolute; left: 0px; top: 28%; width: 100%; height: 73%; z-index: -1; background-color: rgb(12, 116, 235); "></div>
<div style="position: absolute; left: 0px; top: 30%; width: 100%; height: 71%; z-index: -1; background-color: rgb(11, 115, 234); "></div>
<div style="position: absolute; left: 0px; top: 32%; width: 100%; height: 69%; z-index: -1; background-color: rgb(11, 114, 233); "></div>
<div style="position: absolute; left: 0px; top: 34%; width: 100%; height: 67%; z-index: -1; background-color: rgb(11, 112, 231); "></div>
<div style="position: absolute; left: 0px; top: 36%; width: 100%; height: 65%; z-index: -1; background-color: rgb(10, 111, 230); "></div>
<div style="position: absolute; left: 0px; top: 38%; width: 100%; height: 63%; z-index: -1; background-color: rgb(10, 110, 229); "></div>
<div style="position: absolute; left: 0px; top: 40%; width: 100%; height: 61%; z-index: -1; background-color: rgb(10, 108, 227); "></div>
<div style="position: absolute; left: 0px; top: 42%; width: 100%; height: 59%; z-index: -1; background-color: rgb(9, 107, 226); "></div>
<div style="position: absolute; left: 0px; top: 44%; width: 100%; height: 57%; z-index: -1; background-color: rgb(9, 106, 225); "></div>
<div style="position: absolute; left: 0px; top: 46%; width: 100%; height: 55%; z-index: -1; background-color: rgb(9, 104, 223); "></div>
<div style="position: absolute; left: 0px; top: 48%; width: 100%; height: 53%; z-index: -1; background-color: rgb(8, 103, 222); "></div>
<div style="position: absolute; left: 0px; top: 50%; width: 100%; height: 51%; z-index: -1; background-color: rgb(8, 102, 221); "></div>
<div style="position: absolute; left: 0px; top: 52%; width: 100%; height: 49%; z-index: -1; background-color: rgb(8, 100, 219); "></div>
<div style="position: absolute; left: 0px; top: 54%; width: 100%; height: 47%; z-index: -1; background-color: rgb(7, 99, 218); "></div>
<div style="position: absolute; left: 0px; top: 56%; width: 100%; height: 45%; z-index: -1; background-color: rgb(7, 97, 216); "></div>
<div style="position: absolute; left: 0px; top: 58%; width: 100%; height: 43%; z-index: -1; background-color: rgb(7, 96, 215); "></div>
<div style="position: absolute; left: 0px; top: 60%; width: 100%; height: 41%; z-index: -1; background-color: rgb(6, 95, 214); "></div>
<div style="position: absolute; left: 0px; top: 62%; width: 100%; height: 39%; z-index: -1; background-color: rgb(6, 93, 212); "></div>
<div style="position: absolute; left: 0px; top: 64%; width: 100%; height: 37%; z-index: -1; background-color: rgb(6, 92, 211); "></div>
<div style="position: absolute; left: 0px; top: 66%; width: 100%; height: 35%; z-index: -1; background-color: rgb(5, 91, 210); "></div>
<div style="position: absolute; left: 0px; top: 68%; width: 100%; height: 33%; z-index: -1; background-color: rgb(5, 89, 208); "></div>
<div style="position: absolute; left: 0px; top: 70%; width: 100%; height: 31%; z-index: -1; background-color: rgb(5, 88, 207); "></div>
<div style="position: absolute; left: 0px; top: 72%; width: 100%; height: 29%; z-index: -1; background-color: rgb(4, 87, 206); "></div>
<div style="position: absolute; left: 0px; top: 74%; width: 100%; height: 27%; z-index: -1; background-color: rgb(4, 85, 204); "></div>
<div style="position: absolute; left: 0px; top: 76%; width: 100%; height: 25%; z-index: -1; background-color: rgb(4, 84, 203); "></div>
<div style="position: absolute; left: 0px; top: 78%; width: 100%; height: 23%; z-index: -1; background-color: rgb(3, 82, 201); "></div>
<div style="position: absolute; left: 0px; top: 80%; width: 100%; height: 21%; z-index: -1; background-color: rgb(3, 81, 200); "></div>
<div style="position: absolute; left: 0px; top: 82%; width: 100%; height: 19%; z-index: -1; background-color: rgb(3, 80, 199); "></div>
<div style="position: absolute; left: 0px; top: 84%; width: 100%; height: 17%; z-index: -1; background-color: rgb(2, 78, 197); "></div>
<div style="position: absolute; left: 0px; top: 86%; width: 100%; height: 15%; z-index: -1; background-color: rgb(2, 77, 196); "></div>
<div style="position: absolute; left: 0px; top: 88%; width: 100%; height: 13%; z-index: -1; background-color: rgb(2, 76, 195); "></div>
<div style="position: absolute; left: 0px; top: 90%; width: 100%; height: 11%; z-index: -1; background-color: rgb(1, 74, 193); "></div>
<div style="position: absolute; left: 0px; top: 92%; width: 100%; height: 9%; z-index: -1; background-color: rgb(1, 73, 192); "></div>
<div style="position: absolute; left: 0px; top: 94%; width: 100%; height: 7%; z-index: -1; background-color: rgb(1, 72, 191); "></div>
<div style="position: absolute; left: 0px; top: 96%; width: 100%; height: 5%; z-index: -1; background-color: rgb(0, 70, 189); "></div>
<div style="position: absolute; left: 0px; top: 98%; width: 100%; height: 3%; z-index: -1; background-color: rgb(0, 69, 188); "></div>
<div style="position: absolute; left: 0px; top: 100%; width: 100%; height: 1%; z-index: -1; background-color: rgb(0, 68, 187); "></div>
</div>
<div class="body_content">
<br />
<table>
<tr>
<td class="h" align="right">File</td>
<td align="left">/usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/Class/MOP/Mixin/HasAttributes.pm</td>
</tr>
<tr>
<td class="h" align="right">Statements Executed</td>
<td align="left">3191</td>
</tr>
<tr>
<td class="h" align="right">Statement Execution Time</td>
<td align="left">6.60ms</td>
</tr>
</table>
<table id="subs_table" border="1" cellpadding="0" class="tablesorter">
<caption>Subroutines — ordered by exclusive time</caption>
<thead>
<tr>
<th>Calls</th>
<th><span title="Number of Places sub is called from">P</span></th>
<th><span title="Number of Files sub is called from">F</span></th>
<th>Exclusive<br />Time</th>
<th>Inclusive<br />Time</th>
<th>Subroutine</th>
</tr>
</thead>
<tbody>
<tr><td class="c0">119</td><td class="c0">113</td><td class="c0">23</td><td class="c0"><span title="0.3%">3.27ms</span></td><td class="c0"><span title="3.3%">36.4ms</span></td><td class="sub_name"><span style="display: none;">Class::MOP::Mixin::HasAttributes::::add_attribute</span>Class::MOP::Mixin::HasAttributes::<a href="Class-MOP-Mixin-HasAttributes-pm-block.html#18">add_attribute</a></span></td></tr>
<tr><td class="c0">862</td><td class="c0">6</td><td class="c1">2</td><td class="c0"><span title="0.1%">838µs</span></td><td class="c0"><span title="0.1%">838µs</span></td><td class="sub_name"><span style="display: none;">Class::MOP::Mixin::HasAttributes::::_attribute_map</span>Class::MOP::Mixin::HasAttributes::<a href="Class-MOP-Mixin-HasAttributes-pm-block.html#15">_attribute_map</a></span></td></tr>
<tr><td class="c0">170</td><td class="c1">2</td><td class="c1">2</td><td class="c0"><span title="0.1%">659µs</span></td><td class="c0"><span title="0.1%">848µs</span></td><td class="sub_name"><span style="display: none;">Class::MOP::Mixin::HasAttributes::::has_attribute</span>Class::MOP::Mixin::HasAttributes::<a href="Class-MOP-Mixin-HasAttributes-pm-block.html#51">has_attribute</a></span></td></tr>
<tr><td class="c0">119</td><td class="c1">2</td><td class="c3">1</td><td class="c0"><span title="0.0%">477µs</span></td><td class="c0"><span title="0.1%">576µs</span></td><td class="sub_name"><span style="display: none;">Class::MOP::Mixin::HasAttributes::::get_attribute</span>Class::MOP::Mixin::HasAttributes::<a href="Class-MOP-Mixin-HasAttributes-pm-block.html#60">get_attribute</a></span></td></tr>
<tr><td class="c3">32</td><td class="c3">1</td><td class="c3">1</td><td class="c2"><span title="0.0%">150µs</span></td><td class="c1"><span title="0.0%">186µs</span></td><td class="sub_name"><span style="display: none;">Class::MOP::Mixin::HasAttributes::::get_attribute_list</span>Class::MOP::Mixin::HasAttributes::<a href="Class-MOP-Mixin-HasAttributes-pm-block.html#83">get_attribute_list</a></span></td></tr>
<tr><td class="c1">70</td><td class="c1">2</td><td class="c1">2</td><td class="c3"><span title="0.0%">98µs</span></td><td class="c3"><span title="0.0%">98µs</span></td><td class="sub_name"><span style="display: none;">Class::MOP::Mixin::HasAttributes::::attribute_metaclass</span>Class::MOP::Mixin::HasAttributes::<a href="Class-MOP-Mixin-HasAttributes-pm-block.html#16">attribute_metaclass</a></span></td></tr>
<tr><td class="c3">1</td><td class="c3">1</td><td class="c3">1</td><td class="c3"><span title="0.0%">14µs</span></td><td class="c3"><span title="0.0%">18µs</span></td><td class="sub_name"><span style="display: none;">Class::MOP::Mixin::HasAttributes::::BEGIN@3</span>Class::MOP::Mixin::HasAttributes::<a href="Class-MOP-Mixin-HasAttributes-pm-block.html#3">BEGIN@3</a></span></td></tr>
<tr><td class="c3">1</td><td class="c3">1</td><td class="c3">1</td><td class="c3"><span title="0.0%">8µs</span></td><td class="c3"><span title="0.0%">39µs</span></td><td class="sub_name"><span style="display: none;">Class::MOP::Mixin::HasAttributes::::BEGIN@10</span>Class::MOP::Mixin::HasAttributes::<a href="Class-MOP-Mixin-HasAttributes-pm-block.html#10">BEGIN@10</a></span></td></tr>
<tr><td class="c3">1</td><td class="c3">1</td><td class="c3">1</td><td class="c3"><span title="0.0%">8µs</span></td><td class="c3"><span title="0.0%">18µs</span></td><td class="sub_name"><span style="display: none;">Class::MOP::Mixin::HasAttributes::::BEGIN@4</span>Class::MOP::Mixin::HasAttributes::<a href="Class-MOP-Mixin-HasAttributes-pm-block.html#4">BEGIN@4</a></span></td></tr>
<tr><td class="c3">1</td><td class="c3">1</td><td class="c3">1</td><td class="c3"><span title="0.0%">7µs</span></td><td class="c3"><span title="0.0%">30µs</span></td><td class="sub_name"><span style="display: none;">Class::MOP::Mixin::HasAttributes::::BEGIN@11</span>Class::MOP::Mixin::HasAttributes::<a href="Class-MOP-Mixin-HasAttributes-pm-block.html#11">BEGIN@11</a></span></td></tr>
<tr><td class="c3">1</td><td class="c3">1</td><td class="c3">1</td><td class="c3"><span title="0.0%">6µs</span></td><td class="c3"><span title="0.0%">47µs</span></td><td class="sub_name"><span style="display: none;">Class::MOP::Mixin::HasAttributes::::BEGIN@13</span>Class::MOP::Mixin::HasAttributes::<a href="Class-MOP-Mixin-HasAttributes-pm-block.html#13">BEGIN@13</a></span></td></tr>
<tr><td class="c3">0</td><td class="c3">0</td><td class="c3">0</td><td class="c3"><span title="0.0%">0s</span></td><td class="c3"><span title="0.0%">0s</span></td><td class="sub_name"><span style="display: none;">Class::MOP::Mixin::HasAttributes::::remove_attribute</span>Class::MOP::Mixin::HasAttributes::<a href="Class-MOP-Mixin-HasAttributes-pm-block.html#69">remove_attribute</a></span></td></tr>
</tbody>
</table>
Call graph for these subroutines as a <a href="http://en.wikipedia.org/wiki/Graphviz">Graphviz</a> <a href="usr-local-lib-perl5-site_perl-5-10-1-darwin-2level-Class-MOP-Mixin-HasAttributes-pm.dot">dot language file</a>.
<table border="1" cellpadding="0">
<thead>
<tr><th>Line</th>
<th><span title="Number of statements executed">State<br />ments</span></th>
<th><span title="Time spend executing statements on the line,
excluding time spent executing statements in any called subroutines">Time<br />on line</span></th>
<th><span title="Number of subroutines calls">Calls</span></th>
<th><span title="Time spent in subroutines called">Time<br />in subs</span></th>
<th class="left_indent_header">Code</th>
</tr>
</thead>
<tbody>
<tr><td class="h"><a name="1"></a>1</td><td></td><td></td><td></td><td></td><td class="s">package Class::MOP::Mixin::HasAttributes;</td></tr>
<tr><td class="h"><a name="2"></a>2</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="3"></a>3</td><td class="c3">3</td><td class="c3"><span title="Avg 8µs">23µs</span></td><td class="c3">2</td><td class="c3">21µs</td><td class="s"><div class="calls"><div class="calls_in"># spent 18µs (14+3) within Class::MOP::Mixin::HasAttributes::BEGIN@3 which was called
# once (14µs+3µs) by Class::MOP::BEGIN@16 at <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#3">line 3</a></div></div>use strict;<div class="calls"><div class="calls_out"># spent 18µs making 1 call to <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#3">Class::MOP::Mixin::HasAttributes::BEGIN@3</a>
# spent 3µs making 1 call to <a href="strict-pm-block.html#34">strict::import</a></div></div></td></tr>
<tr><td class="h"><a name="4"></a>4</td><td class="c3">3</td><td class="c3"><span title="Avg 14µs">42µs</span></td><td class="c3">2</td><td class="c3">29µs</td><td class="s"><div class="calls"><div class="calls_in"># spent 18µs (8+10) within Class::MOP::Mixin::HasAttributes::BEGIN@4 which was called
# once (8µs+10µs) by Class::MOP::BEGIN@16 at <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#4">line 4</a></div></div>use warnings;<div class="calls"><div class="calls_out"># spent 18µs making 1 call to <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#4">Class::MOP::Mixin::HasAttributes::BEGIN@4</a>
# spent 11µs making 1 call to <a href="warnings-pm-block.html#338">warnings::import</a></div></div></td></tr>
<tr><td class="h"><a name="5"></a>5</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="6"></a>6</td><td class="c3">1</td><td class="c3"><span title="Avg 1µs">1µs</span></td><td></td><td></td><td class="s">our $VERSION = '0.98';</td></tr>
<tr><td class="h"><a name="7"></a>7</td><td class="c3">1</td><td class="c3"><span title="Avg 21µs">21µs</span></td><td></td><td></td><td class="s">$VERSION = eval $VERSION;</td></tr>
<tr><td class="h"><a name="8"></a>8</td><td class="c3">1</td><td class="c3"><span title="Avg 400ns">400ns</span></td><td></td><td></td><td class="s">our $AUTHORITY = 'cpan:STEVAN';</td></tr>
<tr><td class="h"><a name="9"></a>9</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="10"></a>10</td><td class="c3">3</td><td class="c3"><span title="Avg 8µs">24µs</span></td><td class="c3">2</td><td class="c2">70µs</td><td class="s"><div class="calls"><div class="calls_in"># spent 39µs (8+31) within Class::MOP::Mixin::HasAttributes::BEGIN@10 which was called
# once (8µs+31µs) by Class::MOP::BEGIN@16 at <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#10">line 10</a></div></div>use Carp 'confess';<div class="calls"><div class="calls_out"># spent 39µs making 1 call to <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#10">Class::MOP::Mixin::HasAttributes::BEGIN@10</a>
# spent 31µs making 1 call to <a href="Exporter-pm-block.html#31">Exporter::import</a></div></div></td></tr>
<tr><td class="h"><a name="11"></a>11</td><td class="c3">3</td><td class="c3"><span title="Avg 8µs">24µs</span></td><td class="c3">2</td><td class="c3">53µs</td><td class="s"><div class="calls"><div class="calls_in"># spent 30µs (7+23) within Class::MOP::Mixin::HasAttributes::BEGIN@11 which was called
# once (7µs+23µs) by Class::MOP::BEGIN@16 at <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#11">line 11</a></div></div>use Scalar::Util 'blessed';<div class="calls"><div class="calls_out"># spent 30µs making 1 call to <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#11">Class::MOP::Mixin::HasAttributes::BEGIN@11</a>
# spent 23µs making 1 call to <a href="Exporter-pm-block.html#31">Exporter::import</a></div></div></td></tr>
<tr><td class="h"><a name="12"></a>12</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="13"></a>13</td><td class="c3">3</td><td class="c0"><span title="Avg 222µs">667µs</span></td><td class="c3">2</td><td class="c1">88µs</td><td class="s"><div class="calls"><div class="calls_in"># spent 47µs (6+41) within Class::MOP::Mixin::HasAttributes::BEGIN@13 which was called
# once (6µs+41µs) by Class::MOP::BEGIN@16 at <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#13">line 13</a></div></div>use base 'Class::MOP::Mixin';<div class="calls"><div class="calls_out"># spent 47µs making 1 call to <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#13">Class::MOP::Mixin::HasAttributes::BEGIN@13</a>
# spent 41µs making 1 call to <a href="base-pm-block.html#64">base::import</a></div></div></td></tr>
<tr><td class="h"><a name="14"></a>14</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="15"></a>15</td><td class="c0">862</td><td class="c0"><span title="Avg 2µs">1.56ms</span></td><td></td><td></td><td class="s"><div class="calls"><div class="calls_in"># spent 838µs within Class::MOP::Mixin::HasAttributes::_attribute_map which was called 862 times, avg 972ns/call:
# 303 times (330µs+0s) by Class::MOP::Class::get_all_attributes at <a href="Class-MOP-Class-pm-block.html#551">line 551 of Class/MOP/Class.pm</a>, avg 1µs/call
# 170 times (189µs+0s) by Class::MOP::Mixin::HasAttributes::has_attribute at <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#57">line 57</a>, avg 1µs/call
# 119 times (99µs+0s) by Class::MOP::Mixin::HasAttributes::get_attribute at <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#66">line 66</a>, avg 832ns/call
# 119 times (93µs+0s) by Class::MOP::Mixin::HasAttributes::add_attribute at <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#35">line 35</a>, avg 781ns/call
# 119 times (90µs+0s) by Class::MOP::Mixin::HasAttributes::add_attribute at <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#38">line 38</a>, avg 753ns/call
# 32 times (36µs+0s) by Class::MOP::Mixin::HasAttributes::get_attribute_list at <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#85">line 85</a>, avg 1µs/call</div></div>sub _attribute_map { $_[0]->{'attributes'} }</td></tr>
<tr><td class="h"><a name="16"></a>16</td><td class="c0">70</td><td class="c0"><span title="Avg 2µs">160µs</span></td><td></td><td></td><td class="s"><div class="calls"><div class="calls_in"># spent 98µs within Class::MOP::Mixin::HasAttributes::attribute_metaclass which was called 70 times, avg 1µs/call:
# 66 times (90µs+0s) by Class::MOP::Mixin::HasAttributes::add_attribute at <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#21">line 21</a>, avg 1µs/call
# 4 times (8µs+0s) by Moose::Meta::Class::_process_new_attribute at <a href="Moose-Meta-Class-pm-block.html#607">line 607 of Moose/Meta/Class.pm</a>, avg 2µs/call</div></div>sub attribute_metaclass { $_[0]->{'attribute_metaclass'} }</td></tr>
<tr><td class="h"><a name="17"></a>17</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="18"></a>18</td><td></td><td></td><td></td><td></td><td class="s"><div class="calls"><div class="calls_in"># spent 36.4ms (3.27+33.1) within Class::MOP::Mixin::HasAttributes::add_attribute which was called 119 times, avg 306µs/call:
# 4 times (149µs+3.30ms) by Moose::Meta::Class::add_attribute at <a href="Moose-Meta-Class-pm-block.html#300">line 300 of Moose/Meta/Class.pm</a>, avg 862µs/call
# 3 times (88µs+724µs) by Moose::BEGIN@26 at <a href="Moose-Meta-Role-pm-block.html#257">line 257 of Moose/Meta/Role.pm</a>, avg 271µs/call
# 2 times (93µs+798µs) by Moose::BEGIN@26 at <a href="Moose-Meta-Role-pm-block.html#84">line 84 of Moose/Meta/Role.pm</a>, avg 445µs/call
# once (29µs+1.53ms) by Moose::BEGIN@20 at <a href="Moose-Meta-TypeCoercion-pm-block.html#20">line 20 of Moose/Meta/TypeCoercion.pm</a>
# once (53µs+544µs) by Moose::BEGIN@18 at <a href="Moose-Meta-Class-pm-block.html#30">line 30 of Moose/Meta/Class.pm</a>
# once (62µs+530µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#177">line 177 of Class/MOP.pm</a>
# once (29µs+528µs) by Moose::Util::TypeConstraints::BEGIN@38 at <a href="Moose-Meta-TypeConstraint-Registry-pm-block.html#16">line 16 of Moose/Meta/TypeConstraint/Registry.pm</a>
# once (27µs+500µs) by base::import at <a href="Moose-Meta-Mixin-AttributeCore-pm-block.html#35">line 35 of Moose/Meta/Mixin/AttributeCore.pm</a>
# once (29µs+441µs) by Moose::Meta::TypeCoercion::BEGIN@8 at <a href="Moose-Meta-Attribute-pm-block.html#22">line 22 of Moose/Meta/Attribute.pm</a>
# once (34µs+387µs) by Moose::BEGIN@19 at <a href="Moose-Meta-TypeConstraint-pm-block.html#20">line 20 of Moose/Meta/TypeConstraint.pm</a>
# once (29µs+387µs) by Moose::Meta::Role::BEGIN@19 at <a href="Moose-Meta-Role-Method-Required-pm-block.html#20">line 20 of Moose/Meta/Role/Method/Required.pm</a>
# once (27µs+385µs) by Moose::BEGIN@19 at <a href="Moose-Meta-TypeConstraint-pm-block.html#41">line 41 of Moose/Meta/TypeConstraint.pm</a>
# once (28µs+383µs) by Moose::BEGIN@19 at <a href="Moose-Meta-TypeConstraint-pm-block.html#31">line 31 of Moose/Meta/TypeConstraint.pm</a>
# once (28µs+370µs) by Moose::Util::TypeConstraints::BEGIN@30 at <a href="Moose-Meta-TypeConstraint-Parameterized-pm-block.html#17">line 17 of Moose/Meta/TypeConstraint/Parameterized.pm</a>
# once (28µs+369µs) by Moose::Meta::TypeConstraint::Parameterized::BEGIN@9 at <a href="Moose-Meta-TypeConstraint-Parameterizable-pm-block.html#15">line 15 of Moose/Meta/TypeConstraint/Parameterizable.pm</a>
# once (26µs+370µs) by Moose::BEGIN@19 at <a href="Moose-Meta-TypeConstraint-pm-block.html#32">line 32 of Moose/Meta/TypeConstraint.pm</a>
# once (28µs+366µs) by base::import at <a href="Moose-Meta-Mixin-AttributeCore-pm-block.html#23">line 23 of Moose/Meta/Mixin/AttributeCore.pm</a>
# once (27µs+365µs) by Moose::BEGIN@19 at <a href="Moose-Meta-TypeConstraint-pm-block.html#21">line 21 of Moose/Meta/TypeConstraint.pm</a>
# once (28µs+363µs) by base::import at <a href="Moose-Meta-Mixin-AttributeCore-pm-block.html#42">line 42 of Moose/Meta/Mixin/AttributeCore.pm</a>
# once (27µs+351µs) by base::import at <a href="Moose-Meta-Mixin-AttributeCore-pm-block.html#29">line 29 of Moose/Meta/Mixin/AttributeCore.pm</a>
# once (26µs+351µs) by Moose::BEGIN@19 at <a href="Moose-Meta-TypeConstraint-pm-block.html#36">line 36 of Moose/Meta/TypeConstraint.pm</a>
# once (27µs+351µs) by Moose::BEGIN@19 at <a href="Moose-Meta-TypeConstraint-pm-block.html#54">line 54 of Moose/Meta/TypeConstraint.pm</a>
# once (44µs+303µs) by base::import at <a href="Moose-Meta-Mixin-AttributeCore-pm-block.html#11">line 11 of Moose/Meta/Mixin/AttributeCore.pm</a>
# once (28µs+317µs) by Moose::BEGIN@26 at <a href="Moose-Meta-Role-pm-block.html#136">line 136 of Moose/Meta/Role.pm</a>
# once (23µs+320µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#467">line 467 of Class/MOP.pm</a>
# once (36µs+299µs) by Moose::Util::TypeConstraints::BEGIN@29 at <a href="Moose-Meta-TypeConstraint-Union-pm-block.html#19">line 19 of Moose/Meta/TypeConstraint/Union.pm</a>
# once (23µs+305µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#405">line 405 of Class/MOP.pm</a>
# once (33µs+288µs) by Moose::BEGIN@26 at <a href="Moose-Meta-Role-pm-block.html#142">line 142 of Moose/Meta/Role.pm</a>
# once (31µs+290µs) by Moose::BEGIN@27 at <a href="Moose-Meta-Role-Composite-pm-block.html#33">line 33 of Moose/Meta/Role/Composite.pm</a>
# once (36µs+284µs) by Moose::Meta::Role::BEGIN@17 at <a href="Moose-Meta-Role-Attribute-pm-block.html#15">line 15 of Moose/Meta/Role/Attribute.pm</a>
# once (24µs+282µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#432">line 432 of Class/MOP.pm</a>
# once (29µs+271µs) by Moose::BEGIN@29 at <a href="Moose-Meta-Role-Application-RoleSummation-pm-block.html#20">line 20 of Moose/Meta/Role/Application/RoleSummation.pm</a>
# once (32µs+259µs) by Moose::BEGIN@26 at <a href="Moose-Meta-Role-pm-block.html#119">line 119 of Moose/Meta/Role.pm</a>
# once (30µs+259µs) by Moose::BEGIN@27 at <a href="Moose-Meta-Role-Composite-pm-block.html#21">line 21 of Moose/Meta/Role/Composite.pm</a>
# once (31µs+257µs) by Moose::BEGIN@32 at <a href="Moose-Meta-Role-Application-ToInstance-pm-block.html#18">line 18 of Moose/Meta/Role/Application/ToInstance.pm</a>
# once (25µs+261µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#439">line 439 of Class/MOP.pm</a>
# once (28µs+252µs) by Moose::BEGIN@26 at <a href="Moose-Meta-Role-pm-block.html#353">line 353 of Moose/Meta/Role.pm</a>
# once (32µs+248µs) by Moose::BEGIN@26 at <a href="Moose-Meta-Role-pm-block.html#148">line 148 of Moose/Meta/Role.pm</a>
# once (28µs+250µs) by Moose::Util::TypeConstraints::BEGIN@33 at <a href="Moose-Meta-TypeConstraint-Role-pm-block.html#16">line 16 of Moose/Meta/TypeConstraint/Role.pm</a>
# once (29µs+248µs) by Moose::BEGIN@30 at <a href="Moose-Meta-Role-Application-ToClass-pm-block.html#16">line 16 of Moose/Meta/Role/Application/ToClass.pm</a>
# once (22µs+255µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#453">line 453 of Class/MOP.pm</a>
# once (22µs+254µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#529">line 529 of Class/MOP.pm</a>
# once (28µs+247µs) by Moose::Util::TypeConstraints::BEGIN@38 at <a href="Moose-Meta-TypeConstraint-Registry-pm-block.html#25">line 25 of Moose/Meta/TypeConstraint/Registry.pm</a>
# once (22µs+253µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#558">line 558 of Class/MOP.pm</a>
# once (29µs+245µs) by Moose::BEGIN@20 at <a href="Moose-Meta-TypeCoercion-pm-block.html#18">line 18 of Moose/Meta/TypeCoercion.pm</a>
# once (28µs+245µs) by Moose::BEGIN@20 at <a href="Moose-Meta-TypeCoercion-pm-block.html#28">line 28 of Moose/Meta/TypeCoercion.pm</a>
# once (24µs+247µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#412">line 412 of Class/MOP.pm</a>
# once (29µs+241µs) by Moose::Util::TypeConstraints::BEGIN@32 at <a href="Moose-Meta-TypeConstraint-Class-pm-block.html#16">line 16 of Moose/Meta/TypeConstraint/Class.pm</a>
# once (27µs+242µs) by Moose::BEGIN@19 at <a href="Moose-Meta-TypeConstraint-pm-block.html#58">line 58 of Moose/Meta/TypeConstraint.pm</a>
# once (29µs+240µs) by Moose::Meta::Role::BEGIN@20 at <a href="Moose-Meta-Role-Method-Conflicting-pm-block.html#15">line 15 of Moose/Meta/Role/Method/Conflicting.pm</a>
# once (29µs+239µs) by Moose::BEGIN@28 at <a href="Moose-Meta-Role-Application-pm-block.html#15">line 15 of Moose/Meta/Role/Application.pm</a>
# once (27µs+240µs) by Moose::BEGIN@18 at <a href="Moose-Meta-Class-pm-block.html#54">line 54 of Moose/Meta/Class.pm</a>
# once (27µs+239µs) by Moose::BEGIN@27 at <a href="Moose-Meta-Role-Composite-pm-block.html#31">line 31 of Moose/Meta/Role/Composite.pm</a>
# once (23µs+242µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#446">line 446 of Class/MOP.pm</a>
# once (27µs+238µs) by Moose::Meta::Role::BEGIN@17 at <a href="Moose-Meta-Role-Attribute-pm-block.html#27">line 27 of Moose/Meta/Role/Attribute.pm</a>
# once (28µs+237µs) by base::import at <a href="Moose-Meta-Mixin-AttributeCore-pm-block.html#20">line 20 of Moose/Meta/Mixin/AttributeCore.pm</a>
# once (28µs+236µs) by Moose::BEGIN@28 at <a href="Moose-Meta-Role-Application-pm-block.html#21">line 21 of Moose/Meta/Role/Application.pm</a>
# once (28µs+235µs) by Moose::Util::TypeConstraints::BEGIN@34 at <a href="Moose-Meta-TypeConstraint-Enum-pm-block.html#15">line 15 of Moose/Meta/TypeConstraint/Enum.pm</a>
# once (22µs+241µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#425">line 425 of Class/MOP.pm</a>
# once (28µs+234µs) by Moose::Util::TypeConstraints::BEGIN@35 at <a href="Moose-Meta-TypeConstraint-DuckType-pm-block.html#19">line 19 of Moose/Meta/TypeConstraint/DuckType.pm</a>
# once (22µs+237µs) by Moose::BEGIN@18 at <a href="Moose-Meta-Class-pm-block.html#37">line 37 of Moose/Meta/Class.pm</a>
# once (27µs+231µs) by base::import at <a href="Moose-Meta-Mixin-AttributeCore-pm-block.html#12">line 12 of Moose/Meta/Mixin/AttributeCore.pm</a>
# once (27µs+229µs) by Moose::BEGIN@18 at <a href="Moose-Meta-Class-pm-block.html#44">line 44 of Moose/Meta/Class.pm</a>
# once (27µs+229µs) by base::import at <a href="Moose-Meta-Mixin-AttributeCore-pm-block.html#15">line 15 of Moose/Meta/Mixin/AttributeCore.pm</a>
# once (28µs+228µs) by Moose::BEGIN@26 at <a href="Moose-Meta-Role-pm-block.html#302">line 302 of Moose/Meta/Role.pm</a>
# once (27µs+229µs) by base::import at <a href="Moose-Meta-Mixin-AttributeCore-pm-block.html#19">line 19 of Moose/Meta/Mixin/AttributeCore.pm</a>
# once (22µs+234µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#398">line 398 of Class/MOP.pm</a>
# once (27µs+228µs) by Moose::BEGIN@18 at <a href="Moose-Meta-Class-pm-block.html#35">line 35 of Moose/Meta/Class.pm</a>
# once (27µs+226µs) by Moose::BEGIN@30 at <a href="Moose-Meta-Role-Application-ToClass-pm-block.html#20">line 20 of Moose/Meta/Role/Application/ToClass.pm</a>
# once (28µs+224µs) by Moose::BEGIN@26 at <a href="Moose-Meta-Role-pm-block.html#124">line 124 of Moose/Meta/Role.pm</a>
# once (28µs+224µs) by Moose::Meta::Role::BEGIN@17 at <a href="Moose-Meta-Role-Attribute-pm-block.html#21">line 21 of Moose/Meta/Role/Attribute.pm</a>
# once (27µs+224µs) by base::import at <a href="Moose-Meta-Mixin-AttributeCore-pm-block.html#16">line 16 of Moose/Meta/Mixin/AttributeCore.pm</a>
# once (27µs+222µs) by Moose::BEGIN@26 at <a href="Moose-Meta-Role-pm-block.html#130">line 130 of Moose/Meta/Role.pm</a>
# once (27µs+222µs) by base::import at <a href="Moose-Meta-Mixin-AttributeCore-pm-block.html#13">line 13 of Moose/Meta/Mixin/AttributeCore.pm</a>
# once (27µs+222µs) by Moose::Meta::Role::BEGIN@17 at <a href="Moose-Meta-Role-Attribute-pm-block.html#33">line 33 of Moose/Meta/Role/Attribute.pm</a>
# once (27µs+222µs) by base::import at <a href="Moose-Meta-Mixin-AttributeCore-pm-block.html#21">line 21 of Moose/Meta/Mixin/AttributeCore.pm</a>
# once (27µs+222µs) by base::import at <a href="Moose-Meta-Mixin-AttributeCore-pm-block.html#17">line 17 of Moose/Meta/Mixin/AttributeCore.pm</a>
# once (26µs+222µs) by Moose::BEGIN@18 at <a href="Moose-Meta-Class-pm-block.html#49">line 49 of Moose/Meta/Class.pm</a>
# once (27µs+180µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#632">line 632 of Class/MOP.pm</a>
# once (23µs+184µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#322">line 322 of Class/MOP.pm</a>
# once (24µs+177µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#607">line 607 of Class/MOP.pm</a>
# once (24µs+174µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#641">line 641 of Class/MOP.pm</a>
# once (24µs+169µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#575">line 575 of Class/MOP.pm</a>
# once (26µs+167µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#460">line 460 of Class/MOP.pm</a>
# once (24µs+168µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#626">line 626 of Class/MOP.pm</a>
# once (24µs+164µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#419">line 419 of Class/MOP.pm</a>
# once (24µs+163µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#384">line 384 of Class/MOP.pm</a>
# once (22µs+165µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#349">line 349 of Class/MOP.pm</a>
# once (23µs+163µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#219">line 219 of Class/MOP.pm</a>
# once (23µs+160µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#180">line 180 of Class/MOP.pm</a>
# once (22µs+160µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#261">line 261 of Class/MOP.pm</a>
# once (24µs+157µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#517">line 517 of Class/MOP.pm</a>
# once (24µs+157µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#592">line 592 of Class/MOP.pm</a>
# once (22µs+158µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#653">line 653 of Class/MOP.pm</a>
# once (22µs+158µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#495">line 495 of Class/MOP.pm</a>
# once (22µs+157µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#222">line 222 of Class/MOP.pm</a>
# once (22µs+157µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#523">line 523 of Class/MOP.pm</a>
# once (22µs+157µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#358">line 358 of Class/MOP.pm</a>
# once (22µs+155µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#511">line 511 of Class/MOP.pm</a>
# once (23µs+155µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#505">line 505 of Class/MOP.pm</a>
# once (22µs+154µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#477">line 477 of Class/MOP.pm</a>
# once (22µs+153µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#584">line 584 of Class/MOP.pm</a>
# once (22µs+153µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#647">line 647 of Class/MOP.pm</a>
# once (22µs+153µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#237">line 237 of Class/MOP.pm</a>
# once (22µs+152µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#340">line 340 of Class/MOP.pm</a>
# once (22µs+152µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#287">line 287 of Class/MOP.pm</a>
# once (22µs+152µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#368">line 368 of Class/MOP.pm</a>
# once (22µs+152µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#192">line 192 of Class/MOP.pm</a>
# once (22µs+150µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#610">line 610 of Class/MOP.pm</a>
# once (22µs+151µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#565">line 565 of Class/MOP.pm</a>
# once (22µs+150µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#325">line 325 of Class/MOP.pm</a>
# once (22µs+150µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#306">line 306 of Class/MOP.pm</a>
# once (23µs+73µs) by Moose::Exporter::BEGIN@11 at <a href="Class-MOP-pm-block.html#551">line 551 of Class/MOP.pm</a></div></div>sub add_attribute {</td></tr>
<tr><td class="h"><a name="19"></a>19</td><td class="c0">1309</td><td class="c0"><span title="Avg 2µs">3.01ms</span></td><td></td><td></td><td class="s"> my $self = shift;</td></tr>
<tr><td class="h"><a name="20"></a>20</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="21"></a>21</td><td></td><td></td><td></td><td></td><td class="s"> my $attribute<div class="calls"><div class="calls_out"> # spent 1.46ms making 66 calls to <a href="Class-MOP-Attribute-pm-block.html#28">Class::MOP::Attribute::new</a>, avg 22µs/call
# spent 90µs making 66 calls to <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#16">Class::MOP::Mixin::HasAttributes::attribute_metaclass</a>, avg 1µs/call
# spent 67µs making 119 calls to <a href="Scalar-Util-pm-block.html#Scalar__Util__blessed">Scalar::Util::blessed</a>, avg 564ns/call</div></div></td></tr>
<tr><td class="h"><a name="22"></a>22</td><td></td><td></td><td></td><td></td><td class="s"> = blessed( $_[0] ) ? $_[0] : $self->attribute_metaclass->new(@_);</td></tr>
<tr><td class="h"><a name="23"></a>23</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="24"></a>24</td><td></td><td></td><td></td><td></td><td class="s"> ( $attribute->isa('Class::MOP::Mixin::AttributeCore') )<div class="calls"><div class="calls_out"> # spent 119µs making 119 calls to <a >UNIVERSAL::isa</a>, avg 1µs/call</div></div></td></tr>
<tr><td class="h"><a name="25"></a>25</td><td></td><td></td><td></td><td></td><td class="s"> || confess</td></tr>
<tr><td class="h"><a name="26"></a>26</td><td></td><td></td><td></td><td></td><td class="s"> "Your attribute must be an instance of Class::MOP::Mixin::AttributeCore (or a subclass)";</td></tr>
<tr><td class="h"><a name="27"></a>27</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="28"></a>28</td><td></td><td></td><td></td><td></td><td class="s"> $self->_attach_attribute($attribute);<div class="calls"><div class="calls_out"> # spent 1.36ms making 119 calls to <a href="Class-MOP-Class-pm-block.html#501">Class::MOP::Class::_attach_attribute</a>, avg 11µs/call</div></div></td></tr>
<tr><td class="h"><a name="29"></a>29</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="30"></a>30</td><td></td><td></td><td></td><td></td><td class="s"> my $attr_name = $attribute->name;<div class="calls"><div class="calls_out"> # spent 77µs making 119 calls to <a href="Class-MOP-Mixin-AttributeCore-pm-block.html#Class__MOP__Mixin__AttributeCore__name">Class::MOP::Mixin::AttributeCore::name</a>, avg 646ns/call</div></div></td></tr>
<tr><td class="h"><a name="31"></a>31</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="32"></a>32</td><td></td><td></td><td></td><td></td><td class="s"> $self->remove_attribute($attr_name)<div class="calls"><div class="calls_out"> # spent 583µs making 119 calls to <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#51">Class::MOP::Mixin::HasAttributes::has_attribute</a>, avg 5µs/call</div></div></td></tr>
<tr><td class="h"><a name="33"></a>33</td><td></td><td></td><td></td><td></td><td class="s"> if $self->has_attribute($attr_name);</td></tr>
<tr><td class="h"><a name="34"></a>34</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="35"></a>35</td><td></td><td></td><td></td><td></td><td class="s"> my $order = ( scalar keys %{ $self->_attribute_map } );<div class="calls"><div class="calls_out"> # spent 93µs making 119 calls to <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#15">Class::MOP::Mixin::HasAttributes::_attribute_map</a>, avg 781ns/call</div></div></td></tr>
<tr><td class="h"><a name="36"></a>36</td><td></td><td></td><td></td><td></td><td class="s"> $attribute->_set_insertion_order($order);<div class="calls"><div class="calls_out"> # spent 142µs making 119 calls to <a href="Class-MOP-Mixin-AttributeCore-pm-block.html#35">Class::MOP::Mixin::AttributeCore::_set_insertion_order</a>, avg 1µs/call</div></div></td></tr>
<tr><td class="h"><a name="37"></a>37</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="38"></a>38</td><td></td><td></td><td></td><td></td><td class="s"> $self->_attribute_map->{$attr_name} = $attribute;<div class="calls"><div class="calls_out"> # spent 90µs making 119 calls to <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#15">Class::MOP::Mixin::HasAttributes::_attribute_map</a>, avg 753ns/call</div></div></td></tr>
<tr><td class="h"><a name="39"></a>39</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="40"></a>40</td><td></td><td></td><td></td><td></td><td class="s"> # This method is called to allow for installing accessors. Ideally, we'd</td></tr>
<tr><td class="h"><a name="41"></a>41</td><td></td><td></td><td></td><td></td><td class="s"> # use method overriding, but then the subclass would be responsible for</td></tr>
<tr><td class="h"><a name="42"></a>42</td><td></td><td></td><td></td><td></td><td class="s"> # making the attribute, which would end up with lots of code</td></tr>
<tr><td class="h"><a name="43"></a>43</td><td></td><td></td><td></td><td></td><td class="s"> # duplication. Even more ideally, we'd use augment/inner, but this is</td></tr>
<tr><td class="h"><a name="44"></a>44</td><td></td><td></td><td></td><td></td><td class="s"> # Class::MOP!</td></tr>
<tr><td class="h"><a name="45"></a>45</td><td></td><td></td><td></td><td></td><td class="s"> $self->_post_add_attribute($attribute)<div class="calls"><div class="calls_out"> # spent 28.9ms making 119 calls to <a href="Class-MOP-Class-pm-block.html#506">Class::MOP::Class::_post_add_attribute</a>, avg 243µs/call
# spent 118µs making 119 calls to <a >UNIVERSAL::can</a>, avg 991ns/call</div></div></td></tr>
<tr><td class="h"><a name="46"></a>46</td><td></td><td></td><td></td><td></td><td class="s"> if $self->can('_post_add_attribute');</td></tr>
<tr><td class="h"><a name="47"></a>47</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="48"></a>48</td><td></td><td></td><td></td><td></td><td class="s"> return $attribute;</td></tr>
<tr><td class="h"><a name="49"></a>49</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h"><a name="50"></a>50</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="51"></a>51</td><td></td><td></td><td></td><td></td><td class="s"><div class="calls"><div class="calls_in"># spent 848µs (659+189) within Class::MOP::Mixin::HasAttributes::has_attribute which was called 170 times, avg 5µs/call:
# 119 times (447µs+136µs) by Class::MOP::Mixin::HasAttributes::add_attribute at <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#32">line 32</a>, avg 5µs/call
# 51 times (211µs+54µs) by Class::MOP::Class::find_attribute_by_name at <a href="Class-MOP-Class-pm-block.html#542">line 542 of Class/MOP/Class.pm</a>, avg 5µs/call</div></div>sub has_attribute {</td></tr>
<tr><td class="h"><a name="52"></a>52</td><td class="c0">510</td><td class="c0"><span title="Avg 1µs">540µs</span></td><td></td><td></td><td class="s"> my ( $self, $attribute_name ) = @_;</td></tr>
<tr><td class="h"><a name="53"></a>53</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="54"></a>54</td><td></td><td></td><td></td><td></td><td class="s"> ( defined $attribute_name )</td></tr>
<tr><td class="h"><a name="55"></a>55</td><td></td><td></td><td></td><td></td><td class="s"> || confess "You must define an attribute name";</td></tr>
<tr><td class="h"><a name="56"></a>56</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="57"></a>57</td><td></td><td></td><td></td><td></td><td class="s"> exists $self->_attribute_map->{$attribute_name};<div class="calls"><div class="calls_out"> # spent 189µs making 170 calls to <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#15">Class::MOP::Mixin::HasAttributes::_attribute_map</a>, avg 1µs/call</div></div></td></tr>
<tr><td class="h"><a name="58"></a>58</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h"><a name="59"></a>59</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="60"></a>60</td><td></td><td></td><td></td><td></td><td class="s"><div class="calls"><div class="calls_in"># spent 576µs (477+99) within Class::MOP::Mixin::HasAttributes::get_attribute which was called 119 times, avg 5µs/call:
# 68 times (301µs+61µs) by Class::MOP::Class::_inline_accessors at <a href="Class-MOP-Class-pm-block.html#1030">line 1030 of Class/MOP/Class.pm</a>, avg 5µs/call
# 51 times (175µs+38µs) by Class::MOP::Class::find_attribute_by_name at <a href="Class-MOP-Class-pm-block.html#542">line 542 of Class/MOP/Class.pm</a>, avg 4µs/call</div></div>sub get_attribute {</td></tr>
<tr><td class="h"><a name="61"></a>61</td><td class="c0">357</td><td class="c0"><span title="Avg 1µs">398µs</span></td><td></td><td></td><td class="s"> my ( $self, $attribute_name ) = @_;</td></tr>
<tr><td class="h"><a name="62"></a>62</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="63"></a>63</td><td></td><td></td><td></td><td></td><td class="s"> ( defined $attribute_name )</td></tr>
<tr><td class="h"><a name="64"></a>64</td><td></td><td></td><td></td><td></td><td class="s"> || confess "You must define an attribute name";</td></tr>
<tr><td class="h"><a name="65"></a>65</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="66"></a>66</td><td></td><td></td><td></td><td></td><td class="s"> return $self->_attribute_map->{$attribute_name};<div class="calls"><div class="calls_out"> # spent 99µs making 119 calls to <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#15">Class::MOP::Mixin::HasAttributes::_attribute_map</a>, avg 832ns/call</div></div></td></tr>
<tr><td class="h"><a name="67"></a>67</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h"><a name="68"></a>68</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="69"></a>69</td><td></td><td></td><td></td><td></td><td class="s">sub remove_attribute {</td></tr>
<tr><td class="h"><a name="70"></a>70</td><td></td><td></td><td></td><td></td><td class="s"> my ( $self, $attribute_name ) = @_;</td></tr>
<tr><td class="h"><a name="71"></a>71</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="72"></a>72</td><td></td><td></td><td></td><td></td><td class="s"> ( defined $attribute_name )</td></tr>
<tr><td class="h"><a name="73"></a>73</td><td></td><td></td><td></td><td></td><td class="s"> || confess "You must define an attribute name";</td></tr>
<tr><td class="h"><a name="74"></a>74</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="75"></a>75</td><td></td><td></td><td></td><td></td><td class="s"> my $removed_attribute = $self->_attribute_map->{$attribute_name};</td></tr>
<tr><td class="h"><a name="76"></a>76</td><td></td><td></td><td></td><td></td><td class="s"> return unless defined $removed_attribute;</td></tr>
<tr><td class="h"><a name="77"></a>77</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="78"></a>78</td><td></td><td></td><td></td><td></td><td class="s"> delete $self->_attribute_map->{$attribute_name};</td></tr>
<tr><td class="h"><a name="79"></a>79</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="80"></a>80</td><td></td><td></td><td></td><td></td><td class="s"> return $removed_attribute;</td></tr>
<tr><td class="h"><a name="81"></a>81</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h"><a name="82"></a>82</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="83"></a>83</td><td></td><td></td><td></td><td></td><td class="s"><div class="calls"><div class="calls_in"># spent 186µs (150+36) within Class::MOP::Mixin::HasAttributes::get_attribute_list which was called 32 times, avg 6µs/call:
# 32 times (150µs+36µs) by Class::MOP::Class::_inline_accessors at <a href="Class-MOP-Class-pm-block.html#1029">line 1029 of Class/MOP/Class.pm</a>, avg 6µs/call</div></div>sub get_attribute_list {</td></tr>
<tr><td class="h"><a name="84"></a>84</td><td class="c0">64</td><td class="c1"><span title="Avg 2µs">113µs</span></td><td></td><td></td><td class="s"> my $self = shift;</td></tr>
<tr><td class="h"><a name="85"></a>85</td><td></td><td></td><td></td><td></td><td class="s"> keys %{ $self->_attribute_map };<div class="calls"><div class="calls_out"> # spent 36µs making 32 calls to <a href="Class-MOP-Mixin-HasAttributes-pm-block.html#15">Class::MOP::Mixin::HasAttributes::_attribute_map</a>, avg 1µs/call</div></div></td></tr>
<tr><td class="h"><a name="86"></a>86</td><td></td><td></td><td></td><td></td><td class="s">}</td></tr>
<tr><td class="h"><a name="87"></a>87</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="88"></a>88</td><td class="c3">1</td><td class="c3"><span title="Avg 7µs">7µs</span></td><td></td><td></td><td class="s">1;</td></tr>
<tr><td class="h"><a name="89"></a>89</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="90"></a>90</td><td></td><td></td><td></td><td></td><td class="s">__END__</td></tr>
<tr><td class="h"><a name="91"></a>91</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="92"></a>92</td><td></td><td></td><td></td><td></td><td class="s">=pod</td></tr>
<tr><td class="h"><a name="93"></a>93</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="94"></a>94</td><td></td><td></td><td></td><td></td><td class="s">=head1 NAME</td></tr>
<tr><td class="h"><a name="95"></a>95</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="96"></a>96</td><td></td><td></td><td></td><td></td><td class="s">Class::MOP::Mixin::HasMethods - Methods for metaclasses which have attributes</td></tr>
<tr><td class="h"><a name="97"></a>97</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="98"></a>98</td><td></td><td></td><td></td><td></td><td class="s">=head1 DESCRIPTION</td></tr>
<tr><td class="h"><a name="99"></a>99</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="100"></a>100</td><td></td><td></td><td></td><td></td><td class="s">This class implements methods for metaclasses which have attributes</td></tr>
<tr><td class="h"><a name="101"></a>101</td><td></td><td></td><td></td><td></td><td class="s">(L<Class::MOP::Class> and L<Moose::Meta::Role>). See L<Class::MOP::Class> for</td></tr>
<tr><td class="h"><a name="102"></a>102</td><td></td><td></td><td></td><td></td><td class="s">API details.</td></tr>
<tr><td class="h"><a name="103"></a>103</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="104"></a>104</td><td></td><td></td><td></td><td></td><td class="s">=head1 AUTHORS</td></tr>
<tr><td class="h"><a name="105"></a>105</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="106"></a>106</td><td></td><td></td><td></td><td></td><td class="s">Dave Rolsky E<lt>autarch@urth.orgE<gt></td></tr>
<tr><td class="h"><a name="107"></a>107</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="108"></a>108</td><td></td><td></td><td></td><td></td><td class="s">=head1 COPYRIGHT AND LICENSE</td></tr>
<tr><td class="h"><a name="109"></a>109</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="110"></a>110</td><td></td><td></td><td></td><td></td><td class="s">Copyright 2006-2010 by Infinity Interactive, Inc.</td></tr>
<tr><td class="h"><a name="111"></a>111</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="112"></a>112</td><td></td><td></td><td></td><td></td><td class="s">L<http://www.iinteractive.com></td></tr>
<tr><td class="h"><a name="113"></a>113</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="114"></a>114</td><td></td><td></td><td></td><td></td><td class="s">This library is free software; you can redistribute it and/or modify</td></tr>
<tr><td class="h"><a name="115"></a>115</td><td></td><td></td><td></td><td></td><td class="s">it under the same terms as Perl itself.</td></tr>
<tr><td class="h"><a name="116"></a>116</td><td></td><td></td><td></td><td></td><td class="s"></td></tr>
<tr><td class="h"><a name="117"></a>117</td><td></td><td></td><td></td><td></td><td class="s">=cut</td></tr>
</tbody></table></div>
<script type="text/javascript"> $(document).ready(function() {
$("#subs_table").tablesorter({
sortList: [[3,1]],
headers: {
3: { sorter: 'fmt_time' },
4: { sorter: 'fmt_time' }
}
});
} ); </script>
<div class="footer">Report produced by the
<a href="http://search.cpan.org/dist/Devel-NYTProf/">NYTProf 3.11</a>
Perl profiler, developed by
<a href="http://www.linkedin.com/in/timbunce">Tim Bunce</a> and
<a href="http://code.nytimes.com">Adam Kaplan</a>.
</div>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
</body></html>