← Index
NYTProf Performance Profile   « line view »
For /usr/local/libexec/sympa/task_manager-debug.pl
  Run on Tue Jun 1 22:32:51 2021
Reported on Tue Jun 1 22:35:14 2021

Filename/usr/local/lib/perl5/site_perl/Mail/AuthenticationResults/Token/QuotedString.pm
StatementsExecuted 0 statements in 0s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
0000s0sMail::AuthenticationResults::Token::QuotedString::::BEGIN@10Mail::AuthenticationResults::Token::QuotedString::BEGIN@10
0000s0sMail::AuthenticationResults::Token::QuotedString::::BEGIN@5Mail::AuthenticationResults::Token::QuotedString::BEGIN@5
0000s0sMail::AuthenticationResults::Token::QuotedString::::BEGIN@6Mail::AuthenticationResults::Token::QuotedString::BEGIN@6
0000s0sMail::AuthenticationResults::Token::QuotedString::::BEGIN@8Mail::AuthenticationResults::Token::QuotedString::BEGIN@8
0000s0sMail::AuthenticationResults::Token::QuotedString::::isMail::AuthenticationResults::Token::QuotedString::is
0000s0sMail::AuthenticationResults::Token::QuotedString::::parseMail::AuthenticationResults::Token::QuotedString::parse
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Mail::AuthenticationResults::Token::QuotedString;
2# ABSTRACT: Class for modelling AuthenticationResults Header parts detected as quoted strings
3
4require 5.008;
5use strict;
6use warnings;
7our $VERSION = '2.20210112'; # VERSION
8use Carp;
9
10use base 'Mail::AuthenticationResults::Token';
11
12
13sub is {
14 my ( $self ) = @_;
15 return 'string';
16}
17
18sub parse {
19 my ($self) = @_;
20
21 my $header = $self->{ 'header' };
22 my $value = q{};
23
24 my $first = substr( $header,0,1 );
25 $header = substr( $header,1 );
26 croak 'not a quoted string' if $first ne '"';
27
28 my $closed = 0;
29 while ( length $header > 0 ) {
30 my $first = substr( $header,0,1 );
31 $header = substr( $header,1 );
32 if ( $first eq '"' ) {
33 $closed = 1;
34 last;
35 }
36 $value .= $first;
37 }
38
39 croak 'Quoted string not closed' if ! $closed;
40
41 $self->{ 'value' } = $value;
42 $self->{ 'header' } = $header;
43
44 return;
45}
46
471;
48
49__END__