← Index
NYTProf Performance Profile   « line view »
For /usr/local/bin/sa-learn
  Run on Sun Nov 5 03:09:29 2017
Reported on Mon Nov 6 13:20:48 2017

Filename/usr/local/lib/perl5/site_perl/mach/5.24/Razor2/Preproc/deNewline.pm
StatementsExecuted 3 statements in 562µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111544µs1.02msRazor2::Preproc::deNewline::::BEGIN@2Razor2::Preproc::deNewline::BEGIN@2
0000s0sRazor2::Preproc::deNewline::::doitRazor2::Preproc::deNewline::doit
0000s0sRazor2::Preproc::deNewline::::isitRazor2::Preproc::deNewline::isit
0000s0sRazor2::Preproc::deNewline::::newRazor2::Preproc::deNewline::new
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Razor2::Preproc::deNewline;
22556µs21.12ms
# spent 1.02ms (544µs+475µs) within Razor2::Preproc::deNewline::BEGIN@2 which was called: # once (544µs+475µs) by Razor2::Preproc::Manager::BEGIN@6 at line 2
use MIME::QuotedPrint;
# spent 1.02ms making 1 call to Razor2::Preproc::deNewline::BEGIN@2 # spent 99µs making 1 call to Exporter::import
3
4
5sub new {
6 return bless {}, shift;
7}
8
9
10sub isit {
11 1;
12}
13
14
15sub doit {
16
17 my ($self, $text) = @_;
18
19 my ($hdr, $body) = split /\n\r*\n/, $$text, 2;
20
21 return unless $body;
22
23 unless ($body =~ s/\n+$//s) {
24 return $text;
25 }
26
27 $$text = "$hdr\n\n$body";
28 return $text;
29
30}
31
32
3316µs1;