NAME

Mojolicious::Plugin::Recaptcha - ReCaptcha plugin for Mojolicious framework

VERSION

0.3

SYNOPSIS

# Mojolicious::Lite
plugin recaptcha => { 
   public_key  => '...', 
   private_key => '...',
   lang        => 'ru' 
};

# Mojolicious
$self->plugin(recaptcha => { 
   public_key  => '...', 
   private_key => '...',
   lang        => 'ru'
});

# template 
<form action="" method="post">
   <%= recaptcha_html %>
   <input type="submit" value="submit" name="submit" />
</form>

# checking blocking way
$self->recaptcha;
if ($self->stash('recaptcha_error')) {
   # all ok
}

# checking non-blocking way
$self->render_later;
$self->recaptcha(sub {
   my $ok = shift;
   if ($ok) {
    
   } else {
      warn $self->stash('recaptcha_error');
   }
   # here you need call render
   $self->render;
})

Internationalisation support

  • English by default (en)

  • Dutch (nl)

  • French (fr)

  • German (de)

  • Portuguese (pt)

  • Russian (ru)

  • Spanish (es)

  • Turkish (tr)

SUPPORT

SEE ALSO

Mojolicious, Mojolicious::Plugin, Mojolicious::Lite

THANKS

Special thanks for help in development

    Alexander Voronov

COPYRIGHT & LICENSE

Copyright 2010-2011 Dmitry Konstantinov. All right reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.