Closed kevindawson closed 10 years ago
I believe the point is that the search query is the same.
You can access the email address from either:
use MetaCPAN::Client;
use DDP;
use Try::Tiny;
my $mcpan = MetaCPAN::Client->new();
try{
my $author = $mcpan->author('BOWTIE');
p $author->email; # MetaCPAN::Client::Author
};
try{
my $author = $mcpan->author( { pauseid => 'BOWTIE'} );
p $_->email while $_ = $author->next; # MetaCPAN::Client::ResultSet
};
tsibley many thanks for the kick
it might be nice if the pod was extended to include it
@kevindawson Did you not read the documentation of MetaCPAN::Client::Author or MetaCPAN::Client::ResultSet? That's all I did.
@tsibley :+1:
@kevindawson even simpler - follow author documentation on perldoc MetaCPAN::Client
tsibley, yes I did read the pod, they are not the same
as for your helpful kick, did it not come from https://metacpan.org/pod/Search::Elasticsearch::Scroll
so as I said before, if you have to use a different technique to extract the data then they are not the same
@kevindawson No, my "kick" came from reading the documentation of MetaCPAN::Client::Author and MetaCPAN::Client::ResultSet, as I said. The difference between return values for simple and non-simple searches, particularly for ->author
, is described here: https://metacpan.org/pod/MetaCPAN::Client#author
And as I said before, "I believe the point is that the search query is the same," and produces the same conceptual results, not that you'd get back the exact same object to work with from the return value.
It's all documented, though I do think it can be clarified even a little bit more. See PR #13.
@tsibley thanks for the enlightenment :)
not true
produces the following
they are not the same to me as I can not extract email from both or from the following