Cataly...er::SRU(3pm)
π Catalyst::Controller::SRU β the perl doc girlies' edition π
okay bestie, come sit with me, we're doing Catalyst::Controller::SRU from the User Contributed Perl Documentation, section 3pm. It's a Perl module, it's a whole vibe, and it's gonna make your controller dispatch SRU stuff like it's nothing. π¦
β¨ NAME β¨
Catalyst::Controller::SRU β Dispatch SRU methods with Catalyst. That's it, that's the whole name. Short, sweet, iconic. π
β¨ SYNOPSIS β¨
literally just use it as a base controller and write your three little subs, bestie:
package MyApp::Controller::SRU;
# use it as a base controller
use base qw( Catalyst::Controller::SRU );
# explain, scan and searchretrieve methods
sub explain {
my ( $self, $c,
$sru_request, # ISA SRU::Request::Explain
$sru_response, # ISA SRU::Response::Explain
) = @_;
}
sub scan {
my ( $self, $c,
$sru_request, # ISA SRU::Request::Scan
$sru_response, # ISA SRU::Response::Scan
$cql, # ISA CQL::Parser root node
) = @_;
}
sub searchRetrieve {
my ( $self, $c,
$sru_request, # ISA SRU::Request::SearchRetrieve
$sru_response, # ISA SRU::Response::SearchRetrieve
$cql, # ISA CQL::Parser root node
) = @_;
}
see how the $cql arg only shows up for scan and searchRetrieve? yeah. explain is the low-maintenance one. slay. π
β¨ DESCRIPTION β¨
So here's the tea: this module lets your controller class dispatch SRU actions β that's "explain", "scan", and "searchRetrieve" β from its own class. No extra plumbing, no side quests, just your controller doing the thing. periodt. β¨
β¨ METHODS β¨
π index : Private π
okay so this is the private one, the backstage manager, the main character behind the scenes. This method will create an SRU request, response and possibly a CQL object based on the type of SRU request it finds. Then it hands all that data over to your customized method. so basically it does the setup so you can do the fun part. π«Ά
β¨ SEE ALSO β¨
CatalystπSRUπ
go read those too, bestie, it's giving homework but the good kind. π
β¨ AUTHORS β¨
Brian Cassidy <bricas@cpan.org> β yeah, he wrote this. give him his flowers. π
β¨ 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. so like, go wild, but respectfully. π
reminder bestie: private means private. index is doing its little behind-the-scenes work, don't go calling it like it's a public API. π
and that's the whole page!! no notes. ate. π
mwah π this was perl v5.34.0, dated 2022-06-17, brought to you by the Cataly...er::SRU(3pm) era of the User Contributed Perl Documentation. stay iconic, bestie. πβ¨π¦
π¦ 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