/* performance hack: if filename is absolute and it's a standard * module, don't bother warning */ #ifdef MACOS_TRADITIONAL # define LIB_COMPONENT ":lib:" #else # define LIB_COMPONENT "/lib/" #endif if (file && PERL_FILE_IS_ABSOLUTE(file) && (instr(file, LIB_COMPONENT) || instr(file, ".pm"))) { continue; } CopLINE_set(PL_curcop, GvLINE(gv)); #ifdef USE_ITHREADS CopFILE(PL_curcop) = (char *)file; /* set for warning */ #else CopFILEGV(PL_curcop) = gv_fetchfile(file); #endif Perl_warner(aTHX_ packWARN(WARN_ONCE), "Name \"%s::%s\" used only once: possible typo", HvNAME_get(stash), GvNAME(gv)); ... with PERL_FILE_IS_ABSOLUTE being defined as (for my platform): #define PERL_FILE_IS_ABSOLUTE(f) (*(f) == '/')