Skip to content

Instantly share code, notes, and snippets.

@xantus
Created July 28, 2010 23:18
Show Gist options
  • Save xantus/496694 to your computer and use it in GitHub Desktop.
Save xantus/496694 to your computer and use it in GitHub Desktop.
patch - base64 encoded data sections
diff --git a/lib/Mojo/Command.pm b/lib/Mojo/Command.pm
index 1a92e50..8cfa2dd 100644
--- a/lib/Mojo/Command.pm
+++ b/lib/Mojo/Command.pm
@@ -118,6 +118,9 @@ sub get_all_data {
my $all = {};
while (@data) {
my ($name, $content) = splice @data, 0, 2;
+ if ( $name =~ s/;base64$// ) {
+ $content = b($content)->b64_decode->to_string;
+ }
$all->{$name} = $content;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment