Change MainLoop; to MainLoop(); to fix the problem. MainLoop; is only the same as MainLoop(); if, at the time that it is compiled, you have already declared a subroutine with that name. Otherwise it is a bareword which is either the same as "MainLoop"; (if strict isn't on) or is a fatal error.
Read (tye)Re: use vs. require and Conditional compile-time magic (RE: Checking to see if a particular Module is installed) for more to meditate on.
Thanks to ybiC for pointing this out.
- tyeIn reply to (tye)Re2: using 'use' conditionally
by tye
in thread using 'use' conditionally
by xafwodahs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |