Filename | /usr/local/src/github.com/foswiki/core/lib/Foswiki/Infix/Error.pm |
Statements | Executed 8 statements in 333µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 25µs | 32µs | BEGIN@13 | Foswiki::Infix::Error::
1 | 1 | 1 | 17µs | 35µs | BEGIN@14 | Foswiki::Infix::Error::
1 | 1 | 1 | 9µs | 9µs | BEGIN@16 | Foswiki::Infix::Error::
0 | 0 | 0 | 0s | 0s | new | Foswiki::Infix::Error::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # See bottom of file for license and copyright information | ||||
2 | |||||
3 | =begin TML | ||||
4 | |||||
5 | ---+ package Foswiki::Infix::Error | ||||
6 | |||||
7 | Class of errors used with Foswiki::Infix::Parser | ||||
8 | |||||
9 | =cut | ||||
10 | |||||
11 | package Foswiki::Infix::Error; | ||||
12 | |||||
13 | 2 | 45µs | 2 | 40µs | # spent 32µs (25+7) within Foswiki::Infix::Error::BEGIN@13 which was called:
# once (25µs+7µs) by Foswiki::Search::BEGIN@26 at line 13 # spent 32µs making 1 call to Foswiki::Infix::Error::BEGIN@13
# spent 7µs making 1 call to strict::import |
14 | 2 | 44µs | 2 | 53µs | # spent 35µs (17+18) within Foswiki::Infix::Error::BEGIN@14 which was called:
# once (17µs+18µs) by Foswiki::Search::BEGIN@26 at line 14 # spent 35µs making 1 call to Foswiki::Infix::Error::BEGIN@14
# spent 18µs making 1 call to warnings::import |
15 | |||||
16 | 2 | 221µs | 1 | 9µs | # spent 9µs within Foswiki::Infix::Error::BEGIN@16 which was called:
# once (9µs+0s) by Foswiki::Search::BEGIN@26 at line 16 # spent 9µs making 1 call to Foswiki::Infix::Error::BEGIN@16 |
17 | 1 | 16µs | our @ISA = ('Error'); | ||
18 | |||||
19 | sub new { | ||||
20 | my ( $class, $message, $expr, $at ) = @_; | ||||
21 | if ( defined $expr && length($expr) ) { | ||||
22 | $message .= " in '$expr'"; | ||||
23 | } | ||||
24 | if ( defined $at && length($at) ) { | ||||
25 | $message .= " at '$at'"; | ||||
26 | } | ||||
27 | return $class->SUPER::new( | ||||
28 | -text => $message, | ||||
29 | -file => 'dummy', | ||||
30 | -line => 'dummy' | ||||
31 | ); | ||||
32 | } | ||||
33 | |||||
34 | 1 | 6µs | 1; | ||
35 | __END__ |