AWS-Lambda

 view release on metacpan or  search on metacpan

examples/cgi/WwwCounter/handler.pl  view on Meta::CPAN

use utf8;
use warnings;
use strict;
use lib "$ENV{'LAMBDA_TASK_ROOT'}/local/lib/perl5";
use AWS::Lambda::PSGI;

$ENV{WWWCOUNT_DIR} ||= "/tmp";
chdir($ENV{'LAMBDA_TASK_ROOT'});
my $app = require "$ENV{'LAMBDA_TASK_ROOT'}/app.psgi";
my $func = AWS::Lambda::PSGI->wrap($app);

sub handle {
    my $payload = shift;
    return $func->($payload);
}

1;



( run in 1.070 second using v1.01-cache-2.11-cpan-d8267643d1d )