Skip to content

Commit

Permalink
profile
Browse files Browse the repository at this point in the history
  • Loading branch information
bonnu committed Feb 23, 2011
1 parent 128ed7a commit 43b10a6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
1 change: 0 additions & 1 deletion lib/Encomp/Complex.pm
Expand Up @@ -4,7 +4,6 @@ use Encomp::Util;
require Encomp::Base;
use Carp qw/croak/;
use Digest::MD5 qw/md5_hex/;
use UNIVERSAL::can;

sub build {
my ($encompasser, $adhoc, @args) = @_;
Expand Down
16 changes: 11 additions & 5 deletions lib/Encomp/Profiler.pm
Expand Up @@ -3,12 +3,12 @@ package Encomp::Profiler;
use strict;
use warnings;
use Data::Util;
use Encomp::Util;

{
package #
_EncompProfiler;
use Encomp;
no Encomp;
# initialize dummy class
_EncompProfiler; use Encomp; no Encomp
}

{
Expand All @@ -27,8 +27,14 @@ use Data::Util;
}

sub build_info {
my @classes = @_;
my $obj = _EncompProfiler->build([ @classes ]);
my ($encomp, @components) = @_;
die 'There is no element' unless @_;
Encomp::Util::load_class($encomp);
unless ($encomp->isa('Encomp::Class::Encompasser')) {
unshift @components, "$encomp";
$encomp = '_EncompProfiler';
}
my $obj = $encomp->build([ @components ]);
my $res = _EncompProfilingResults->new(
name => ref($obj),
loaded => $obj->complex->{loaded},
Expand Down

0 comments on commit 43b10a6

Please sign in to comment.