Devel-StatProfiler
view release on metacpan or search on metacpan
lib/Devel/StatProfiler/SectionGuard.pm view on Meta::CPAN
package Devel::StatProfiler::SectionGuard;
use 5.12.0;
use warnings;
sub new {
my $class = shift;
my $self = bless({@_} => $class);
Devel::StatProfiler::start_section($self->{section_name});
return $self;
}
sub section_name { $_[0]->{section_name} }
sub DESTROY {
my $self = shift;
Devel::StatProfiler::end_section($self->{section_name});
}
( run in 0.466 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )