line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CAD::AutoCAD::Version; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
73908
|
use strict; |
|
5
|
|
|
|
|
35
|
|
|
5
|
|
|
|
|
144
|
|
4
|
5
|
|
|
5
|
|
27
|
use warnings; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
138
|
|
5
|
|
|
|
|
|
|
|
6
|
5
|
|
|
5
|
|
2355
|
use Class::Utils qw(set_params); |
|
5
|
|
|
|
|
144473
|
|
|
5
|
|
|
|
|
119
|
|
7
|
5
|
|
|
5
|
|
380
|
use Readonly; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
1828
|
|
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.22', |
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' => '??', |
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
|
|
|
|
|
|
|
); |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
our $VERSION = 0.04; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
# Constructor. |
55
|
|
|
|
|
|
|
sub new { |
56
|
5
|
|
|
5
|
1
|
5156
|
my ($class, @params) = @_; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
# Create object. |
59
|
5
|
|
|
|
|
17
|
my $self = bless {}, $class; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
# Process params. |
62
|
5
|
|
|
|
|
27
|
set_params($self, @params); |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
# Object. |
65
|
3
|
|
|
|
|
28
|
return $self; |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub list_of_acad_identifiers { |
69
|
1
|
|
|
1
|
1
|
5
|
my $self = shift; |
70
|
|
|
|
|
|
|
|
71
|
1
|
|
|
|
|
8
|
return keys %ACADVER; |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub list_of_acad_identifiers_real { |
75
|
1
|
|
|
1
|
1
|
5
|
my $self = shift; |
76
|
|
|
|
|
|
|
|
77
|
1
|
|
|
|
|
9
|
my @mcs = sort grep { $_ =~ m/^MC/ms } keys %ACADVER; |
|
37
|
|
|
|
|
178
|
|
78
|
1
|
|
|
|
|
9
|
my @ac_dot = sort grep { $_ =~ m/^AC\d+\.\d+$/ms } keys %ACADVER; |
|
37
|
|
|
|
|
167
|
|
79
|
1
|
|
|
|
|
8
|
my @ac = sort grep { $_ =~ m/^AC\d+$/ms } keys %ACADVER; |
|
37
|
|
|
|
|
182
|
|
80
|
|
|
|
|
|
|
|
81
|
1
|
|
|
|
|
9
|
my @ids = (@mcs, @ac_dot, @ac); |
82
|
|
|
|
|
|
|
|
83
|
1
|
|
|
|
|
9
|
return @ids; |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
1; |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
__END__ |