in reply to Include module at compile time with condition

I tried it like this---the fat comma worked in this case because I added a left curlie and a right curlie to use constant. Without the curlies, MICRO_SEC becomes a bareword:
#!/usr/bin/perl use strict; use warnings; use constant ({ START => 1000, NO_OF_CALLS => 1, DEBUG => 1, DET_DEBUG => 1, TOTAL_TIME => 1, DETAILED_TIME => 1, RESPONSE => 1, SLEEP => undef, MICRO_SEC => 1, }); BEGIN { eval { require "call_simulator.pm"; use if MICRO_SEC, 'Time::HiRes' => qw(time); } }