Captcha-Stateless-Text

 view release on metacpan or  search on metacpan

META.yml  view on Meta::CPAN

 version: 0.5
 author:
   - Lester Hightower <hightowe@cpan.org>
 license: perl
 distribution_type: module
 requires:
   # Perl >= v5.20 needed for feature "signatures"
   perl: '5.020000'
   Sub::Util: 0
   Lingua::EN::Nums2Words: 0
   Try::Tiny: 0
   Crypt::Mode::CBC: 0
   JSON: 0
 recommends:
 build_requires:
 urls:
   license: http://dev.perl.org/licenses/
 meta-spec:
   version: 1.3
   url: http://module-build.sourceforge.net/META-spec-v1.3.html
 generated_by: Module::Build version 0.20

Makefile.PL  view on Meta::CPAN

  NAME         => 'Captcha::Stateless::Text',
  DISTNAME     => 'Captcha-Stateless-Text',
  VERSION_FROM => 'lib/Captcha/Stateless/Text.pm',
  LICENSE      => 'artistic_2',
  AUTHOR       => 'Lester Hightower <hightowe@cpan.org>',
  dist         => {'COMPRESS'=>'zip', 'SUFFIX' => '.zip'},
  MIN_PERL_VERSION => 'v5.20', # for feature "signatures"
  PREREQ_PM => {
   'Sub::Util' => 0,
   'Lingua::EN::Nums2Words' => 0,
   'Try::Tiny' => 0,
   'Crypt::Mode::CBC' => 0,
   'JSON' => 0,
  },
);

print "\n";
print "Do a 'make test' to test the module before installation\n";
print "Do a 'make install' to install the module.\n";

lib/Captcha/Stateless/Text.pm  view on Meta::CPAN

package Captcha::Stateless::Text;

use strict;
use v5.20; # Version needed for feature signatures
use feature qw(signatures);
no warnings qw(experimental::signatures);
use Sub::Util qw(set_subname);   # core
use MIME::Base64 qw();           # core
use Digest::MD5 qw(md5_hex);     # core
use Data::Dumper;                # core
use Try::Tiny;                   # libtry-tiny-perl
use Crypt::Mode::CBC;            # libcryptx-perl
use JSON qw(to_json from_json);  # libjson-perl
use Lingua::EN::Nums2Words;      # From CPAN (cpanm Lingua::EN::Nums2Words)
$Data::Dumper::Sortkeys = 1;
Lingua::EN::Nums2Words::set_case('lower');

our $VERSION = "0.5";
sub Version { $VERSION; }

my %QAfuncs = {}; # Holds our private __ANON__ subroutines

t/tests.t  view on Meta::CPAN

use strict;
use warnings;

use Test::More 'no_plan';
use lib './lib';

# The modules that we require
my @req_mods = qw(
	Captcha::Stateless::Text
	Lingua::EN::Nums2Words
	Try::Tiny
	Crypt::Mode::CBC
	JSON
	);
foreach my $mod (@req_mods) {
  use_ok $mod;
}

my $captcha = Captcha::Stateless::Text->new();
$captcha->set_iv('gkbx5g9hsvhqrosg');                  # Must be 16 bytes / 128 bits
$captcha->set_key('tyDjb39dQ20pdva0lTpyuiowWfxSSwa9'); # 32 bytes / 256 bits (AES256)



( run in 0.368 second using v1.01-cache-2.11-cpan-05444aca049 )