SRU::R...etrieve(3pm)
π SRU::Response::SearchRetrieve π
okay bestie, so this is a page from the User Contributed Perl Documentation set, and it's all about SRU::Response::SearchRetrieve β that's the 3pm one. it's a whole class for representing SRU searchRetrieve responses. yes, the real deal. sit down, hydrate, let's go π«Ά
β¨ NAME β¨
SRU::Response::SearchRetrieve β a class for representing SRU searchRetrieve responses. that's it, that's the vibe π
πΈ SYNOPSIS πΈ
## create response from the request object
my $response = SRU::Response::SearchRetrieve->new( $request );
## add records to the response
foreach my $record ( @records ) { $response->addRecord( $record ); }
## print out the response as XML
print $response->asXML();
look at that. three little steps and you're iconic β¨
π¦ DESCRIPTION π¦
so SRU::Response::SearchRetrieve hands you a framework for bundling up the response to a searchRetrieve request. that's the whole point of it, no cap.
here's the deal though: you are the one responsible for generating the XML representation of the records. that part is on you, bestie π the rest, though? the rest should be taken care of. handled. done. slay π
π METHODS π
new()
no description given, she's mysterious. main character energy, honestly π
numberOfRecords()
returns the number of results associated with the object. literally just the count. that's it, that's the function π
addRecord()
adds a SRU::Response::Record object to the response.
$response->addRecord( $r );
β οΈ heads up bestie: if you don't pass in the right sort of object you'll get backundefand$SRU::Errorwill be populated appropriately. so like, don't be messy with your types π
records()
gets or sets all the records associated with the object.
π be careful with this one :) you must pass in an array ref, and expect an array ref back. array ref in, array ref out. do not fight this. respect the contract π₯
resultSetId()
listed, no description. she's there. she exists. π
resultSetIdleTime()
also just vibing on the list, no description attached π
nextRecordPosition()
same story, present and accounted for β
diagnostics()
on the list, no notes π§
extraResponseData()
you guessed it β on the list π
echoedSearchRetrieveRequest()
still on the list, still iconic β¨
asXML()
asXML(encoding=>"ISO-8859-1")
returns the object serialized as XML π
UTF-8 and UTF-16 are the default encodings if you don't pass the encoding parameter. and you can define a different encoding in order to parse your XML document correctly. so like, pick your encoding, be intentional about it π
π COPYRIGHT AND LICENSE π
this software is copyright (c) 2013 by Ed Summers.
this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. periodt π«Ά
and that's the whole page bestie!! this was perl v5.34.0, dated 2022-06-17, from the SRU::R...etrieve(3pm) manual π go forth and bundle your responses responsibly, ily, bye πβ¨
π¦ where this page comes from
- debian bookworm: libsru-perl 1.01-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libsru-perl 1.01-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libsru-perl 1.01-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libsru-perl 1.01-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libsru-perl 1.01-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms