Devel-StatProfiler

 view release on metacpan or  search on metacpan

share/subs.tmpl  view on Meta::CPAN

?  my %variables = %{$_[0]};
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" type="text/css" href="statprofiler.css">
    <script src="sorttable.js"></script>
    <title>StatProfiler: subroutine list</title>
  </head>
  <body>
?= $variables{include}->('header', $_[0])
    <div id="body-content">
      <table class="sortable">
        <caption>Subroutines, sorted by exclusive sample count</caption>
        <tr>
          <th class="sorttable_sorted">Exclusive</td>
          <th>Inclusive</td>
          <th>Subroutine</th>
        </tr>
<? my ($sub_link, $sub_name, $format_total_ratio) = @variables{qw(sub_link sub_name format_total_ratio)};
   for my $sub (@{$variables{subs}}) {
 ?>
        <tr>
          <td sorttable_customkey="<?= $sub->{exclusive} ?>"><?= $format_total_ratio->($sub->{exclusive}) ?></td>
          <td sorttable_customkey="<?= $sub->{inclusive} ?>"><?= $format_total_ratio->($sub->{inclusive}) ?></td>
          <td>
            <a href="<?= $sub_link->($sub) ?>"><?= $sub_name->($sub->{name_pretty}) ?></a>
?    if ($sub->{kind} == 2) {
            (opcode)
?    } elsif ($sub->{kind} == 1) {
            (xsub)
?    }
          </td>
        </tr>
?  }
      </table>
    </div>
  </body>
</html>



( run in 1.061 second using v1.01-cache-2.11-cpan-acf6aa7dc9e )