The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Catalyst::Plugin::SRU - Dispatch SRU methods with Catalyst

SYNOPSIS

    # include it in plugin list
    use Catalyst qw( SRU );
    
    # Public action to redispatch
    sub sru : Global {
        my ( $self, $c ) = @_;
        $c->parse_sru;
    }
    
    # explain, scan and searchretrieve methods
    sub explain : Private {
        my ( $self, $c ) = @_;

        # $c->sru_request ISA SRU::Request::Explain
        # $c->sru_response ISA SRU::Response::Explain
    }
    
    sub scan : Private {
        my ( $self, $c ) = @_;

        # $c->cql ISA CQL::Parser root node
        # $c->sru_request ISA SRU::Request::Scan
        # $c->sru_response ISA SRU::Response::Scan
    }
    
    sub searchRetrieve : Private {
        my ( $self, $c ) = @_;

        # $c->cql ISA CQL::Parser root node
        # $c->sru_request ISA SRU::Request::SearchRetrieve
        # $c->sru_response ISA SRU::Response::SearchRetrieve
    }

DESCRIPTION

This plugin allows your controller class to dispatch SRU actions (explain, scan, and searchRetrieve) from its own class.

METHODS

parse_sru( )

This method will create sru_response, sru_request (and possibly cql) methods based on the type of SRU request it finds. It will then pass the request over to your customized method.

SEE ALSO

AUTHOR

  • Brian Cassidy <bricas@cpan.org>

COPYRIGHT AND LICENSE

Copyright 2005 by Brian Cassidy

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.