xref: /unit/test/unit/applications/lang/perl.py (revision 1116:5e429a7f133c)
1from unit.applications.proto import TestApplicationProto
2
3
4class TestApplicationPerl(TestApplicationProto):
5    application_type = "perl"
6
7    def load(self, script, name='psgi.pl'):
8        script_path = self.current_dir + '/perl/' + script
9
10        self._load_conf(
11            {
12                "listeners": {"*:7080": {"pass": "applications/" + script}},
13                "applications": {
14                    script: {
15                        "type": self.application_type,
16                        "processes": {"spare": 0},
17                        "working_directory": script_path,
18                        "script": script_path + '/' + name,
19                    }
20                },
21            }
22        )
23