Browse Source

Refactored for better readability

Needed to distinguish between master and slave steps
Alois Mahdal 12 years ago
parent
commit
8281669a4a
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      lib/SugarTrail/Template/Master.pm

+ 5
- 5
lib/SugarTrail/Template/Master.pm View File

@@ -63,22 +63,22 @@ sub generate_slave {
63 63
 
64 64
     my $slave = SugarTrail::Template::Slave->new($args);
65 65
 
66
-    my @lines;
66
+    my @slave_steps;
67 67
 
68
-    STEP: foreach my $step (@{ $self->{steps} }) {
68
+    STEP: foreach my $master_step (@{ $self->{steps} }) {
69 69
         my $accept = 1;
70
-        COND: foreach my $condstr (@{ $step->{conds} }) {
70
+        COND: foreach my $condstr (@{ $master_step->{conds} }) {
71 71
             my $c = SugarTrail::Template::Condition->new($condstr);
72 72
             unless ($c->match($args)) { $accept = 0; last COND; }
73 73
         }
74
-        push @lines, $step->{line} if $accept;
74
+        push @slave_steps, $master_step->{line} if $accept;
75 75
     }
76 76
 
77 77
     $slave->{meta}->{'Stm'} = $self->{stm};
78 78
     $slave->{meta}->{'Stm Revision'} = $self->get_current_revision();
79 79
     $slave->{meta}->{'Params'} = mkmymime($args);
80 80
 
81
-    $slave->{lines} = \@lines;
81
+    $slave->{steps} = \@slave_steps;
82 82
     return $slave;
83 83
 }
84 84