Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Convert SOAP service from CGI to Mod-Perl (ModPerl::Registry)

by jakeease (Friar)
on Oct 02, 2010 at 02:03 UTC ( #863032=note: print w/ replies, xml ) Need Help??


in reply to Convert SOAP service from CGI to Mod-Perl (ModPerl::Registry)

handlers are commonly named "handler" but it's not required. Do you have a PerlModule directive in httpd.conf?

PerlModule Hello


Comment on Re: Convert SOAP service from CGI to Mod-Perl (ModPerl::Registry)
Download Code
Re^2: Convert SOAP service from CGI to Mod-Perl (ModPerl::Registry)
by halfcountplus (Hermit) on Oct 02, 2010 at 12:45 UTC
    >>handlers are commonly named "handler" but it's not required.

    Just to clarify -- I did not say the handler had to be called "handler". What I said was the handler must contain a primary function, handler(), the same way an object definition must contain a function, new(), in order to be instantantiated as such. This IS REQUIRED by Apache, and hence mod perl. If you DO NOT have such a function, you will get the following apache error, eg:

    failed to resolve handler Hello

    I was just guessing that the OP was looking at an example "package handler" that had the primary function, handler(), and decided to rename not just the package -- which can be called anything, but that will be the name you use to register it -- and the handler() function, which would be a mistake, because it MUST be called handler() for the module to work.

      >>the OP ... decided to rename not just the package -- which can be called >>anything, ... and the handler() function, which would be a mistake, because it >>MUST be called handler() for the module to work.

      I agree that he should have named it handler() for it to work with the configuration and suggested changes to it. But it is NOT required to name the handler routine "handler()". It can be called anything. To make the OP's handler work, something like the following directive would be needed:

      PerlHandler Hello::hello #or PerlHandler Hello->hello

      Since I didn't point that out, that part of my response was more of a distraction than solution, and yours a significant step toward a solution.

Re^2: Convert SOAP service from CGI to Mod-Perl (ModPerl::Registry)
by banco (Initiate) on Oct 02, 2010 at 14:16 UTC

    I wasn't aware of that particular directive. I'll check it out ... thanks for the reply.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://863032]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2014-12-21 18:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (106 votes), past polls