-
Notifications
You must be signed in to change notification settings - Fork 98
/
Copy pathkh_morpho.pm
59 lines (48 loc) · 946 Bytes
/
kh_morpho.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package kh_morpho;
use kh_morpho::win32;
use kh_morpho::linux;
use kh_project;
use kh_sysconfig;
use kh_dictio;
use strict;
#--------------------#
# ·ÁÂÖÁDzòÀÏ¼Â¹Ô #
#--------------------#
sub run{
my $class = shift;
$class .= '::'.$::config_obj->os;
my %args = @_;
my $self = {
t_obj => $::project_obj,
target => $::config_obj->os_path( $::project_obj->file_MorphoIn ),
output => $::config_obj->os_path( $::project_obj->file_MorphoOut ),
config => $::config_obj,
};
bless $self, $class;
if (-s $self->target == 0 ) {
gui_errormsg->open(
msg => kh_msg->get('error_empty'), # Error: the target file is empty.
type => 'msg'
);
return 0;
}
$self->_run;
return(1);
}
sub target{
my $self = shift;
return($self->{target});
}
sub output{
my $self = shift;
return($self->{output});
}
sub t_obj{
my $self = shift;
return($self->{t_obj});
}
sub config{
my $self = shift;
return($self->{config});
}
1;