Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Email-Simple CPAN distribution.

Report information
The Basics
Id: 86925
Status: resolved
Priority: 0/
Queue: Email-Simple

People
Owner: Nobody in particular
Requestors: rfg [...] tristatelogic.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Better documentation would be nice...
Date: Sun, 14 Jul 2013 12:42:55 -0700
To: bug-Email-Simple [...] rt.cpan.org
From: "Ronald F. Guilmette" <rfg [...] tristatelogic.com>
On the following page: http://search.cpan.org/~rjbs/Email-Simple-2.201/lib/Email/Simple/Header.pm two methods are incompletely described, i.e. "header_names" and also "header_pairs". Specifically, there is no indication what kinds of things are returned by these methods. Because the nature of the return values for these two methos are not documented, a reader who is not familiar with this specific Perl package is forced to make educated guesses about what the return values will be. Specifically, I assume that the return value of "header_names" is a simple array, but would it kill you guys to just say that, you know, on the man page? Likewise, my first guess would be that the return value of "header_pairs" would be a hash, where the keys are the initial tokens of the various header lines (e.g. "Subject", "Message-ID", etc.) but then I realize that that wouldn't work because for some header types (e.g. "Received") there could be more than one in the header of a single message. So obviously, the return value of header_pairs must be an array object but what are the elements of this array? Is each element a reference to another array which itself consists of just two values, i.e. name & value? That would make the most sense, but since the documentation doesn't give the reader any guidance I guess I'll have to just play around with it until I figure out the relevant facts that should have been in the man page. Note please: The questions about are retorical only. Please DO NOT just tell me about the nature of the return values of the methods I've mentioned. Instead, please DOCUMENT that in the man page, so that everyone can see it. Thanks.
I have noted that the methods return lists. However, I feel the documentation was already pretty clear. It said it returns pairs. Pairs are just that, pairs. This term is used all over the perl documentation. I did add the word "list" to both, to make it clear that it is not returning a reference.
Subject: Re: [rt.cpan.org #86925] Better documentation would be nice...
Date: Wed, 04 Sep 2013 13:52:56 -0700
To: bug-Email-Simple [...] rt.cpan.org
From: "Ronald F. Guilmette" <rfg [...] tristatelogic.com>
In message <rt-4.0.16-4760-1378301839-1537.86925-6-0@rt.cpan.org>, you wrote: Show quoted text
><URL: https://rt.cpan.org/Ticket/Display.html?id=86925 > > >I have noted that the methods return lists. However, I feel the documentation > was already pretty clear. It said it returns pairs. Pairs are just that, pa >irs. This term is used all over the perl documentation. I did add the word " >list" to both, to make it clear that it is not returning a reference.
I disagree with your analysis and still feel that the methods in question, and specifically the nature of the return values of each, are not at all well documented. I don't see why brevity is preferred over clarity in these instances, and that nature of the return values is *definitely* not clear. P.S. What do these methods yield in non-list contexts?
Subject: Re: [rt.cpan.org #86925] Better documentation would be nice...
Date: Wed, 4 Sep 2013 17:04:59 -0400
To: "Ronald F. Guilmette via RT" <bug-Email-Simple [...] rt.cpan.org>
From: Ricardo Signes <rjbs [...] cpan.org>
* "Ronald F. Guilmette via RT" <bug-Email-Simple@rt.cpan.org> [2013-09-04T16:53:20] Show quoted text
> I disagree with your analysis and still feel that the methods in > question, and specifically the nature of the return values of each, > are not at all well documented.
header_names This method returns a list of the unique header names found in this header, in no particular order. How could that be clearer? I don't see it. It returns a list. It is a list of names. Header names, everywhere in the docs, are strings. header_pairs my @pairs = $header->header_pairs; my $first_name = $pairs[0]; my $first_value = $pairs[1]; This method returns a list of all the field/value pairs in the header, in the order that they appear in the header. (Remember: don't try assigning that to a hash. Some fields may appear more than once!) Similarly, how could this be clearer? Show quoted text
> I don't see why brevity is preferred over clarity in these instances, > and that nature of the return values is *definitely* not clear.
I don't see how they are not clear. How are they not clear? Show quoted text
> P.S. What do these methods yield in non-list contexts?
It says they return lists. Call them in list context. The behavior in other contexts is not defined. -- rjbs
Subject: Re: [rt.cpan.org #86925] Better documentation would be nice...
Date: Fri, 06 Sep 2013 12:20:58 -0700
To: bug-Email-Simple [...] rt.cpan.org
From: "Ronald F. Guilmette" <rfg [...] tristatelogic.com>
In message <rt-4.0.16-16490-1378328725-382.86925-6-0@rt.cpan.org>, you wrote: Show quoted text
><URL: https://rt.cpan.org/Ticket/Display.html?id=86925 > > >* "Ronald F. Guilmette via RT" <bug-Email-Simple@rt.cpan.org> [2013-09-04T16:5 >3:20]
>> I disagree with your analysis and still feel that the methods in >> question, and specifically the nature of the return values of each, >> are not at all well documented.
> > header_names > > This method returns a list of the unique header names found in this header, > in no particular order. > >How could that be clearer? I don't see it. It returns a list.
I guess that we are talking at cross purposes. I am looking at the specific web page that was cited in my original bug report, and it still says this: header_names This method returns the unique header names found in this header, in no particular order. As you can see, the word "list" is not present there. I guess that the bottom line here is that a change was made to insert the clarifying word "list" into the text, but that change has not yet "gone live" on the web site. Is that a correct assesment? If so then my bad, and you can ignore my earlier comment. Regards, rfg
Subject: Re: [rt.cpan.org #86925] Better documentation would be nice...
Date: Fri, 6 Sep 2013 15:26:13 -0400
To: "Ronald F. Guilmette via RT" <bug-Email-Simple [...] rt.cpan.org>
From: Ricardo Signes <rjbs [...] cpan.org>
* "Ronald F. Guilmette via RT" <bug-Email-Simple@rt.cpan.org> [2013-09-06T15:21:15] Show quoted text
> I guess that we are talking at cross purposes. > > I am looking at the specific web page that was cited in my original bug > report, and it still says this:
Do you mean this page: http://search.cpan.org/~rjbs/Email-Simple-2.201/lib/Email/Simple/Header.pm ? If so, note that there is a *version number* in the URL. It's always going to show you the docs for 2.201. The latest version of that resource is: http://search.cpan.org/~rjbs/Email-Simple/lib/Email/Simple/Header.pm -- rjbs
Download signature.asc
application/pgp-signature 490b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #86925] Better documentation would be nice...
Date: Fri, 06 Sep 2013 14:01:44 -0700
To: bug-Email-Simple [...] rt.cpan.org
From: "Ronald F. Guilmette" <rfg [...] tristatelogic.com>
In message <rt-4.0.16-2247-1378495593-789.86925-6-0@rt.cpan.org>, you wrote: Show quoted text
><URL: https://rt.cpan.org/Ticket/Display.html?id=86925 > > >* "Ronald F. Guilmette via RT" <bug-Email-Simple@rt.cpan.org> [2013-09-06T15:2 >1:15]
>> I guess that we are talking at cross purposes. >> >> I am looking at the specific web page that was cited in my original bug >> report, and it still says this:
> >Do you mean this page: > > http://search.cpan.org/~rjbs/Email-Simple-2.201/lib/Email/Simple/Header.pm > >? > >If so, note that there is a *version number* in the URL. It's always going to >show you the docs for 2.201. The latest version of that resource is: > > http://search.cpan.org/~rjbs/Email-Simple/lib/Email/Simple/Header.pm
OK. My bad. I didn't know about the version number. I think that we are good, now.