Suddenly, compiling my perl scripts started taking too much time. (About a minute each)
It doesn't really matter what I have in the scripts, what does matter, however, is how many require and use I use.
I think it is in compiling, but I am not sure. The thing is - if I run only the checking part - meaning, perl -c script.h, it takes about the same time.
My question is - how to debug it, how to find out, what exactly is perl doing, to find out what takes so much time?
You can check how long each use an require command takes to load with something like the following (time is a unix/linux command, so on Windows you'll need to keep an eye on your watch):
$ time perl -c -e 'use strict;'
-e syntax OK
real 0m0.122s
user 0m0.000s
sys 0m0.008s
Just change the use/require line for each entry you have to find which one results in the longest time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With