line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CAD::AutoCAD::Version; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
75831
|
use strict; |
|
5
|
|
|
|
|
33
|
|
|
5
|
|
|
|
|
142
|
|
4
|
5
|
|
|
5
|
|
25
|
use warnings; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
141
|
|
5
|
|
|
|
|
|
|
|
6
|
5
|
|
|
5
|
|
2397
|
use Class::Utils qw(set_params); |
|
5
|
|
|
|
|
144892
|
|
|
5
|
|
|
|
|
98
|
|
7
|
5
|
|
|
5
|
|
355
|
use Readonly; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
1642
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# Constants. |
10
|
|
|
|
|
|
|
# Based on https://autodesk.blogs.com/between_the_lines/autocad-release-history.html |
11
|
|
|
|
|
|
|
Readonly::Hash my %ACADVER => ( |
12
|
|
|
|
|
|
|
# ACADVER => Version of AutoCAD |
13
|
|
|
|
|
|
|
'MC0.0' => 'Version 1.0', |
14
|
|
|
|
|
|
|
'AC1.2' => 'Version 1.2', |
15
|
|
|
|
|
|
|
'AC1.40' => 'Version 1.40', |
16
|
|
|
|
|
|
|
'AC1.50' => 'Version 2.05', |
17
|
|
|
|
|
|
|
'AC2.10' => 'Version 2.10', |
18
|
|
|
|
|
|
|
'AC2.21' => 'Version 2.21', |
19
|
|
|
|
|
|
|
'AC2.22' => 'Version 2.22', |
20
|
|
|
|
|
|
|
'AC1001' => 'Version 2.22', |
21
|
|
|
|
|
|
|
'AC1002' => 'Version 2.50', |
22
|
|
|
|
|
|
|
'AC1003' => 'Version 2.60', |
23
|
|
|
|
|
|
|
'AC1004' => 'Release 9', |
24
|
|
|
|
|
|
|
'AC1006' => 'Release 10', |
25
|
|
|
|
|
|
|
'AC1009' => 'Release 11/12', |
26
|
|
|
|
|
|
|
'AC1012' => 'Release 13', |
27
|
|
|
|
|
|
|
'AC1014' => 'Release 14', |
28
|
|
|
|
|
|
|
'AC1015' => 'AutoCAD 2000/2000i/2002', |
29
|
|
|
|
|
|
|
'AC1018' => 'AutoCAD 2004/2005/2006', |
30
|
|
|
|
|
|
|
'AC1021' => 'AutoCAD 2007/2008/2009', |
31
|
|
|
|
|
|
|
'AC1024' => 'AutoCAD 2010/2011/2012', |
32
|
|
|
|
|
|
|
'AC1027' => 'AutoCAD 2013/2014/2015/2016/2017', |
33
|
|
|
|
|
|
|
'AC1032' => 'AutoCAD 2018/2019/2020', |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
our $VERSION = 0.03; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# Constructor. |
39
|
|
|
|
|
|
|
sub new { |
40
|
5
|
|
|
5
|
1
|
5033
|
my ($class, @params) = @_; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
# Create object. |
43
|
5
|
|
|
|
|
17
|
my $self = bless {}, $class; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
# Process params. |
46
|
5
|
|
|
|
|
27
|
set_params($self, @params); |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# Object. |
49
|
3
|
|
|
|
|
29
|
return $self; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub list_of_acad_identifiers { |
53
|
1
|
|
|
1
|
1
|
6
|
my $self = shift; |
54
|
|
|
|
|
|
|
|
55
|
1
|
|
|
|
|
10
|
return keys %ACADVER; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub list_of_acad_identifiers_real { |
59
|
1
|
|
|
1
|
1
|
6
|
my $self = shift; |
60
|
|
|
|
|
|
|
|
61
|
1
|
|
|
|
|
7
|
my @mcs = sort grep { $_ =~ m/^MC/ms } keys %ACADVER; |
|
21
|
|
|
|
|
115
|
|
62
|
1
|
|
|
|
|
6
|
my @ac_dot = sort grep { $_ =~ m/^AC\d+\.\d+$/ms } keys %ACADVER; |
|
21
|
|
|
|
|
103
|
|
63
|
1
|
|
|
|
|
6
|
my @ac = sort grep { $_ =~ m/^AC\d+$/ms } keys %ACADVER; |
|
21
|
|
|
|
|
107
|
|
64
|
|
|
|
|
|
|
|
65
|
1
|
|
|
|
|
7
|
my @ids = (@mcs, @ac_dot, @ac); |
66
|
|
|
|
|
|
|
|
67
|
1
|
|
|
|
|
6
|
return @ids; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
1; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
__END__ |