← Index
NYTProf Performance Profile   « block view • line view • sub view »
For /usr/local/src/github.com/foswiki/core/bin/view
  Run on Sun Dec 4 17:17:59 2011
Reported on Sun Dec 4 17:26:34 2011

Filename/usr/local/src/github.com/foswiki/core/lib/CPAN/lib/CGI/Session/ErrorHandler.pm
StatementsExecuted 27 statements in 459µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
33255µs55µsCGI::Session::ErrorHandler::::errstrCGI::Session::ErrorHandler::errstr
11125µs32µsCGI::Session::ErrorHandler::::BEGIN@5CGI::Session::ErrorHandler::BEGIN@5
11122µs22µsCGI::Session::ErrorHandler::::set_errorCGI::Session::ErrorHandler::set_error
11116µs50µsCGI::Session::ErrorHandler::::BEGIN@44CGI::Session::ErrorHandler::BEGIN@44
11116µs45µ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: ErrorHandler.pm 447 2008-11-01 03:46:08Z markstos $
4
52129µs240µs
# spent 32µs (25+7) within CGI::Session::ErrorHandler::BEGIN@5 which was called: # once (25µs+7µs) by CGI::Session::BEGIN@7 at line 5
use strict;
# spent 32µs making 1 call to CGI::Session::ErrorHandler::BEGIN@5 # spent 7µs making 1 call to strict::import
612µs$CGI::Session::ErrorHandler::VERSION = '4.38';
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 22µs within CGI::Session::ErrorHandler::set_error which was called: # once (22µs+0s) by CGI::Session::new at line 65 of /usr/local/src/github.com/foswiki/core/lib/CPAN/lib/CGI/Session.pm
sub set_error {
41626µs my $class = shift;
42 my $message = shift;
43 $class = ref($class) || $class;
442155µs284µs
# spent 50µs (16+34) within CGI::Session::ErrorHandler::BEGIN@44 which was called: # once (16µs+34µs) by CGI::Session::BEGIN@7 at line 44
no strict 'refs';
# spent 50µs making 1 call to CGI::Session::ErrorHandler::BEGIN@44 # spent 34µs making 1 call to strict::unimport
45 ${ "$class\::errstr" } = sprintf($message || "", @_);
46 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
5713µs*error = \&errstr;
58
# spent 55µs within CGI::Session::ErrorHandler::errstr which was called 3 times, avg 18µs/call: # once (25µs+0s) by Foswiki::LoginManager::complete at line 531 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/LoginManager.pm # once (16µs+0s) by Foswiki::LoginManager::userLoggedIn at line 657 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/LoginManager.pm # once (15µs+0s) by CGI::Session::load at line 728 of /usr/local/src/github.com/foswiki/core/lib/CPAN/lib/CGI/Session.pm
sub errstr {
591261µs my $class = shift;
60 $class = ref( $class ) || $class;
61
62276µs274µs
# spent 45µs (16+29) within CGI::Session::ErrorHandler::BEGIN@62 which was called: # once (16µs+29µs) by CGI::Session::BEGIN@7 at line 62
no strict 'refs';
# spent 45µs making 1 call to CGI::Session::ErrorHandler::BEGIN@62 # spent 29µs making 1 call to strict::unimport
63 return ${ "$class\::errstr" } || '';
64}
65
66=head1 LICENSING
67
68For support and licensing information see L<CGI::Session|CGI::Session>.
69
70=cut
71
7216µs1;
73