http://www.perlmonks.org?node_id=693964


in reply to Re: Avoid using a module if it's not available
in thread Avoid using a module if it's not available

I found this node while looking for a way to do exactly what the OP is trying to do, and I believe there are legitimate reasons to do such a thing.

For example, sometimes you want to use whichever XML parsing module is available.

Or maybe you want to provide enhanced functionality to people who have some special module installed. Term::ReadLine, for example, lets people on GNU systems do more stuff.

I need additional modules to reliably guess stuff; my script asks the user for confirmation anyway, so if a good guess is not available — it's not a huge problem, we'll just ask the user.