| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Rose::HTML::Object::WithWrapAroundChildren; |
|
2
|
|
|
|
|
|
|
|
|
3
|
13
|
|
|
13
|
|
102
|
use strict; |
|
|
13
|
|
|
|
|
28
|
|
|
|
13
|
|
|
|
|
423
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
13
|
|
|
13
|
|
68
|
use Carp; |
|
|
13
|
|
|
|
|
25
|
|
|
|
13
|
|
|
|
|
2011
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.554'; |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use Rose::HTML::Object::MakeMethods::Generic |
|
10
|
|
|
|
|
|
|
( |
|
11
|
13
|
|
|
|
|
302
|
array => |
|
12
|
|
|
|
|
|
|
[ |
|
13
|
|
|
|
|
|
|
'pre_children' => {}, |
|
14
|
|
|
|
|
|
|
'shift_pre_children' => { interface => 'shift', hash_key => 'pre_children' }, |
|
15
|
|
|
|
|
|
|
'unshift_pre_children' => { interface => 'unshift', hash_key => 'pre_children' }, |
|
16
|
|
|
|
|
|
|
'pop_pre_children' => { interface => 'pop', hash_key => 'pre_children' }, |
|
17
|
|
|
|
|
|
|
'push_pre_children' => { interface => 'push', hash_key => 'pre_children' }, |
|
18
|
|
|
|
|
|
|
'delete_pre_children' => { interface => 'clear', hash_key => 'pre_children' }, |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
'post_children' => {}, |
|
21
|
|
|
|
|
|
|
'shift_post_children' => { interface => 'shift', hash_key => 'post_children' }, |
|
22
|
|
|
|
|
|
|
'unshift_post_children' => { interface => 'unshift', hash_key => 'post_children' }, |
|
23
|
|
|
|
|
|
|
'push_post_children' => { interface => 'push', hash_key => 'post_children' }, |
|
24
|
|
|
|
|
|
|
'pop_post_children' => { interface => 'pop', hash_key => 'post_children' }, |
|
25
|
|
|
|
|
|
|
'delete_post_children' => { interface => 'clear', hash_key => 'post_children' }, |
|
26
|
|
|
|
|
|
|
], |
|
27
|
13
|
|
|
13
|
|
111
|
); |
|
|
13
|
|
|
|
|
36
|
|
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub children |
|
30
|
|
|
|
|
|
|
{ |
|
31
|
1197
|
|
|
1197
|
0
|
2219
|
my($self) = shift; |
|
32
|
1197
|
50
|
|
|
|
4060
|
Carp::croak "Cannot directly set children() for a ", ref($self), |
|
33
|
|
|
|
|
|
|
". Use fields(), push_children(), pop_children(), etc." if(@_); |
|
34
|
1197
|
100
|
|
|
|
3447
|
return wantarray ? ($self->pre_children, $self->immutable_children(), $self->post_children) : |
|
35
|
|
|
|
|
|
|
[ $self->pre_children, $self->immutable_children(), $self->post_children ]; |
|
36
|
|
|
|
|
|
|
} |
|
37
|
|
|
|
|
|
|
|
|
38
|
4
|
|
|
4
|
0
|
36
|
sub push_children { shift->push_post_children(@_) } |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub pop_children |
|
41
|
|
|
|
|
|
|
{ |
|
42
|
4
|
|
|
4
|
0
|
10
|
my($self) = shift; |
|
43
|
|
|
|
|
|
|
|
|
44
|
4
|
50
|
|
|
|
14
|
my $num = @_ ? shift : 1; |
|
45
|
4
|
|
|
|
|
19
|
my @children = $self->pop_post_children($num); |
|
46
|
|
|
|
|
|
|
|
|
47
|
4
|
100
|
|
|
|
13
|
if(@children < $num) |
|
48
|
|
|
|
|
|
|
{ |
|
49
|
1
|
|
|
|
|
9
|
push(@children, $self->pop_pre_children($num - @children)); |
|
50
|
|
|
|
|
|
|
} |
|
51
|
|
|
|
|
|
|
|
|
52
|
4
|
50
|
|
|
|
21
|
return @children == 1 ? $children[0] : @children; |
|
53
|
|
|
|
|
|
|
} |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub shift_children |
|
56
|
|
|
|
|
|
|
{ |
|
57
|
2
|
|
|
2
|
0
|
6
|
my($self) = shift; |
|
58
|
|
|
|
|
|
|
|
|
59
|
2
|
50
|
|
|
|
7
|
my $num = @_ ? shift : 1; |
|
60
|
2
|
|
|
|
|
9
|
my @children = $self->shift_pre_children($num); |
|
61
|
|
|
|
|
|
|
|
|
62
|
2
|
100
|
|
|
|
7
|
if(@children < $num) |
|
63
|
|
|
|
|
|
|
{ |
|
64
|
1
|
|
|
|
|
12
|
push(@children, $self->shift_post_children($num - @children)); |
|
65
|
|
|
|
|
|
|
} |
|
66
|
|
|
|
|
|
|
|
|
67
|
2
|
50
|
|
|
|
11
|
return @children == 1 ? $children[0] : @children; |
|
68
|
|
|
|
|
|
|
} |
|
69
|
|
|
|
|
|
|
|
|
70
|
3
|
|
|
3
|
0
|
12
|
sub unshift_children { shift->unshift_pre_children(@_) } |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
1; |