line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ORLite::PDL; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# See POD at the end of the file for documentation |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
1014
|
use 5.006; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
43
|
|
6
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
38
|
|
7
|
1
|
|
|
1
|
|
16
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
51
|
|
8
|
1
|
|
|
1
|
|
7
|
use Carp (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
9
|
1
|
|
|
1
|
|
1150
|
use Params::Util 1.00 (); |
|
1
|
|
|
|
|
3027
|
|
|
1
|
|
|
|
|
30
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# Load both the main and statistics PDL packages |
12
|
1
|
|
|
1
|
|
569
|
use PDL 2.004005; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
use PDL::Stats 0.003002; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub import { |
18
|
|
|
|
|
|
|
my $class = shift; |
19
|
|
|
|
|
|
|
my $params = Params::Util::_HASHLIKE($_[0]) ? $_[0] |
20
|
|
|
|
|
|
|
: { package => scalar(caller()) }; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# Verify the caller is an ORLite package |
23
|
|
|
|
|
|
|
unless ( Params::Util::_CLASS($params->{package}) ) { |
24
|
|
|
|
|
|
|
Carp::croak("Missing or invalid ORLite package name"); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
unless ( $params->{package}->can('orlite') ) { |
27
|
|
|
|
|
|
|
Carp::croak("$params->{package} does not appear to be an ORLite root class"); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# Add the additional DBI-like root method |
31
|
|
|
|
|
|
|
eval <<"END_PERL"; die $@ if $@; |
32
|
|
|
|
|
|
|
package $params->{package}; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub selectcol_pdl { |
35
|
|
|
|
|
|
|
my \$class = shift; |
36
|
|
|
|
|
|
|
my \$array = \$class->selectcol_arrayref(\@_); |
37
|
|
|
|
|
|
|
ORLite::PDL::pdl( \$array ); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
END_PERL |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
return 1; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
__END__ |