http://www.perlmonks.org?node_id=11124560

kcott has asked for the wisdom of the Perl Monks concerning the following question:

Very brief background: Some idiot dug a hole, cut through a main electrical cable, and killed the power to my $work (and many others in the vicinity). Most of our systems are back up and running but not all of those that I need. To continue working, I've download various files from out git repostory to my home computer. I'm making code changes here but do not have the full environment available to me. Getting that environment is problematic at best, perhaps not possible at all, while "recovery" procedures are in progress.

After making changes, typing 'perl -c ...' invariably gives me something like: "Can't locate SomeMod.pm in @INC ...".

I've checked perlrun, under "-c" it has:

"causes Perl to check the syntax of the program and then exit without executing it. Actually, it will execute any BEGIN, UNITCHECK, or CHECK blocks and any use statements: these are considered as occurring outside the execution of your program. INIT and END blocks, however, will be skipped."

The use statements will be my biggest problem; although, others may crop up here and there.

Does anyone know of something simple, like 'perl -c ...', that will just check the syntax without executing any part of the code?

I'm hoping the system will be fully operational within the next day or two. Anything that involves a substantial amount of work — e.g. setting up and configuring a framework; installing lots of modules; etc. — is probably not an option for me at the present; however, that could still be useful to know and have available for some future, similar situation.

— Ken