in reply to Copying complete module code into a script
Yes you can technically do this. At this node I did just that to make it easy to run the example.
When you say doesn't seem to work what exactly do you mean. Compile time errors, runtime errors, wrong output, no output? How did you do the cut and paste. Did you include the package names? You need to give your script a package name too or paste the modules at the end of the script so that your script defaults to main and the modules have their proper package names.
Part of the module rational is to allow you to simply update the one module and (hopefully) all the scripts that use it then benefit from the bug fixes/patches...Doesn't always go that smoothly when the author changes the interface but that is another story.
I have just tested MIME::Lite by pasting one of the examples given at the top of the module and it produces the expected output - ie a MIME encoded string.
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|