in reply to Re^2: can't seem to import properly when using require
in thread can't seem to import properly when using require

I see you have yet to test in an environment where Term::ANSIColor isn't installed.

You also didn't actually show any of the code where the errors actually happen.

You can't conditionally use compile-time magic unless you also only conditionally compile the magic-using code.

So, I usually drop the BEGIN block and fix my code so it does not depend on compile-time magic from the optional module. But, looking at the docs for Term::ANSIColor, it looks like it flings compile-time magic all over the place. So you might find it easier to conditionally compile any code that makes use of said magic.

Not that I will help with that since you didn't include any of said magic-using code (that was failing).

- tye        

  • Comment on Re^3: can't seem to import properly when using require (test more)