line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- mode: perl; -*- |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Base object for the Gnumeric spreadsheet reader. |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# Documentation below "__END__". |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# [created. -- rgr, 6-Feb-23.] |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
package Spreadsheet::Gnumeric::Base; |
11
|
|
|
|
|
|
|
|
12
|
3
|
|
|
3
|
|
1037
|
use 5.010; |
|
3
|
|
|
|
|
10
|
|
13
|
|
|
|
|
|
|
|
14
|
3
|
|
|
3
|
|
12
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
46
|
|
15
|
3
|
|
|
3
|
|
10
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
172
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our $VERSION = '0.2'; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub define_instance_accessors { |
20
|
6
|
|
|
6
|
1
|
24
|
my ($class, @accessors) = @_; |
21
|
|
|
|
|
|
|
|
22
|
3
|
|
|
3
|
|
19
|
no strict 'refs'; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
501
|
|
23
|
6
|
|
|
|
|
37
|
for my $method (@accessors) { |
24
|
60
|
|
|
|
|
109
|
my $field = '_' . $method; |
25
|
60
|
|
|
|
|
853
|
*{$class . '::' . $method} = sub { |
26
|
155175
|
|
|
155175
|
|
183846
|
my $self = shift; |
27
|
155175
|
100
|
|
|
|
389788
|
@_ ? $self->{$field} = shift : $self->{$field}; |
28
|
60
|
|
|
|
|
155
|
}; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub new { |
33
|
120
|
|
|
120
|
1
|
368
|
my ($class, @options) = @_; |
34
|
|
|
|
|
|
|
|
35
|
120
|
|
|
|
|
263
|
my $self = bless({ }, $class); |
36
|
120
|
|
|
|
|
269
|
while (@options) { |
37
|
558
|
|
|
|
|
943
|
my ($slot, $value) = (shift(@options), shift(@options)); |
38
|
558
|
50
|
|
|
|
1564
|
$self->$slot($value) |
39
|
|
|
|
|
|
|
if $self->can($slot); |
40
|
|
|
|
|
|
|
} |
41
|
120
|
|
|
|
|
252
|
return $self; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |