in reply to Re: find out, if perl is started with the -c switch
in thread find out, if perl is started with the -c switch

INIT blocks, hmmm, that reminds me, there was a thread on this sometime back: Which phase am I in?. In that thread, tilly pointed out that that require'ing a module will skip the INIT blocks:

#! /usr/local/bin/perl -w use lib '.'; require 'foo.pm'; print "running\n"; # foo.pm package foo; INIT { warn "foo init\n" } 1;

Running the above produces...

Too late to run INIT block at foo.pm line 2.

... which may be something for the OP to keep in mind.

• another intruder with the mooring in the heart of the Perl