Compile Time vs. Run Time
- Everybody knows the difference?
use
is run at Compile Time
- As soon as
use
is discovered while reading code, it's executed:
file: examples/001_timing.pl
1: print "fwizz\n";
2:
3: use Nonexisting::Module;
~/examples$ perl 001_timing.pl
Can't locate Nonexisting/Module.pm in @INC (you may
need to install the Nonexisting::Module module) (@INC
contains: /home/domm/perl5/perlbrew/perls/system/lib/s-
ite_perl/5.24.0/x86_64-linux /home/domm/perl5/perlbrew-
/perls/system/lib/site_perl/5.24.0 /home/domm/perl5/pe-
rlbrew/perls/system/lib/5.24.0/x86_64-linux
/home/domm/perl5/perlbrew/perls/system/lib/5.24.0 .) at
001_timing.pl line 3.
BEGIN failed--compilation aborted at 001_timing.pl line 3.