line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyrights 2023 by [Mark Overmeer <markov@cpan.org>]. |
2
|
|
|
|
|
|
|
# For other contributors see ChangeLog. |
3
|
|
|
|
|
|
|
# See the manual pages for details on the licensing terms. |
4
|
|
|
|
|
|
|
# Pod stripped from pm file by OODoc 2.03. |
5
|
|
|
|
|
|
|
package Math::Formula::Config; |
6
|
1
|
|
|
1
|
|
824
|
use vars '$VERSION'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
7
|
|
|
|
|
|
|
$VERSION = '0.16'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
18
|
|
11
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
16
|
|
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
12
|
use File::Spec (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
17
|
|
14
|
1
|
|
|
1
|
|
4
|
use Log::Report 'math-formula'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
0
|
1
|
|
sub new(%) { my $class = shift; (bless {}, $class)->init({@_}) } |
|
0
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub init($) |
20
|
0
|
|
|
0
|
0
|
|
{ my ($self, $args) = @_; |
21
|
|
|
|
|
|
|
my $dir = $self->{MFC_dir} = $args->{directory} |
22
|
0
|
0
|
|
|
|
|
or error __x"Save directory required"; |
23
|
|
|
|
|
|
|
|
24
|
0
|
0
|
|
|
|
|
-d $dir |
25
|
|
|
|
|
|
|
or error __x"Save directory '{dir}' does not exist", dir => $dir; |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
$self; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
#---------------------- |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
0
|
1
|
|
sub directory { $_[0]->{MFC_dir} } |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub path_for($$) |
36
|
0
|
|
|
0
|
1
|
|
{ my ($self, $file) = @_; |
37
|
0
|
|
|
|
|
|
File::Spec->catfile($self->directory, $file); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
#---------------------- |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
0
|
1
|
|
sub save($%) { die "Save under construction" } |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
0
|
|
|
0
|
1
|
|
sub load($%) { die "Load under construction" } |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |