Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency on CGI::Application in SRU::Server #4

Open
nichtich opened this issue Mar 22, 2013 · 0 comments
Open

Remove dependency on CGI::Application in SRU::Server #4

nichtich opened this issue Mar 22, 2013 · 0 comments

Comments

@nichtich
Copy link
Collaborator

SRU 1.00 does not explicitly depend on CGI::Application, but SRU::Server requires CGI::Application. I am not sure how to best change SRU::Server, but I'd like to modify the current connection to CGI::Application and better support PSGI. Any suggestions?

How about moving base and methods of CGI::Application from SRU::Server to a new module CGI::Application::SRU and create another module Plack::App::SRU, both to be used this way:

{
    package MyApp;
    use base qw(SRU::Server); # does not require CGI::Application 

    sub explain { ... }
    sub scan { ... }
    sub retrieve { ... }
}

Use as CGI::Application:

use MyApp;
MyApp->new->as_cgiapp->run; # requires CGI::Application

Use as PSGI application (requires Plack::App::SRU):

use MyApp;
MyApp->new->as_psgi;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant