Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Nice work.

I'd add three guidelines from perlmodlib to your naming list:

  • Generally the name should reflect what is special about what the module does rather than how it does it.
  • Avoid any risk of ambiguity.
  • Always try to use two or more whole words.

A name like "Object::Voodoo" really doesn't say anything abuot "what the module does," in other words, about the public functionality.

Similarly, Object::Dynamic and Class::Less seem ambiguous: starting from the name, there's very little chance that people would be able to guess what the module does, because there are so many other things that could be meant by "dynamic" or "class-less".

I would suggest finding a name that was more explicit about what the module does: it uses designated package variables as accessors for object instance values. (Right?) So your package name should reference those key concepts: object instances, and locally-scoped package variables.

Rather than shortening your current name of Object::Local, I'd lengthen it to Object::LocalVars. In the context of Perl, I think that people will rapidly parse "local vars" as "dynamically scoped package variables along the lines of local()."

I understand that you want the class name to be short, but since you only have to type it once per file, I think this is a mis-directed optimization. The extra few keystrokes in the name are a small price for people scanning a list of module names on CPAN being able to guesstimate the features it provides.

Update: If you'd a terse and "catchy" interface, provide an optional props.pm psuedo-pragma that delegates to the main class so that people can write use props; mad props, G; our $name : G;. People who are looking for something "wierd and different" can use this interface, while people who are looking for something practical will be able to understand the primary module name.


In reply to Re: RFC: an unusual inside-out object generator by simonm
in thread RFC: an unusual inside-out object generator by xdg

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 scrutinizing the Monastery: (2)
As of 2024-04-19 22:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found