line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
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 module. |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 METHODS |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=cut |
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
1
|
|
772
|
use 5.008; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
38
|
|
19
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
32
|
|
20
|
1
|
|
|
1
|
|
12
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
21
|
1
|
|
|
1
|
|
4
|
use Exporter (); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
15
|
|
22
|
1
|
|
|
1
|
|
981
|
use ORLite 1.25 (); |
|
1
|
|
|
|
|
50491
|
|
|
1
|
|
|
|
|
37
|
|
23
|
1
|
|
|
1
|
|
781
|
use Statistics::Basic 1.6600; |
|
1
|
|
|
|
|
16529
|
|
|
1
|
|
|
|
|
8
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
26
|
|
|
|
|
|
|
our @ISA = 'Exporter'; |
27
|
|
|
|
|
|
|
our @EXPORT = 'vector'; |
28
|
|
|
|
|
|
|
our @EXPORT_OK = 'vector'; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=pod |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head2 vector |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
my $ages = MyModule::TableName->vector('age'); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Generates a L for a particular method. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=cut |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub vector { |
41
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
42
|
0
|
|
|
|
|
|
my $method = shift; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# Generate the vector |
45
|
0
|
|
|
|
|
|
my @vector = (); |
46
|
|
|
|
|
|
|
$class->iterate( @_, sub { |
47
|
0
|
|
|
0
|
|
|
push @vector, $_->$method(); |
48
|
0
|
|
|
|
|
|
} ); |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
Statistics::Basic::vector(\@vector); |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=pod |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 SUPPORT |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Bugs should be reported via the CPAN bug tracker at |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
L |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
For other issues, contact the author. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 AUTHOR |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Adam Kennedy Eadamk@cpan.orgE |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 SEE ALSO |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
L, L |
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 |