| Filename | /usr/share/perl5/CGI/Session/Driver.pm |
| Statements | Executed 25 statements in 383µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 2 | 1 | 1 | 23µs | 61µs | CGI::Session::Driver::new |
| 1 | 1 | 1 | 13µs | 20µs | CGI::Session::Driver::BEGIN@3 |
| 1 | 1 | 1 | 7µs | 28µs | CGI::Session::Driver::BEGIN@6 |
| 1 | 1 | 1 | 6µs | 6µs | CGI::Session::Driver::BEGIN@7 |
| 0 | 0 | 0 | 0s | 0s | CGI::Session::Driver::dump |
| 0 | 0 | 0 | 0s | 0s | CGI::Session::Driver::init |
| 0 | 0 | 0 | 0s | 0s | CGI::Session::Driver::remove |
| 0 | 0 | 0 | 0s | 0s | CGI::Session::Driver::retrieve |
| 0 | 0 | 0 | 0s | 0s | CGI::Session::Driver::store |
| 0 | 0 | 0 | 0s | 0s | CGI::Session::Driver::traverse |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package CGI::Session::Driver; | ||||
| 2 | |||||
| 3 | 2 | 34µs | 2 | 26µs | # spent 20µs (13+7) within CGI::Session::Driver::BEGIN@3 which was called:
# once (13µs+7µs) by CGI::Session::Driver::DBI::BEGIN@9 at line 3 # spent 20µs making 1 call to CGI::Session::Driver::BEGIN@3
# spent 6µs making 1 call to strict::import |
| 4 | # | ||||
| 5 | |||||
| 6 | 2 | 47µs | 2 | 49µs | # spent 28µs (7+21) within CGI::Session::Driver::BEGIN@6 which was called:
# once (7µs+21µs) by CGI::Session::Driver::DBI::BEGIN@9 at line 6 # spent 28µs making 1 call to CGI::Session::Driver::BEGIN@6
# spent 21µs making 1 call to Exporter::import |
| 7 | 2 | 258µs | 1 | 6µs | # spent 6µs within CGI::Session::Driver::BEGIN@7 which was called:
# once (6µs+0s) by CGI::Session::Driver::DBI::BEGIN@9 at line 7 # spent 6µs making 1 call to CGI::Session::Driver::BEGIN@7 |
| 8 | |||||
| 9 | 1 | 700ns | $CGI::Session::Driver::VERSION = '4.43'; | ||
| 10 | 1 | 9µs | @CGI::Session::Driver::ISA = qw(CGI::Session::ErrorHandler); | ||
| 11 | |||||
| 12 | # spent 61µs (23+38) within CGI::Session::Driver::new which was called 2 times, avg 30µs/call:
# 2 times (23µs+38µs) by CGI::Session::_driver at line 117 of CGI/Session.pm, avg 30µs/call | ||||
| 13 | 2 | 600ns | my $class = shift; | ||
| 14 | 2 | 800ns | my $args = shift || {}; | ||
| 15 | |||||
| 16 | 2 | 900ns | unless ( ref $args ) { | ||
| 17 | croak "$class->new(): Invalid argument type passed to driver"; | ||||
| 18 | } | ||||
| 19 | |||||
| 20 | # Set defaults. | ||||
| 21 | |||||
| 22 | 2 | 2µs | if (! $args->{TableName}) { | ||
| 23 | $args->{TableName} = 'sessions'; | ||||
| 24 | } | ||||
| 25 | |||||
| 26 | 2 | 1µs | if (! $args->{IdColName}) { | ||
| 27 | $args->{IdColName} = 'id'; | ||||
| 28 | } | ||||
| 29 | |||||
| 30 | 2 | 1µs | if (! $args->{DataColName}) { | ||
| 31 | $args->{DataColName} = 'a_session'; | ||||
| 32 | } | ||||
| 33 | |||||
| 34 | # perform a shallow copy of $args, to prevent modification | ||||
| 35 | 2 | 7µs | my $self = bless ({%$args}, $class); | ||
| 36 | 2 | 16µs | 2 | 38µs | return $self if $self->init(); # spent 38µs making 2 calls to CGI::Session::Driver::mysql::init, avg 19µs/call |
| 37 | return $self->set_error( "$class->init() returned false"); | ||||
| 38 | } | ||||
| 39 | |||||
| 40 | sub init { 1 } | ||||
| 41 | |||||
| 42 | sub retrieve { | ||||
| 43 | croak "retrieve(): " . ref($_[0]) . " failed to implement this method!"; | ||||
| 44 | } | ||||
| 45 | |||||
| 46 | sub store { | ||||
| 47 | croak "store(): " . ref($_[0]) . " failed to implement this method!"; | ||||
| 48 | } | ||||
| 49 | |||||
| 50 | sub remove { | ||||
| 51 | croak "remove(): " . ref($_[0]) . " failed to implement this method!"; | ||||
| 52 | } | ||||
| 53 | |||||
| 54 | sub traverse { | ||||
| 55 | croak "traverse(): " . ref($_[0]) . " failed to implement this method!"; | ||||
| 56 | } | ||||
| 57 | |||||
| 58 | sub dump { | ||||
| 59 | require Data::Dumper; | ||||
| 60 | my $d = Data::Dumper->new([$_[0]], [ref $_[0]]); | ||||
| 61 | return $d->Dump; | ||||
| 62 | } | ||||
| 63 | |||||
| 64 | |||||
| 65 | 1 | 4µs | 1; | ||
| 66 | |||||
| 67 | __END__; |