line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Hub::Data::Subset; |
2
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
44
|
|
3
|
1
|
|
|
1
|
|
5
|
use Hub qw/:lib/; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
6
|
|
4
|
|
|
|
|
|
|
our $VERSION = '4.00043'; |
5
|
|
|
|
|
|
|
our @EXPORT = qw//; |
6
|
|
|
|
|
|
|
our @EXPORT_OK = qw//; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
10
|
0
|
|
0
|
|
|
|
my $class = ref($self) || $self; |
11
|
0
|
|
|
|
|
|
my $object = bless [], $class; |
12
|
0
|
|
|
|
|
|
push @$object, @_; |
13
|
0
|
|
|
|
|
|
return $object; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub get_data { |
17
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
18
|
0
|
|
|
|
|
|
my $index = shift; |
19
|
0
|
0
|
|
|
|
|
croak "Illegal call to instance method" unless ref($self); |
20
|
0
|
|
|
|
|
|
Hub::subset($self, $index); |
21
|
|
|
|
|
|
|
#warn "refining: $index ?? $item\n"; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub get_content { |
25
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
26
|
0
|
|
|
|
|
|
my $index = shift; |
27
|
0
|
0
|
|
|
|
|
croak "Illegal call to instance method" unless ref($self); |
28
|
0
|
|
|
|
|
|
return @$self; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------ |
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
__END__ |