in reply to Re^2: help with "symbol lookup error" message
in thread help with "symbol lookup error" message

Is it possible to modify this code to see where the modules are being called from? For example, to see that List/Util.pm is being called by File/Copy.pm?

  • Comment on Re^3: help with "symbol lookup error" message

Replies are listed 'Best First'.
Re^4: help with "symbol lookup error" message
by hippo (Archbishop) on Feb 03, 2023 at 23:13 UTC

    Sure, we can use caller to do that:

    #!/usr/bin/env perl use strict; use warnings; BEGIN { unshift @INC, sub { warn "Loading $_[1] from " . (caller)[0] . "\n +"; 0; }; } use File::Copy;

    🦛