Well, maybe it's the way packages are documented, or maybe because Perl is an organic effort, or maybe the official Java API documentation feels easier on my eyes. Or perhaps I feel this way because I have more experience with Java packages than Perl modules.
In the example above, for instance, there is no method specifically declared "add_to_cds()" in package Artist. I wondered if someone wrote a package so ingenious that just relating Artists to CDs in a certain way would automatically generate methods like these; with Perl, you never know, I mean I don't see why it can't be done. But of course I doubt that this is the case -- but I knew right then that there was stuff implied in the examples that wouldn't be immediately obvious to me. I felt like I was left dangling a bit.
And then I had to make the leap from seeing a method I know nothing about (add_to_cds()) do something that's not documented (it actually creates and returns a new CD). My assumptions are probably right (rule of least surprise meets DWIM and TMTOWTDI, right?), but I'm not completely positive --
the DWIM to TMTOWTDI ratio is low. Of course, a few lines later the example code shows that those assumptions are probably 100% correct, because of the reference to $cd passed back, and later manipulated. Nevertheless, I had to decipher the documentation. In other words, I needed documentation on the documentation, I needed more commentary. Actually, in-line comments would have been perfectly fine.
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.