rastoboy has asked for the wisdom of the Perl Monks concerning the following question:
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Putting comments in an object
by moritz (Cardinal) on Apr 02, 2010 at 10:51 UTC | |
by rastoboy (Monk) on Apr 03, 2010 at 02:47 UTC | |
|
Re: Putting comments in an object
by LanX (Saint) on Apr 02, 2010 at 12:53 UTC | |
by Corion (Patriarch) on Apr 02, 2010 at 12:58 UTC | |
|
Re: Putting comments in an object
by doug (Pilgrim) on Apr 02, 2010 at 12:41 UTC | |
|
Re: Putting comments in an object
by Jenda (Abbot) on Apr 02, 2010 at 15:55 UTC | |
|
Re: Putting comments in an object
by BrowserUk (Patriarch) on Apr 02, 2010 at 10:56 UTC |