Greetings Brothers!
I'm a novice at object oriented perl (and OO programming in general), but it is starting to make proper sense to me.
But what I'm wanting to want to do is put comments in my objects. Some of the objects I'm building are rather large and complex. I have comments in my code, but I "feel" like it would be "right" to add some comments within the object itself to explain things to anyone who cared to dump it and inspect it. (Or for my future self, of course. I'm inclined to like the guy and don't want to give him a hard time).
I can't find any discussion of such a thing, or any obvious modules in cpan. That always makes me suspicious of my motives.
Am I wrong to want this? Is there something out there already to help me to it really nicely?
Or is this my first cpan contribution waiting to happen? :-)
Edit: I've been thinking in terms of just adding a hashref, perhaps named '#', and have its value be the comment. Or just sticking the comment in there as a hashref key.
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.