add a loop to the scramble driver because it can fail to scramble occasionally
Matt S Trout [Mon, 2 Mar 2009 16:16:43 +0000 (11:16 -0500)]
lib/LolCatalyst/Lite/Translator/Driver/Scramble.pm

index c6e0b6e..722c20b 100644 (file)
@@ -40,8 +40,11 @@ with 'LolCatalyst::Lite::Interface::TranslationDriver';
 
 sub translate {
   my ($self, $text) = @_;
-  _scramble_block(\$text);
-  return $text;
+  my $copy = $text;
+  do {
+    _scramble_block(\$copy);
+  } until ($copy ne $text);
+  return $copy;
 }
 
 1;