blib/lib/Games/RolePlay/MapGen/GeneratorPlugin/ClearDoors.pm untested

filter: Statementstmt 0.0% 0 / 21 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 29 CC 2 SCAR 12.8
CC
2
Cov
0%
post
6.0
new
2.0
BEGIN
2.0
CRAP 3.6
1 # vi:tw=0 syntax=perl:
2  
3 package Games::RolePlay::MapGen::GeneratorPlugin::BasicDoors;
4  
5 use common::sense;
6 use Carp;
7  
8 1;
9  
10 # new {{{
11 sub new {
12 my $class = shift;
13 my $this = [qw(post)]; # you have to be the types of things you hook
14  
15 return bless $this, $class;
16 }
17 # }}}
18 # post {{{
19 sub post {
20 my $this = shift;
21 my $opts = shift;
22 my $map = shift;
23 my $groups = shift;
24  
25 for my $i ( 0 .. $#$map ) {
26 my $jend = $#{ $map->[$i] };
27  
28 for my $j ( 0 .. $jend ) {
29 my $t = $map->[$i][$j];
30  
31 $t->{od} = 1 if ref $t->{od};
32 }
33 }
34 }
35 # }}}
36  
37 __END__