# import _all_ that Log::Agent exports: use Log::Agent qw( /./ ); # Have us export the same stuff Log::Agent does: sub import { my( $selfPkg )= shift( @_ ); local( $Exporter::ExportLevel )= 1 + $Exporter::ExportLevel; Log::Agent->import( @_ ); } # For each routine we redefine, unimport the function # before we redefine it in order to avoid a warning: BEGIN { undef &logcarp; } sub logcarp { # preprocess stuff Log::Agent::logcarp( @_ ); # postprocess stuff }