SRU::Response(3pm)

πŸ“¦
version 1.01 Β· 2 versions
  • 1.01 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 1.01 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– SRU::Response πŸ’–

the manual page for SRU::Response(3pm) β€” User Contributed Perl Documentation, bestie. come sit with me, we're gonna factory some response objects together 🫢


✨ NAME ✨

SRU::Response β€” a whole factory for creating SRU response objects πŸ‘‘


🌸 SYNOPSIS 🌸

my $request = SRU::Request->newFromURI( $uri );
my $response = SRU::Response->newFromRequest( $request );

look at her. two lines. iconic. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so SRU::Response gives you a mechanism for creating the appropriate response object based on a request that gets passed in. that's the whole vibe. it's giving matchmaker.

like, if you hand it a SRU::Request::Scan object, you get back a SRU::Response::Scan object β€” with some of the particulars already filled in. no cap, it just knows. πŸ”₯


πŸŽ€ METHODS πŸŽ€

newFromRequest()

this is the factory method and she is the main character. you must pass in a valid request object:

  • SRU::Request::Explain
  • SRU::Request::Scan
  • SRU::Request::SearchRetrieve
⚠️ and if you fail to pass in the correct object?? bestie. you get returned undef, with an appropriate error stored in $SRU::Error. so check that. fr fr. 😭

🌈 INHERITED METHODS 🌈

SRU::Resonse (yes that's how it's spelled in the source, we don't make the rules πŸ’€) also serves as the base class for the three response types, which means it hands down some general functionality to the child classes. slay, inheritance.

type()

returns 'searchRetrieve', 'scan' or 'explain' depending on what type of object it is. vibe check passed. ✨

addDiagnostic()

diagnosticsXML()

stylesheetXML()


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.


okay that's the whole page bestie, tysm for reading πŸ₯ΉπŸ’– this was perl v5.34.0, dated 2022-06-17, and it's the SRU::Response(3pm) page. mwah. go write some responses. πŸŒΈπŸ¦‹βœ¨

πŸ“¦ where this page comes from