SWF/Former.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 25 CC 3 SCAR 16.5
CC
3
Cov
0%
form
6.0
_form_26
6.0
BEGIN
2.0
CRAP 5.2
1 package IO::SWF::Former;
2  
3 use base 'IO::SWF';
4  
5 sub form {
6 my $self = shift;
7 foreach my $tag (@{$self->_tags}) {
8 if ($tag->{'Code'} == 26) {
9 # 26: // PlaceObject2
10 $self->_form_26($tag);
11 last;
12 }
13 }
14 }
15  
16 sub _form_26 {
17 my ($self, $tag) = @_; # $tag : PlaceObject2
18 my $reader = IO::SWF::Bit->new();
19 $reader->input($tag->{'Content'});
20 $tag->placeFlag($reader->getUI8());
21 $tag->depth($reader->getUI16LE());
22 if ($tag->placeFlag & 0x02) {
23 $tag->characterId($reader->getUI16LE());
24 }
25 }
26  
27 1;