SRU::R...:Record(3pm)
π SRU::Response::Record β the record-glow-up page π
ok so bestie, welcome to the User Contributed Perl Documentation corner of the internet π this is the page for SRU::Response::Record, and yes the header up top gets truncated to SRU::R...:Record(3pm) because Perl manpages love a dramatic ellipsis π
β¨ NAME β¨
SRU::Response::Record β a class for representing a result record in a searchRetrieve response. it's giving "one little metadata record, all dressed up and ready to be shipped out" π¦
β¨ SYNOPSIS β¨
my $record = SRU::Response::Record->new();
$record->recordData( '<title>Huck Finn</title>' );
$response->addRecord( $record );
look at that. three lines. flawless. no notes. π
β¨ DESCRIPTION β¨
SRU::Response::Record is the lil bundle-up container for all the info about one specific metadata record inside an SRU::Response::SearchRetrieve object. πΈ
the usual vibe: you build a record object, then you add it to the SearchRetrieve response. that's it. that's the whole job. main character energy, minimal effort, periodt. π
β¨ METHODS β¨
π new()
ok so you must supply the recordSchema and recordData parameters. no skipping, bestie, they're required. π
you may also supply recordPacking, recordPosition, and extraRecordData. those ones are optional, they just come along for the ride. β¨
my $record = SRU::Response::Record->new(
recordSchema => 'info:srw/schema/1/dc-v1.1',
recordData => '<title>Huckleberry Finn</title>'
);
π recordSchema()
this is the URI identifier of the XML schema that the record is encoded in. π₯
important lore: even though the request might use the server's assigned short name, the response must always be the full URI. no shortcuts in the response, bestie, we're doing it properly. π
π recordData()
the record itself, either as a string or as embedded XML. π
and if you wanna pass in an object? totally allowed, queen β as long as it implements the asXML() method. that's the one condition. iykyk. π¦
π recordPacking()
the packing used in recordData, as requested by the client, or the default: "XML". that's the fallback, no cap. π
π recordPosition()
the position of the record within the result set. π
and here's the cute part: if you don't pass it in, recordPosition gets automatically calculated for you when you add or retrieve a record from an SRU::Response::SearchRetrieve object. it just handles it. lowkey thoughtful of it. π
π extraRecordData()
any extra data associated with the record. π
for the full tea on this one, go look at the section on extensions. that's where the details live.
π asXML()
that's it, that's the entry. the original page lists the method and then moves straight on β no description follows it here, so i'm not gonna invent one for you, bestie. i would never make up lore. ππ
β¨ 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. slay, honestly. π
and that's the whole page!! β big mwah to perl v5.34.0, dated 2022-06-17, and to SRU::R...:Record(3pm) for being our little truncated icon π byeee, go build some records π§π
π¦ 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