I personally feel that the user of a module should be able to choose whether or not to import functions into their namespace. What if someone writes a function called
32_bit_shift(), and I don't know about it, so I write a function with the same name. Which one gets called (I don't even know, because I try to pick names that won't be used)? Does perl generate an error? I've been lucky enough not to be bitten by conflicting function names.
I guess no importing is one of the reasons to use OO. Then, even if you have conflicting function names, Perl takes care of which to call (you did bless your objects properly, didn't you?). The one thing that urks me is the libwin32 series of modules export a ton of constants without even asking me. It's a good thing that all of those constants are the same across modules (and consistently valued too), or there would be tons of problems. It's also a good thing that those constants are documented, or someone might create a constant that happens to step on another constant's feet. I think that's one thing you forgot to mention: documentation. A module user should be able to import what they want, and not be forced to take anything he (or she) doesn't want or need. I think it's nicer that way.
Theodore Charles III
Network Administrator
Los Angeles Senior High
email->secon_kun@hotmail.com
perl -e "map{print++$_}split//,Mdbnr;"
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.