Help for this page
sub foo { my $calling_sub = (caller 1)[3]; ... bar(); # prints: called from: main::bar foo(); # prints: called from: the main block
# using Sys::Syslog log levels sub open_db { ... log_this(LOG_ERR, 'OPEN_DB_NOK', $dbname, 'db connection faile +d'); } }