Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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

by halfcountplus (Hermit)
on Oct 02, 2010 at 12:45 UTC ( #863064=note: print w/ replies, xml ) Need Help??


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

>>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.


Comment on Re^2: Convert SOAP service from CGI to Mod-Perl (ModPerl::Registry)
Download Code
Re^3: Convert SOAP service from CGI to Mod-Perl (ModPerl::Registry)
by jakeease (Friar) on Oct 03, 2010 at 21:53 UTC

    >>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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2014-09-03 00:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (34 votes), past polls