I am trying to figure out which module in my CGI::Application is loading Moose. I attempted to overload "require" but I don't seem to have the syntax quite right. If someone could clean up the following code I would appreciate it:
use strict;
use warnings;
use Carp qw//;
BEGIN {
*CORE::GLOBAL::require = sub (*) {
warn "Requiring $_[0] at: " . Carp::longmess();
CORE::require (@_);
};
}
Basically, the problem with this script is that it isn't actually loading anything. When CORE::require(@) is called is doesn't "do" anything. I tried just passing it the script name directly using $[0], but that just resulted in the script deadlocking until it timed out.
NOTE: The above script is at the beginning of my start up script
@INC
. – Accomplice