Skip to content

Instantly share code, notes, and snippets.

@nperez
Created March 10, 2010 16:25
Show Gist options
  • Save nperez/328029 to your computer and use it in GitHub Desktop.
Save nperez/328029 to your computer and use it in GitHub Desktop.
use Web::Simple 'Hacks';
{
package Hacks;
use IO::All;
dispatch
{
sub (GET + /verify/Robokill/*/*/)
{
my ($self, $email, $salt) = @_;
return [ 200, [ 'Content-type', 'text/html' ], [ "Valid $salt" ] ];
},
sub (.swf)
{
return [ 200, [ 'Content-type', 'application/x-shockwave-flash' ], [ io('robokill.swf')->slurp ]];
}
};
}
Hacks->run_if_script();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment