You are here iC Home > Perl > Advanced Features in Perl > Suppress warnings from external modules

Perl

9.3 Suppress warnings from external modules

19.11.2008
9.2 Monitored Variables [  up  ] - [ a - z ] - [ search PC ] - [ top ] 9.4 Using C++ from perl with Inline

How to prevent warning messages thrown by external modules?

Install a related __WARN__ signal handler:

$SIG{'__WARN__'} = \&alarm_handler; # install signal handler

sub alarm_handler () {
	print STDERR "alarm catched!\n";
	return;
}

Tip: You could localize suppress warnings to a specific sub routine:

local $SIG{'__WARN__'} = \&alarm_handler; # install signal handler



See also:
www.cotse.com/perl/warn.html


Advanced search tips
9.2 Monitored Variables [  up  ] - [ top ] 9.4 Using C++ from perl with Inline



[ home ] - [ search ] - [ feedback ]

copyright by reto - created with mytexi