Filename | /usr/local/lib/perl5/site_perl/mach/5.24/Razor2/Engine/VR8.pm |
Statements | Executed 7 statements in 801µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 3.80ms | 3.91ms | BEGIN@2 | Razor2::Engine::VR8::
1 | 1 | 1 | 38µs | 142µs | BEGIN@4 | Razor2::Engine::VR8::
1 | 1 | 1 | 37µs | 185µs | BEGIN@3 | Razor2::Engine::VR8::
0 | 0 | 0 | 0s | 0s | new | Razor2::Engine::VR8::
0 | 0 | 0 | 0s | 0s | signature | Razor2::Engine::VR8::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Razor2::Engine::VR8; | ||||
2 | 2 | 313µs | 1 | 3.91ms | # spent 3.91ms (3.80+104µs) within Razor2::Engine::VR8::BEGIN@2 which was called:
# once (3.80ms+104µs) by Razor2::Client::Engine::BEGIN@7 at line 2 # spent 3.91ms making 1 call to Razor2::Engine::VR8::BEGIN@2 |
3 | 2 | 80µs | 2 | 334µs | # spent 185µs (37+148) within Razor2::Engine::VR8::BEGIN@3 which was called:
# once (37µs+148µs) by Razor2::Client::Engine::BEGIN@7 at line 3 # spent 185µs making 1 call to Razor2::Engine::VR8::BEGIN@3
# spent 148µs making 1 call to Exporter::import |
4 | 2 | 402µs | 2 | 247µs | # spent 142µs (38+105) within Razor2::Engine::VR8::BEGIN@4 which was called:
# once (38µs+105µs) by Razor2::Client::Engine::BEGIN@7 at line 4 # spent 142µs making 1 call to Razor2::Engine::VR8::BEGIN@4
# spent 105µs making 1 call to Exporter::import |
5 | |||||
6 | sub new { | ||||
7 | |||||
8 | my ($class, %args) = @_; | ||||
9 | |||||
10 | my $self = bless { | ||||
11 | description => 'whiplash', | ||||
12 | has_greet_param => 0, | ||||
13 | whiplash => new Razor2::Signature::Whiplash, | ||||
14 | rm => $args{RM}, | ||||
15 | }, $class; | ||||
16 | |||||
17 | die unless $self; | ||||
18 | |||||
19 | return $self; | ||||
20 | |||||
21 | } | ||||
22 | |||||
23 | |||||
24 | sub signature { | ||||
25 | |||||
26 | my ($self, $text) = @_; | ||||
27 | my ($sigs, $meta) = $self->{whiplash}->whiplash($$text); | ||||
28 | |||||
29 | my @sigs_to_return; | ||||
30 | return unless $sigs; | ||||
31 | |||||
32 | if (scalar @$sigs) { | ||||
33 | for (@$sigs) { | ||||
34 | push @sigs_to_return, hextobase64($_); | ||||
35 | } | ||||
36 | } else { | ||||
37 | return; | ||||
38 | } | ||||
39 | |||||
40 | return \@sigs_to_return; | ||||
41 | |||||
42 | } | ||||
43 | |||||
44 | 1 | 6µs | 1; | ||
45 |