1#!/usr/local/bin/perl 2# -- 3# Copyright (C) 2001-2020 OTRS AG, https://otrs.com/ 4# -- 5# This program is free software: you can redistribute it and/or modify 6# it under the terms of the GNU General Public License as published by 7# the Free Software Foundation, either version 3 of the License, or 8# (at your option) any later version. 9# 10# This program is distributed in the hope that it will be useful, 11# but WITHOUT ANY WARRANTY; without even the implied warranty of 12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13# GNU General Public License for more details. 14# 15# You should have received a copy of the GNU General Public License 16# along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.txt. 17# -- 18 19use strict; 20use warnings; 21 22# use ../../ as lib location 23use FindBin qw($Bin); 24use lib "$Bin/../.."; 25use lib "$Bin/../../Kernel/cpan-lib"; 26use lib "$Bin/../../Custom"; 27 28use CGI::Fast; 29use Module::Refresh; 30 31# load generic interface 32use Kernel::GenericInterface::Provider; 33use Kernel::System::ObjectManager; 34 35# response loop 36while ( my $WebRequest = CGI::Fast->new() ) { 37 38 # Reload files in @INC that have changed since the last request. 39 eval { 40 Module::Refresh->refresh(); 41 }; 42 43 local $Kernel::OM = Kernel::System::ObjectManager->new( 44 'Kernel::System::Web::Request' => { 45 WebRequest => $WebRequest, 46 } 47 ); 48 my $Provider = Kernel::GenericInterface::Provider->new(); 49 50 $Provider->Run(); 51} 52