X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-REPL.git;a=blobdiff_plain;f=lib%2FDevel%2FREPL%2FPlugin%2FTiming.pm;h=40dd282d003560d7502439da4f8aa03120381ef5;hp=a445bb64e908a69a9220c17b71177692bb248b77;hb=77327851f87a17466307e8fccdbf2e0d3c2e58dc;hpb=cfd1094b45c394258ccda08216f1435bf40e1d50 diff --git a/lib/Devel/REPL/Plugin/Timing.pm b/lib/Devel/REPL/Plugin/Timing.pm index a445bb6..40dd282 100644 --- a/lib/Devel/REPL/Plugin/Timing.pm +++ b/lib/Devel/REPL/Plugin/Timing.pm @@ -1,8 +1,13 @@ +use strict; +use warnings; package Devel::REPL::Plugin::Timing; +# ABSTRACT: Display execution times -use Moose::Role; +our $VERSION = '1.003030'; + +use Devel::REPL::Plugin; use Time::HiRes 'time'; -use namespace::clean -except => [ 'meta' ]; +use namespace::autoclean; around 'eval' => sub { my $orig = shift; @@ -26,9 +31,24 @@ around 'eval' => sub { __END__ -=head1 NAME +=pod -Devel::REPL::Plugin::Timing - display execution times +=head1 SYNOPSIS -=cut + # in your re.pl file: + use Devel::REPL; + my $repl = Devel::REPL->new; + $repl->load_plugin('Timing'); + + # after you run re.pl: + $ sum map $_*100, 1..100000; + Took 0.0830280780792236 seconds. + 500005000000 + + $ +=head1 AUTHOR + +Shawn M Moore, C<< >> + +=cut