src/modules/app_perl/lib/perl/Kamailio.pm
ac9ce6fb
 #
 # $Id$
 #
1be653e2
 # Perl module for Kamailio
ac9ce6fb
 #
 # Copyright (C) 2006 Collax GmbH
 #                    (Bastian Friedrich <bastian.friedrich@collax.com>)
 #
27642a08
 # This file is part of Kamailio, a free SIP server.
ac9ce6fb
 #
27642a08
 # Kamailio is free software; you can redistribute it and/or modify
ac9ce6fb
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 2 of the License, or
 # (at your option) any later version
 #
27642a08
 # Kamailio is distributed in the hope that it will be useful,
ac9ce6fb
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
9e1ff448
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
ac9ce6fb
 #
 
1be653e2
 package Kamailio;
ac9ce6fb
 require Exporter;
 require DynaLoader;
 
 @ISA = qw(Exporter DynaLoader);
 @EXPORT = qw ( t );
 @EXPORT_OK = qw ( log );
 
1be653e2
 use Kamailio::Message;
 use Kamailio::Constants;
 use Kamailio::Utils::Debug;
ac9ce6fb
 
1be653e2
 bootstrap Kamailio;
ac9ce6fb
 
 
 BEGIN {
 	$SIG{'__DIE__'} = sub {
6d7e78b7
 		die @_ if( $^S or not defined $^S );
1be653e2
 		Kamailio::Message::log(undef, L_ERR, "perl error: $_[0]\n");
ac9ce6fb
         };
 	$SIG{'__WARN__'} = sub {
1be653e2
 		Kamailio::Message::log(undef, L_ERR, "perl warning: $_[0]\n");
ac9ce6fb
         };
 }
 
 1;