in reply to Conditional including of a module

I've done this several times for several different reasons. Your main issue is that the use statement is interpreted as soon as the ; is hit. What I've done has been a variation of

if ( $need_library ) { eval "use THE_LIBRARY_IN_QUESTION;"; die $@ if ( $@ ); }

or something close to that. I think I once populated a list with needed libraries and looped through the list to load (use) them.

-- doug