| Filename | /home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/5.13.5/autodie.pm |
| Statements | Executed 17 statements in 507µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 4.24ms | 17.5ms | autodie::BEGIN@6 |
| 1 | 1 | 1 | 38µs | 38µs | autodie::BEGIN@2 |
| 1 | 1 | 1 | 13µs | 102µs | autodie::BEGIN@14 |
| 1 | 1 | 1 | 11µs | 16µs | autodie::BEGIN@3 |
| 1 | 1 | 1 | 10µs | 19µs | autodie::BEGIN@4 |
| 1 | 1 | 1 | 7µs | 7µs | autodie::import |
| 1 | 1 | 1 | 6µs | 6µs | autodie::BEGIN@10 |
| 1 | 1 | 1 | 6µs | 6µs | autodie::BEGIN@35 |
| 0 | 0 | 0 | 0s | 0s | autodie::unimport |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package autodie; | ||||
| 2 | 2 | 42µs | 1 | 38µs | # spent 38µs within autodie::BEGIN@2 which was called:
# once (38µs+0s) by Hailo::BEGIN@10 at line 2 # spent 38µs making 1 call to autodie::BEGIN@2 |
| 3 | 2 | 23µs | 2 | 21µs | # spent 16µs (11+5) within autodie::BEGIN@3 which was called:
# once (11µs+5µs) by Hailo::BEGIN@10 at line 3 # spent 16µs making 1 call to autodie::BEGIN@3
# spent 5µs making 1 call to strict::import |
| 4 | 2 | 23µs | 2 | 28µs | # spent 19µs (10+9) within autodie::BEGIN@4 which was called:
# once (10µs+9µs) by Hailo::BEGIN@10 at line 4 # spent 19µs making 1 call to autodie::BEGIN@4
# spent 9µs making 1 call to warnings::import |
| 5 | |||||
| 6 | 2 | 174µs | 1 | 17.5ms | # spent 17.5ms (4.24+13.3) within autodie::BEGIN@6 which was called:
# once (4.24ms+13.3ms) by Hailo::BEGIN@10 at line 6 # spent 17.5ms making 1 call to autodie::BEGIN@6 |
| 7 | 1 | 7µs | our @ISA = qw(Fatal); | ||
| 8 | 1 | 1µs | our $VERSION; | ||
| 9 | |||||
| 10 | # spent 6µs within autodie::BEGIN@10 which was called:
# once (6µs+0s) by Hailo::BEGIN@10 at line 12 | ||||
| 11 | 1 | 6µs | $VERSION = '2.10'; | ||
| 12 | 1 | 31µs | 1 | 6µs | } # spent 6µs making 1 call to autodie::BEGIN@10 |
| 13 | |||||
| 14 | 1 | 90µs | # spent 102µs (13+90) within autodie::BEGIN@14 which was called:
# once (13µs+90µs) by Hailo::BEGIN@10 at line 29 # spent 90µs making 1 call to constant::import | ||
| 15 | Incorrect version of Fatal.pm loaded by autodie. | ||||
| 16 | |||||
| 17 | The autodie pragma uses an updated version of Fatal to do its | ||||
| 18 | heavy lifting. We seem to have loaded Fatal version %s, which is | ||||
| 19 | probably the version that came with your version of Perl. However | ||||
| 20 | autodie needs version %s, which would have come bundled with | ||||
| 21 | autodie. | ||||
| 22 | |||||
| 23 | You may be able to solve this problem by adding the following | ||||
| 24 | line of code to your main program, before any use of Fatal or | ||||
| 25 | autodie. | ||||
| 26 | |||||
| 27 | use lib "%s"; | ||||
| 28 | |||||
| 29 | 2 | 88µs | 1 | 102µs | }; # spent 102µs making 1 call to autodie::BEGIN@14 |
| 30 | |||||
| 31 | # We have to check we've got the right version of Fatal before we | ||||
| 32 | # try to compile the rest of our code, lest we use a constant | ||||
| 33 | # that doesn't exist. | ||||
| 34 | |||||
| 35 | # spent 6µs within autodie::BEGIN@35 which was called:
# once (6µs+0s) by Hailo::BEGIN@10 at line 51 | ||||
| 36 | |||||
| 37 | # If we have the wrong Fatal, then we've probably loaded the system | ||||
| 38 | # one, not our own. Complain, and give a useful hint. ;) | ||||
| 39 | |||||
| 40 | 1 | 6µs | if ($Fatal::VERSION ne $VERSION) { | ||
| 41 | my $autodie_path = $INC{'autodie.pm'}; | ||||
| 42 | |||||
| 43 | $autodie_path =~ s/autodie\.pm//; | ||||
| 44 | |||||
| 45 | require Carp; | ||||
| 46 | |||||
| 47 | Carp::croak sprintf( | ||||
| 48 | ERROR_WRONG_FATAL, $Fatal::VERSION, $VERSION, $autodie_path | ||||
| 49 | ); | ||||
| 50 | } | ||||
| 51 | 1 | 88µs | 1 | 6µs | } # spent 6µs making 1 call to autodie::BEGIN@35 |
| 52 | |||||
| 53 | # When passing args to Fatal we want to keep the first arg | ||||
| 54 | # (our package) in place. Hence the splice. | ||||
| 55 | |||||
| 56 | # spent 7µs within autodie::import which was called:
# once (7µs+0s) by Hailo::BEGIN@10 at line 10 of Hailo.pm | ||||
| 57 | 2 | 11µs | splice(@_,1,0,Fatal::LEXICAL_TAG); | ||
| 58 | 1 | 2.72ms | goto &Fatal::import; # spent 2.72ms making 1 call to Fatal::import | ||
| 59 | } | ||||
| 60 | |||||
| 61 | sub unimport { | ||||
| 62 | splice(@_,1,0,Fatal::LEXICAL_TAG); | ||||
| 63 | goto &Fatal::unimport; | ||||
| 64 | } | ||||
| 65 | |||||
| 66 | 1 | 4µs | 1; | ||
| 67 | |||||
| 68 | __END__ |