File Coverage

blib/lib/StackTrace/HiPerf.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 16 100.0


line stmt bran cond sub pod time code
1             package StackTrace::HiPerf;
2              
3 1     1   523 use 5.008;
  1         34  
  1         44  
4 1     1   5 use strict;
  1         2  
  1         32  
5 1     1   5 use warnings;
  1         5  
  1         33  
6 1     1   6 use XSLoader;
  1         2  
  1         72  
7              
8             =head1 NAME
9              
10             StackTrace::HiPerf - High performance stacktraces
11              
12             =head1 VERSION
13              
14             0.01
15              
16             =cut
17              
18             our $VERSION = '0.01';
19              
20             =head1 SYNOPSIS
21              
22             use StackTrace::HiPerf;
23             my $trace = StackTrace::HiPerf::trace();
24              
25             =head1 DESCRIPTION
26              
27             This module's purpose is to provide the most efficient way to generate a
28             stacktrace. The traces it generates are delimited strings. Each entry
29             contains the line number and the file name of the sub or eval invocation.
30              
31             An example trace could look like this "79|Foo.pm||34|Bar.pm||56|Baz.pm||".
32              
33             As its implemented now this module isn't very flexible or general purpose.
34             If generalizing it proves useful then that may happen in the future.
35              
36             =head1 FUNCTIONS
37              
38             =over
39              
40             =item trace
41              
42             Returns the current stack trace in string form. Takes an optional
43             integer argument indicating at which stack level to start the trace.
44              
45             =back
46              
47             =cut
48              
49             XSLoader::load( 'StackTrace::HiPerf', $VERSION );
50              
51             =head1 AUTHOR
52              
53             Justin DeVuyst, C
54              
55             =head1 COPYRIGHT AND LICENSE
56              
57             Copyright 2009 by Justin DeVuyst.
58              
59             This library is free software, you can redistribute it and/or modify it under
60             the same terms as Perl itself.
61              
62             =cut
63              
64             1;