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