line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CAD::AutoCAD::Version; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
78814
|
use strict; |
|
5
|
|
|
|
|
37
|
|
|
5
|
|
|
|
|
151
|
|
4
|
5
|
|
|
5
|
|
27
|
use warnings; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
143
|
|
5
|
|
|
|
|
|
|
|
6
|
5
|
|
|
5
|
|
2622
|
use Class::Utils qw(set_params); |
|
5
|
|
|
|
|
162499
|
|
|
5
|
|
|
|
|
105
|
|
7
|
5
|
|
|
5
|
|
404
|
use Readonly; |
|
5
|
|
|
|
|
13
|
|
|
5
|
|
|
|
|
1960
|
|
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.3' => 'Version 1.3', |
16
|
|
|
|
|
|
|
'AC1.40' => 'Version 1.40', |
17
|
|
|
|
|
|
|
'AC1.50' => 'Version 2.05', |
18
|
|
|
|
|
|
|
'AC2.10' => 'Version 2.10', |
19
|
|
|
|
|
|
|
'AC2.21' => 'Version 2.21', |
20
|
|
|
|
|
|
|
'AC2.22' => 'Version 2.22', |
21
|
|
|
|
|
|
|
'AC1001' => 'Version 2.40', |
22
|
|
|
|
|
|
|
'AC1002' => 'Version 2.50', |
23
|
|
|
|
|
|
|
'AC1003' => 'Version 2.60', |
24
|
|
|
|
|
|
|
'AC1004' => 'Release 9', |
25
|
|
|
|
|
|
|
'AC1006' => 'Release 10', |
26
|
|
|
|
|
|
|
'AC1009' => 'Release 11/12', |
27
|
|
|
|
|
|
|
'AC1012' => 'Release 13', |
28
|
|
|
|
|
|
|
'AC1013' => 'Release 13c3', |
29
|
|
|
|
|
|
|
'AC1014' => 'Release 14', |
30
|
|
|
|
|
|
|
'AC1015' => 'AutoCAD 2000', |
31
|
|
|
|
|
|
|
'AC1016' => 'AutoCAD 2000i', |
32
|
|
|
|
|
|
|
'AC1017' => 'AutoCAD 2002', |
33
|
|
|
|
|
|
|
'AC1018' => 'AutoCAD 2004', |
34
|
|
|
|
|
|
|
'AC1019' => 'AutoCAD 2005', |
35
|
|
|
|
|
|
|
'AC1020' => 'AutoCAD 2006', |
36
|
|
|
|
|
|
|
'AC1021' => 'AutoCAD 2007', |
37
|
|
|
|
|
|
|
'AC1022' => 'AutoCAD 2008', |
38
|
|
|
|
|
|
|
'AC1023' => 'AutoCAD 2009', |
39
|
|
|
|
|
|
|
'AC1024' => 'AutoCAD 2010', |
40
|
|
|
|
|
|
|
'AC1025' => 'AutoCAD 2011', |
41
|
|
|
|
|
|
|
'AC1026' => 'AutoCAD 2012', |
42
|
|
|
|
|
|
|
'AC1027' => 'AutoCAD 2013', |
43
|
|
|
|
|
|
|
'AC1028' => 'AutoCAD 2014', |
44
|
|
|
|
|
|
|
'AC1029' => 'AutoCAD 2015', |
45
|
|
|
|
|
|
|
'AC1030' => 'AutoCAD 2016', |
46
|
|
|
|
|
|
|
'AC1031' => 'AutoCAD 2017', |
47
|
|
|
|
|
|
|
'AC1032' => 'AutoCAD 2018', |
48
|
|
|
|
|
|
|
'AC1033' => 'AutoCAD 2019', |
49
|
|
|
|
|
|
|
'AC1034' => 'AutoCAD 2020', |
50
|
|
|
|
|
|
|
'AC1035' => 'AutoCAD 2021', |
51
|
|
|
|
|
|
|
); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
our $VERSION = 0.05; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
# Constructor. |
56
|
|
|
|
|
|
|
sub new { |
57
|
5
|
|
|
5
|
1
|
5573
|
my ($class, @params) = @_; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
# Create object. |
60
|
5
|
|
|
|
|
19
|
my $self = bless {}, $class; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
# Process params. |
63
|
5
|
|
|
|
|
34
|
set_params($self, @params); |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
# Object. |
66
|
3
|
|
|
|
|
27
|
return $self; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub list_of_acad_identifiers { |
70
|
1
|
|
|
1
|
1
|
7
|
my $self = shift; |
71
|
|
|
|
|
|
|
|
72
|
1
|
|
|
|
|
9
|
return keys %ACADVER; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub list_of_acad_identifiers_real { |
76
|
1
|
|
|
1
|
1
|
6
|
my $self = shift; |
77
|
|
|
|
|
|
|
|
78
|
1
|
|
|
|
|
7
|
my @mcs = sort grep { $_ =~ m/^MC/ms } keys %ACADVER; |
|
38
|
|
|
|
|
227
|
|
79
|
1
|
|
|
|
|
11
|
my @ac_dot = sort grep { $_ =~ m/^AC\d+\.\d+$/ms } keys %ACADVER; |
|
38
|
|
|
|
|
178
|
|
80
|
1
|
|
|
|
|
8
|
my @ac = sort grep { $_ =~ m/^AC\d+$/ms } keys %ACADVER; |
|
38
|
|
|
|
|
190
|
|
81
|
|
|
|
|
|
|
|
82
|
1
|
|
|
|
|
10
|
my @ids = (@mcs, @ac_dot, @ac); |
83
|
|
|
|
|
|
|
|
84
|
1
|
|
|
|
|
9
|
return @ids; |
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
1; |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
__END__ |