blib/lib/ORLite/Statistics.pm

filter: Statementstmt 78.5% 22 / 28 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 6 / 8 Podpod 100% 1 / 1 totaltotal 78.3% 29 / 37 CC 1 SCAR 2.2
CC
1
Cov
79%
vector
2.0
__ANON__
2.0
BEGIN
1.0
CRAP 1.2
↑ Summary
1 package ORLite::Statistics;
2  
3 =pod
4  
5 =head1 NAME
6  
7 ORLite::Statistics - Statistics enhancement package for ORLite
8  
9 =head1 DESCRIPTION
10  
11 This is an enhancement module for ORLite table classes, designed to provide
12 easy integration with the L<Statistics::Base> module.
13  
14 =head1 METHODS
15  
16 =cut
17  
18 1 ▶use 5.008;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 1 ▶use Exporter ();
Subroutine BEGIN: called CC=1 SCAR=0.0
22 1 ▶use ORLite 1.25 ();
Subroutine BEGIN: called CC=1 SCAR=0.0
23 1 ▶use Statistics::Basic 1.6600;
Subroutine BEGIN: called CC=1 SCAR=0.0
24  
25 1 our $VERSION = '0.03';
26 1 our @ISA = 'Exporter';
27 1 our @EXPORT = 'vector';
28 1 our @EXPORT_OK = 'vector';
29  
30 =pod
31  
32 =head2 vector
33  
34 my $ages = MyModule::TableName->vector('age');
35  
36 Generates a L<Statistics::Basic::Vector> for a particular method.
37  
38 =cut
39  
40 0 ▶sub vector {
Subroutine vector: not called CC=1 SCAR=6.9
Pod documented
41 0 my $class = shift;
42 0 my $method = shift;
43  
44 # Generate the vector
45 0 my @vector = ();
46 0 ▶ $class->iterate( @_, sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
47 0 push @vector, $_->$method();
48 0 } );
49  
50 0 Statistics::Basic::vector(\@vector);
51 }
52  
53 1 1;
54  
55 =pod
56  
57 =head1 SUPPORT
58  
59 Bugs should be reported via the CPAN bug tracker at
60  
61 L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ORLite-Statistics>
62  
63 For other issues, contact the author.
64  
65 =head1 AUTHOR
66  
67 Adam Kennedy E<lt>adamk@cpan.orgE<gt>
68  
69 =head1 SEE ALSO
70  
71 L<ORLite>, L<ORLite::Mirror>
72  
73 =head1 COPYRIGHT
74  
75 Copyright 2009 Adam Kennedy.
76  
77 This program is free software; you can redistribute
78 it and/or modify it under the same terms as Perl itself.
79  
80 The full text of the license can be found in the
81 LICENSE file included with this module.
82  
83 =cut
↑ Summary