Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I think that what you want is to embed Perl in your server.

Embed Perl in other C program is not difficult, but mod_perl is much more than just Perl inside apache. mod_perl works directly with Apache, and you can handle and control a lot of behaviors of Apache from Perl.

But I don't want to discourage you. Soo, first perlembed in your App. Than you need to redirect the output of Perl to the socket of the client, without forget the reverse of that, the input (STDIN). Well, I think that you have done something like that for CGI.

After do the IO work, you need to overwrite exit() and die(), since you can't let the Perl script to close or dump your server. And the work goes. Soo, you will need to like to hack the Perl internals.

Also you can do a lot of this changes with pure Perl, since the language let you change the Perl interpreter behavior. Soo, here are some modules that can help you to do the pure Perl changes:

  • Die::Alive
  • Safe::World
  • Also you can talk with the mod_perl folks. They can help you, or give you some light.

    Good luck! ;-P

    Graciliano M. P.
    "Creativity is the expression of the liberty".

    In reply to Re: own "mod_perl" implemenation by gmpassos
    in thread own "mod_perl" implemenation by esskar

    Use:  <p> text here (a paragraph) </p>
    and:  <code> code here </code>
    to format your post; it's "PerlMonks-approved HTML":

    • Are you posting in the right place? Check out Where do I post X? to know for sure.
    • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
      <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
    • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
    • Want more info? How to link or How to display code and escape characters are good places to start.
    Log In?

    What's my password?
    Create A New User
    Domain Nodelet?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (1)
    As of 2023-09-23 18:02 GMT
    Find Nodes?
      Voting Booth?

      No recent polls found