xref: /unit/pkg/deb/debian.module/unit.example-perl-app (revision 524:7eef37b824b3)
1*524Sdefan@nginx.com#!/usr/bin/env perl
2*524Sdefan@nginx.com
3*524Sdefan@nginx.comuse Data::Dumper;
4*524Sdefan@nginx.com
5*524Sdefan@nginx.commy $app = sub {
6*524Sdefan@nginx.com      my $env = shift;
7*524Sdefan@nginx.com      return [
8*524Sdefan@nginx.com          '200',
9*524Sdefan@nginx.com          [ 'Content-Type' => 'text/plain' ],
10*524Sdefan@nginx.com          [ "Hello from Unit, Perl $^V, environment:\n\n", Dumper($env) ],
11*524Sdefan@nginx.com      ];
12*524Sdefan@nginx.com};
13