in reply to Re: BEGIN and compile-time
in thread BEGIN and compile-time

You might as well move out the use lib as well.

BEGIN { delete $INC{'ModX.pm'}; } use lib '../'; use ModX;

That way, the statements will execute in the same order as they are in the source.