line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# vim:ts=4 sw=4
|
2
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------------------------------
|
3
|
|
|
|
|
|
|
# Name : Class::STL::ClassMembers::Constructor.pm
|
4
|
|
|
|
|
|
|
# Created : 8 May 2006
|
5
|
|
|
|
|
|
|
# Author : Mario Gaffiero (gaffie)
|
6
|
|
|
|
|
|
|
#
|
7
|
|
|
|
|
|
|
# Copyright 2006-2007 Mario Gaffiero.
|
8
|
|
|
|
|
|
|
#
|
9
|
|
|
|
|
|
|
# This file is part of Class::STL::Containers(TM).
|
10
|
|
|
|
|
|
|
#
|
11
|
|
|
|
|
|
|
# Class::STL::Containers is free software; you can redistribute it and/or modify
|
12
|
|
|
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
13
|
|
|
|
|
|
|
# the Free Software Foundation; version 2 of the License.
|
14
|
|
|
|
|
|
|
#
|
15
|
|
|
|
|
|
|
# Class::STL::Containers is distributed in the hope that it will be useful,
|
16
|
|
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
17
|
|
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
18
|
|
|
|
|
|
|
# GNU General Public License for more details.
|
19
|
|
|
|
|
|
|
#
|
20
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
21
|
|
|
|
|
|
|
# along with Class::STL::Containers; if not, write to the Free Software
|
22
|
|
|
|
|
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
23
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------------------------------
|
24
|
|
|
|
|
|
|
# Modification History
|
25
|
|
|
|
|
|
|
# When Version Who What
|
26
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------------------------------
|
27
|
|
|
|
|
|
|
# TO DO:
|
28
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------------------------------
|
29
|
|
|
|
|
|
|
require 5.005_62;
|
30
|
11
|
|
|
11
|
|
65
|
use strict;
|
|
11
|
|
|
|
|
23
|
|
|
11
|
|
|
|
|
654
|
|
31
|
11
|
|
|
11
|
|
62
|
use warnings;
|
|
11
|
|
|
|
|
18
|
|
|
11
|
|
|
|
|
640
|
|
32
|
11
|
|
|
11
|
|
59
|
use vars qw($VERSION $BUILD);
|
|
11
|
|
|
|
|
20
|
|
|
11
|
|
|
|
|
811
|
|
33
|
|
|
|
|
|
|
$VERSION = '0.27';
|
34
|
|
|
|
|
|
|
$BUILD = 'Tuesday May 16 23:08:34 GMT 2006';
|
35
|
11
|
|
|
11
|
|
62
|
use Class::STL::ClassMembers::DataMember;
|
|
11
|
|
|
|
|
18
|
|
|
11
|
|
|
|
|
527
|
|
36
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------------------------------
|
37
|
|
|
|
|
|
|
{
|
38
|
|
|
|
|
|
|
package Class::STL::ClassMembers::Constructor;
|
39
|
11
|
|
|
|
|
492
|
use Class::STL::ClassMembers qw( _caller _trace ),
|
40
|
|
|
|
|
|
|
Class::STL::ClassMembers::DataMember->new(name => 'debug_on', default => 0),
|
41
|
|
|
|
|
|
|
Class::STL::ClassMembers::DataMember->new(name => 'singleton', default => 0),
|
42
|
11
|
|
|
11
|
|
450
|
Class::STL::ClassMembers::DataMember->new(name => 'ctor_name', default => 'new'); # OBSOLETE
|
|
11
|
|
|
|
|
21
|
|
43
|
11
|
|
|
11
|
|
62
|
use Carp qw(confess);
|
|
11
|
|
|
|
|
20
|
|
|
11
|
|
|
|
|
716
|
|
44
|
9
|
|
|
9
|
|
45
|
use Class::STL::Trace;
|
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
269
|
|
45
|
|
|
|
|
|
|
sub import
|
46
|
|
|
|
|
|
|
{
|
47
|
142
|
|
|
142
|
|
476
|
my $proto = shift;
|
48
|
142
|
|
33
|
|
|
534
|
my $class = ref($proto) || $proto;
|
49
|
142
|
|
|
|
|
269
|
my $self = {};
|
50
|
142
|
|
|
|
|
277
|
bless($self, $class);
|
51
|
142
|
|
|
|
|
3904
|
$self->members_init(@_, _caller => (caller())[0]);
|
52
|
142
|
|
|
|
|
490
|
$self->_trace(Class::STL::Trace->new());
|
53
|
142
|
50
|
|
|
|
2960
|
$self->_trace()->debug_on($self->debug_on()) if ($self->debug_on());
|
54
|
9
|
0
|
0
|
9
|
0
|
58
|
eval($self->code(@_));
|
|
9
|
0
|
0
|
9
|
|
18
|
|
|
9
|
0
|
0
|
9
|
|
1167
|
|
|
9
|
0
|
0
|
7
|
|
51
|
|
|
9
|
0
|
0
|
7
|
|
21
|
|
|
9
|
0
|
0
|
7
|
|
1060
|
|
|
9
|
0
|
0
|
7
|
|
52
|
|
|
9
|
0
|
0
|
7
|
|
20
|
|
|
9
|
0
|
0
|
7
|
|
1207
|
|
|
7
|
0
|
0
|
7
|
|
42
|
|
|
7
|
0
|
0
|
7
|
|
14
|
|
|
7
|
0
|
0
|
7
|
|
858
|
|
|
7
|
0
|
0
|
7
|
|
75
|
|
|
7
|
0
|
0
|
7
|
|
19
|
|
|
7
|
0
|
0
|
7
|
|
966
|
|
|
7
|
0
|
0
|
7
|
|
43
|
|
|
7
|
0
|
0
|
7
|
|
14
|
|
|
7
|
0
|
0
|
7
|
|
920
|
|
|
7
|
0
|
0
|
7
|
|
55
|
|
|
7
|
0
|
0
|
7
|
|
14
|
|
|
7
|
0
|
0
|
7
|
|
997
|
|
|
7
|
0
|
0
|
7
|
|
44
|
|
|
7
|
0
|
0
|
7
|
|
15
|
|
|
7
|
0
|
0
|
7
|
|
879
|
|
|
7
|
0
|
0
|
7
|
|
41
|
|
|
7
|
0
|
0
|
7
|
|
16
|
|
|
7
|
0
|
0
|
7
|
|
978
|
|
|
7
|
0
|
0
|
7
|
|
45
|
|
|
7
|
0
|
0
|
7
|
|
12
|
|
|
7
|
0
|
0
|
7
|
|
827
|
|
|
7
|
0
|
0
|
7
|
|
43
|
|
|
7
|
0
|
0
|
7
|
|
12
|
|
|
7
|
0
|
0
|
7
|
|
943
|
|
|
7
|
0
|
0
|
7
|
|
45
|
|
|
7
|
0
|
0
|
7
|
|
13
|
|
|
7
|
0
|
0
|
7
|
|
885
|
|
|
7
|
50
|
33
|
0
|
|
41
|
|
|
7
|
50
|
66
|
0
|
|
13
|
|
|
7
|
100
|
33
|
0
|
|
1030
|
|
|
7
|
50
|
33
|
0
|
|
44
|
|
|
7
|
50
|
66
|
0
|
|
15
|
|
|
7
|
50
|
66
|
0
|
|
805
|
|
|
7
|
100
|
100
|
0
|
|
42
|
|
|
7
|
50
|
66
|
0
|
|
14
|
|
|
7
|
50
|
66
|
0
|
|
908
|
|
|
7
|
100
|
66
|
0
|
|
43
|
|
|
7
|
50
|
66
|
0
|
|
13
|
|
|
7
|
100
|
66
|
0
|
|
826
|
|
|
7
|
100
|
66
|
0
|
|
39
|
|
|
7
|
50
|
33
|
0
|
|
15
|
|
|
7
|
100
|
66
|
0
|
|
999
|
|
|
7
|
100
|
66
|
0
|
|
59
|
|
|
7
|
100
|
33
|
0
|
|
20
|
|
|
7
|
50
|
33
|
0
|
|
912
|
|
|
7
|
50
|
33
|
121
|
|
42
|
|
|
7
|
100
|
66
|
45
|
|
16
|
|
|
7
|
50
|
33
|
452
|
|
916
|
|
|
7
|
100
|
66
|
28
|
|
42
|
|
|
7
|
100
|
33
|
36
|
|
16
|
|
|
7
|
100
|
33
|
87
|
|
808
|
|
|
7
|
50
|
0
|
79
|
|
49
|
|
|
7
|
100
|
0
|
262
|
|
14
|
|
|
7
|
50
|
33
|
14
|
|
978
|
|
|
7
|
50
|
33
|
400
|
|
43
|
|
|
7
|
100
|
33
|
24
|
|
13
|
|
|
7
|
100
|
66
|
4
|
|
910
|
|
|
7
|
50
|
33
|
0
|
|
46
|
|
|
7
|
50
|
33
|
5
|
|
17
|
|
|
7
|
50
|
66
|
831
|
|
986
|
|
|
7
|
50
|
66
|
25
|
|
44
|
|
|
7
|
50
|
66
|
138
|
|
13
|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
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
121
|
|
|
|
|
226
|
|
|
121
|
|
|
|
|
279
|
|
|
121
|
|
|
|
|
319
|
|
|
121
|
|
|
|
|
2227
|
|
|
121
|
|
|
|
|
266
|
|
|
121
|
|
|
|
|
1921
|
|
|
121
|
|
|
|
|
322
|
|
|
121
|
|
|
|
|
1220
|
|
|
45
|
|
|
|
|
244
|
|
|
45
|
|
|
|
|
185
|
|
|
45
|
|
|
|
|
188
|
|
|
45
|
|
|
|
|
183
|
|
|
45
|
|
|
|
|
116
|
|
|
45
|
|
|
|
|
1443
|
|
|
45
|
|
|
|
|
181
|
|
|
45
|
|
|
|
|
337
|
|
|
452
|
|
|
|
|
1205
|
|
|
452
|
|
|
|
|
1383
|
|
|
451
|
|
|
|
|
1631
|
|
|
451
|
|
|
|
|
10728
|
|
|
451
|
|
|
|
|
1307
|
|
|
451
|
|
|
|
|
9166
|
|
|
451
|
|
|
|
|
1697
|
|
|
451
|
|
|
|
|
8827
|
|
|
28
|
|
|
|
|
84
|
|
|
28
|
|
|
|
|
161
|
|
|
27
|
|
|
|
|
115
|
|
|
27
|
|
|
|
|
637
|
|
|
27
|
|
|
|
|
64
|
|
|
27
|
|
|
|
|
469
|
|
|
27
|
|
|
|
|
152
|
|
|
27
|
|
|
|
|
476
|
|
|
36
|
|
|
|
|
151
|
|
|
36
|
|
|
|
|
251
|
|
|
34
|
|
|
|
|
174
|
|
|
34
|
|
|
|
|
899
|
|
|
34
|
|
|
|
|
99
|
|
|
34
|
|
|
|
|
665
|
|
|
34
|
|
|
|
|
180
|
|
|
34
|
|
|
|
|
574
|
|
|
87
|
|
|
|
|
270
|
|
|
87
|
|
|
|
|
379
|
|
|
82
|
|
|
|
|
310
|
|
|
82
|
|
|
|
|
1823
|
|
|
82
|
|
|
|
|
219
|
|
|
82
|
|
|
|
|
1505
|
|
|
82
|
|
|
|
|
278
|
|
|
82
|
|
|
|
|
876
|
|
|
79
|
|
|
|
|
169
|
|
|
79
|
|
|
|
|
190
|
|
|
79
|
|
|
|
|
265
|
|
|
79
|
|
|
|
|
285
|
|
|
79
|
|
|
|
|
139
|
|
|
79
|
|
|
|
|
1439
|
|
|
79
|
|
|
|
|
200
|
|
|
79
|
|
|
|
|
310
|
|
|
262
|
|
|
|
|
518
|
|
|
262
|
|
|
|
|
601
|
|
|
261
|
|
|
|
|
930
|
|
|
261
|
|
|
|
|
1711
|
|
|
261
|
|
|
|
|
502
|
|
|
261
|
|
|
|
|
4084
|
|
|
261
|
|
|
|
|
963
|
|
|
261
|
|
|
|
|
3920
|
|
|
14
|
|
|
|
|
29
|
|
|
14
|
|
|
|
|
45
|
|
|
14
|
|
|
|
|
47
|
|
|
14
|
|
|
|
|
244
|
|
|
14
|
|
|
|
|
40
|
|
|
14
|
|
|
|
|
202
|
|
|
14
|
|
|
|
|
48
|
|
|
14
|
|
|
|
|
230
|
|
|
401
|
|
|
|
|
1216
|
|
|
401
|
|
|
|
|
1499
|
|
|
400
|
|
|
|
|
1382
|
|
|
400
|
|
|
|
|
9843
|
|
|
400
|
|
|
|
|
1136
|
|
|
400
|
|
|
|
|
8621
|
|
|
400
|
|
|
|
|
1419
|
|
|
400
|
|
|
|
|
4671
|
|
|
24
|
|
|
|
|
71
|
|
|
24
|
|
|
|
|
91
|
|
|
24
|
|
|
|
|
97
|
|
|
24
|
|
|
|
|
597
|
|
|
24
|
|
|
|
|
87
|
|
|
24
|
|
|
|
|
452
|
|
|
24
|
|
|
|
|
82
|
|
|
24
|
|
|
|
|
289
|
|
|
4
|
|
|
|
|
49
|
|
|
4
|
|
|
|
|
18
|
|
|
4
|
|
|
|
|
21
|
|
|
4
|
|
|
|
|
140
|
|
|
4
|
|
|
|
|
15
|
|
|
4
|
|
|
|
|
97
|
|
|
4
|
|
|
|
|
18
|
|
|
4
|
|
|
|
|
65
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
5
|
|
|
|
|
30
|
|
|
5
|
|
|
|
|
17
|
|
|
5
|
|
|
|
|
15
|
|
|
5
|
|
|
|
|
105
|
|
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
86
|
|
|
5
|
|
|
|
|
17
|
|
|
5
|
|
|
|
|
50
|
|
|
831
|
|
|
|
|
2271
|
|
|
831
|
|
|
|
|
2187
|
|
|
831
|
|
|
|
|
2775
|
|
|
831
|
|
|
|
|
3418
|
|
|
831
|
|
|
|
|
1795
|
|
|
831
|
|
|
|
|
18657
|
|
|
831
|
|
|
|
|
4732
|
|
|
831
|
|
|
|
|
14980
|
|
|
25
|
|
|
|
|
81
|
|
|
25
|
|
|
|
|
101
|
|
|
25
|
|
|
|
|
110
|
|
|
25
|
|
|
|
|
630
|
|
|
25
|
|
|
|
|
88
|
|
|
25
|
|
|
|
|
552
|
|
|
25
|
|
|
|
|
125
|
|
|
25
|
|
|
|
|
515
|
|
|
138
|
|
|
|
|
289
|
|
|
138
|
|
|
|
|
379
|
|
|
137
|
|
|
|
|
405
|
|
|
137
|
|
|
|
|
2651
|
|
|
137
|
|
|
|
|
333
|
|
|
137
|
|
|
|
|
2234
|
|
|
137
|
|
|
|
|
463
|
|
|
137
|
|
|
|
|
2398
|
|
|
142
|
|
|
|
|
270
|
|
|
142
|
|
|
|
|
285
|
|
|
141
|
|
|
|
|
321
|
|
|
141
|
|
|
|
|
323
|
|
|
141
|
|
|
|
|
219
|
|
|
141
|
|
|
|
|
2035
|
|
|
141
|
|
|
|
|
496
|
|
|
141
|
|
|
|
|
1695
|
|
55
|
142
|
50
|
|
|
|
463
|
confess "**Error in eval for @{[ $self->_caller() ]} FunctionMember constructor function creation:\n$@" if ($@);
|
|
0
|
|
|
|
|
0
|
|
56
|
142
|
|
|
|
|
30664
|
return $self;
|
57
|
|
|
|
|
|
|
}
|
58
|
|
|
|
|
|
|
sub code
|
59
|
|
|
|
|
|
|
{
|
60
|
360
|
|
|
360
|
0
|
811
|
my $self = shift;
|
61
|
360
|
|
|
|
|
923
|
my $tab = ' ' x 4;
|
62
|
355
|
|
|
|
|
801
|
my $code;
|
63
|
355
|
|
|
|
|
3291
|
my $c = $self->_caller();
|
64
|
|
|
|
|
|
|
# new(void);
|
65
|
|
|
|
|
|
|
# new(element_ref); -- copy ctor
|
66
|
|
|
|
|
|
|
# new(raw_data);
|
67
|
|
|
|
|
|
|
# new(option-pairs list);
|
68
|
|
|
|
|
|
|
|
69
|
355
|
|
|
|
|
684
|
my $sname = 'self';
|
70
|
355
|
100
|
|
|
|
6835
|
if ($self->singleton()) {
|
71
|
214
|
|
|
|
|
1002
|
$sname = '__' . lc($c);
|
72
|
214
|
|
|
|
|
3408
|
$sname =~ s/:+/_/g;
|
73
|
|
|
|
|
|
|
}
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
# Extract named parameter/value pairs and pass on...
|
76
|
146
|
|
|
|
|
341
|
my @p;
|
77
|
146
|
100
|
66
|
|
|
349
|
while (@_) { my $p=shift; push(@p, $p, shift) if (!ref($p) && @_); }
|
|
7
|
|
|
|
|
20
|
|
|
7
|
|
|
|
|
121
|
|
78
|
146
|
|
|
|
|
256
|
my %p = @p;
|
79
|
|
|
|
|
|
|
|
80
|
146
|
|
|
|
|
408
|
$code = "{\npackage $c;\n";
|
81
|
146
|
|
|
|
|
233
|
$code .= "sub _@{[ $self->ctor_name() ]}\n";
|
|
146
|
|
|
|
|
2798
|
|
82
|
162
|
|
|
|
|
354
|
$code .= "{\n";
|
83
|
162
|
100
|
|
|
|
2934
|
if ($self->singleton()) {
|
84
|
20
|
|
|
|
|
72
|
$code .= "${tab}our \$$sname;\n";
|
85
|
20
|
|
|
|
|
490
|
$code .= "${tab}return \$$sname if (defined(\$$sname));\n";
|
86
|
|
|
|
|
|
|
}
|
87
|
161
|
|
|
|
|
357
|
$code .= "${tab}use vars qw(\@ISA);\n";
|
88
|
161
|
|
|
|
|
575
|
$code .= "${tab}my \$proto = shift;\n";
|
89
|
161
|
|
|
|
|
352
|
$code .= "${tab}return \$_[0]->_clone() if (ref(\$_[0]) && \$_[0]->isa(__PACKAGE__));\n";
|
90
|
161
|
|
|
|
|
539
|
$code .= "${tab}my \$class = ref(\$proto) || \$proto;\n";
|
91
|
144
|
100
|
|
|
|
2740
|
$code .= "${tab}my " unless($self->singleton());
|
92
|
144
|
|
|
|
|
325
|
$code .= "${tab}\$$sname = int(\@ISA) ? \$class->SUPER::_@{[ $self->ctor_name() ]}(\@_) : {};\n";
|
|
144
|
|
|
|
|
2724
|
|
93
|
144
|
|
|
|
|
428
|
$code .= "${tab}bless(\$$sname, \$class);\n";
|
94
|
144
|
100
|
|
|
|
263
|
$code .= "${tab}\$$sname->members_init(@{[ @p ? join(', ', '@_', map(qq/'$_'/, %p)) : '@_' ]});\n";
|
|
144
|
|
|
|
|
517
|
|
95
|
144
|
|
|
|
|
328
|
$code .= "${tab}return \$$sname;\n";
|
96
|
144
|
|
|
|
|
270
|
$code .= "}\n";
|
97
|
142
|
|
|
|
|
185
|
$code .= "}\n";
|
98
|
|
|
|
|
|
|
|
99
|
142
|
|
|
|
|
252
|
$code .= "{\npackage $c;\n";
|
100
|
142
|
|
|
|
|
215
|
$code .= "sub @{[ $self->ctor_name() ]}\n";
|
|
142
|
|
|
|
|
2780
|
|
101
|
142
|
|
|
|
|
286
|
$code .= "{\n";
|
102
|
142
|
100
|
|
|
|
2657
|
if ($self->singleton()) {
|
103
|
1
|
|
|
|
|
3
|
$code .= "${tab}our \$$sname;\n";
|
104
|
1
|
|
|
|
|
2
|
$code .= "${tab}return \$$sname if (defined(\$$sname));\n";
|
105
|
|
|
|
|
|
|
}
|
106
|
142
|
|
|
|
|
294
|
$code .= "${tab}use vars qw(\@ISA);\n";
|
107
|
142
|
|
|
|
|
268
|
$code .= "${tab}my \$proto = shift;\n";
|
108
|
142
|
|
|
|
|
245
|
$code .= "${tab}return \$_[0]->clone() if (ref(\$_[0]) && \$_[0]->isa(__PACKAGE__));\n";
|
109
|
142
|
|
|
|
|
236
|
$code .= "${tab}my \$class = ref(\$proto) || \$proto;\n";
|
110
|
142
|
100
|
|
|
|
2656
|
$code .= "${tab}my " unless($self->singleton());
|
111
|
142
|
|
|
|
|
306
|
$code .= "${tab}\$$sname = int(\@ISA) ? \$class->SUPER::@{[ $self->ctor_name() ]}(\@_) : {};\n";
|
|
142
|
|
|
|
|
2670
|
|
112
|
142
|
|
|
|
|
351
|
$code .= "${tab}bless(\$$sname, \$class);\n";
|
113
|
142
|
100
|
|
|
|
295
|
$code .= "${tab}\$$sname->members_init(@{[ @p ? join(', ', '@_', map(qq/'$_'/, %p)) : '@_' ]});\n";
|
|
142
|
|
|
|
|
468
|
|
114
|
142
|
100
|
|
|
|
358
|
$code .= "${tab}$c\::new_extra(\$$sname, @{[ @p ? join(', ', '@_', map(qq/'$_'/, %p)) : '@_' ]})\n"; #--> CREATE
|
|
142
|
|
|
|
|
426
|
|
115
|
142
|
|
|
|
|
345
|
$code .= "${tab}${tab}if (defined(&$c\::new_extra));\n";
|
116
|
142
|
|
|
|
|
263
|
$code .= "${tab}return \$$sname;\n";
|
117
|
142
|
|
|
|
|
200
|
$code .= "}\n";
|
118
|
142
|
|
|
|
|
198
|
$code .= "}\n";
|
119
|
142
|
50
|
|
|
|
2737
|
$self->_trace()->print($c, $code) if ($self->_trace()->debug_on());
|
120
|
142
|
|
|
|
|
10156
|
return $code;
|
121
|
|
|
|
|
|
|
}
|
122
|
|
|
|
|
|
|
}
|
123
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------------------------------
|
124
|
|
|
|
|
|
|
1;
|