Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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;"

In reply to Re: Namespace Pollution by Necos
in thread Namespace Pollution by Tanalis

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-25 13:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found