equal
deleted
inserted
replaced
69 my $counter = 0; |
69 my $counter = 0; |
70 my $licence = 0; |
70 my $licence = 0; |
71 my $failures = 0; |
71 my $failures = 0; |
72 while( my $line = <FILE>) |
72 while( my $line = <FILE>) |
73 { |
73 { |
|
74 if(defined $recipe) |
|
75 { |
|
76 if(defined $recipe->{'content'}) |
|
77 { |
|
78 my $ref = $recipe->{'content'}; |
|
79 push(@$ref, $line); |
|
80 } |
|
81 } |
74 ++$counter; |
82 ++$counter; |
75 if($line =~ m/^<recipe\s+(\S.+)>/) |
83 if($line =~ m/^<recipe\s+(\S.+)>/) |
76 { |
84 { |
77 $recipe = XMLin($line."</recipe>"); |
85 $recipe = XMLin($line."</recipe>"); |
78 $recipe->{'line'} = $counter; |
86 $recipe->{'line'} = $counter; |
|
87 my @content; |
|
88 push(@content, $line); |
|
89 $recipe->{'content'} = \@content; |
|
90 |
79 # print Dumper($recipe); |
91 # print Dumper($recipe); |
80 } |
92 } |
81 elsif($line =~ m/<\/recipe>/) |
93 elsif($line =~ m/<\/recipe>/) |
82 { |
94 { |
83 if(defined $recipe) |
95 if(defined $recipe) |
158 { |
170 { |
159 print OUT $recipe->{$key}; |
171 print OUT $recipe->{$key}; |
160 } |
172 } |
161 print OUT ","; |
173 print OUT ","; |
162 } |
174 } |
163 print OUT "\n"; |
175 print OUT "\n"; |
|
176 my $content = $recipe->{'content'}; |
|
177 for my $line (@$content) |
|
178 { |
|
179 print $line; |
|
180 } |
164 #print Dumper($recipe); |
181 #print Dumper($recipe); |
165 |
182 |
166 } |
183 } |