I'd like to find a way to make a Perl script "modular". What I mean is that I want to be able to distribute a script either with or without a particular module/package/lib and have the main script run no matter if it's included or not.
What I'm trying to come up with is a "lite" version of a script that's missing some features. To "upgrade", all they'd have to do is drop in the new module without needing to change any code in the main script. Is that possible? Using either require, use, or do produces an error if I run the script without the module. Is there a specific function for this purpose, or would I have to do something like wrap a 'use' or 'require' in an if statement? I've tried that and it doesn't work so maybe I'm way off base on that one. I've been Googling for the last 2 days but not finding anything. I'm not really certain what to search for, so any pointers would be greatly appreciated. Thanks, Marc -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/