← Index
NYTProf Performance Profile   « line view »
For starman worker -M FindBin --max-requests 50 --workers 2 --user=kohadev-koha --group kohadev-koha --pid /var/run/koha/kohadev/plack.pid --daemonize --access-log /var/log/koha/kohadev/plack.log --error-log /var/log/koha/kohadev/plack-error.log -E deployment --socket /var/run/koha/kohadev/plack.sock /etc/koha/sites/kohadev/plack.psgi
  Run on Fri Jan 8 14:31:06 2016
Reported on Fri Jan 8 14:33:27 2016

Filename/usr/share/perl5/CGI/Session/ErrorHandler.pm
StatementsExecuted 16 statements in 28µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
91178µs78µsCGI::Session::ErrorHandler::::set_errorCGI::Session::ErrorHandler::set_error
91151µs51µsCGI::Session::ErrorHandler::::errstrCGI::Session::ErrorHandler::errstr
11114µs23µsCGI::Session::ErrorHandler::::BEGIN@44CGI::Session::ErrorHandler::BEGIN@44
11114µs20µsCGI::Session::ErrorHandler::::BEGIN@5CGI::Session::ErrorHandler::BEGIN@5
11110µs15µsCGI::Session::ErrorHandler::::BEGIN@62CGI::Session::ErrorHandler::BEGIN@62
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package CGI::Session::ErrorHandler;
2
3# $Id$
4
5227µs
# spent 20µs (14+7) within CGI::Session::ErrorHandler::BEGIN@5 which was called: # once (14µs+7µs) by CGI::Session::BEGIN@4 at line 5
use strict;
# spent 20µs making 1 call to CGI::Session::ErrorHandler::BEGIN@5 # spent 7µs making 1 call to strict::import
6$CGI::Session::ErrorHandler::VERSION = '4.43';
7
8=pod
9
10=head1 NAME
11
12CGI::Session::ErrorHandler - error handling routines for CGI::Session
13
14=head1 SYNOPSIS
15
16 require CGI::Session::ErrorHandler;
17 @ISA = qw( CGI::Session::ErrorHandler );
18
19 sub some_method {
20 my $self = shift;
21 unless ( $some_condition ) {
22 return $self->set_error("some_method(): \$some_condition isn't met");
23 }
24 }
25
26=head1 DESCRIPTION
27
28CGI::Session::ErrorHandler provides set_error() and errstr() methods for setting and accessing error messages from within CGI::Session's components. This method should be used by driver developers for providing CGI::Session-standard error handling routines for their code
29
30=head2 METHODS
31
32=over 4
33
34=item set_error($message)
35
36Implicitly defines $pkg_name::errstr and sets its value to $message. Return value is B<always> undef.
37
38=cut
39
40
# spent 78µs within CGI::Session::ErrorHandler::set_error which was called 9 times, avg 9µs/call: # 9 times (78µs+0s) by CGI::Session::new at line 59 of CGI/Session.pm, avg 9µs/call
sub set_error {
4121µs my $class = shift;
4221µs my $message = shift;
432700ns $class = ref($class) || $class;
44232µs
# spent 23µs (14+9) within CGI::Session::ErrorHandler::BEGIN@44 which was called: # once (14µs+9µs) by CGI::Session::BEGIN@4 at line 44
no strict 'refs';
# spent 23µs making 1 call to CGI::Session::ErrorHandler::BEGIN@44 # spent 9µs making 1 call to strict::unimport
4529µs ${ "$class\::errstr" } = $message || "";
4626µs return;
47}
48
49=item errstr()
50
51Returns whatever value was set by the most recent call to set_error(). If no message as has been set yet, the empty string is returned so the message can still concatenate without a warning.
52
53=back
54
55=cut
56
57*error = \&errstr;
58
# spent 51µs within CGI::Session::ErrorHandler::errstr which was called 9 times, avg 6µs/call: # 9 times (51µs+0s) by CGI::Session::load at line 702 of CGI/Session.pm, avg 6µs/call
sub errstr {
592900ns my $class = shift;
602800ns $class = ref( $class ) || $class;
61
62221µs
# spent 15µs (10+6) within CGI::Session::ErrorHandler::BEGIN@62 which was called: # once (10µs+6µs) by CGI::Session::BEGIN@4 at line 62
no strict 'refs';
# spent 15µs making 1 call to CGI::Session::ErrorHandler::BEGIN@62 # spent 6µs making 1 call to strict::unimport
6328µs return ${ "$class\::errstr" } || '';
64}
65
66=head1 LICENSING
67
68For support and licensing information see L<CGI::Session|CGI::Session>.
69
70=cut
71
721;
73