Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

[SOLVED] Detecting syntax check run

by vsespb (Hermit)
on Nov 23, 2013 at 19:30 UTC ( #1064074=perlquestion: print w/ replies, xml ) Need Help??
vsespb has asked for the wisdom of the Perl Monks concerning the following question:

I am inventing some workarounds for this Re: Circular dependencies when using the perl syntax checker problem, and I want to detect that current program run is not a real run but just a syntax check (with "perl -c").

What is the best way to detect this. Currently I only see that $0 is empty in this case.

BEGIN/CHECK/UNITCHECK/END/etc and GLOBAL_PHASE does not look helpful here

Comment on [SOLVED] Detecting syntax check run
Re: Detecting syntax check run
by ambrus (Abbot) on Nov 23, 2013 at 19:48 UTC

    See the $^C variable in perlvar please.

      Thank you! That's it!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1064074]
Approved by Perlbotics
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2015-07-04 10:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (59 votes), past polls