in reply to modularization, memory usage and performance

You want to use CGI::Application. It would be very easy to have a subclass of C::A also inherit from or delegate to HTTP:::Server::Simple. Some benefits:

As for your Tie::Persistent thing ... go with a database. There's no reason not to use DBD::SQLite, seeing as PodMaster already has a version compiled for both ActivePerl 5.6 and ActivePerl 5.8.

Now, to deal with your general architecture. I have no idea what you're doing, what the script is meant to do, or why. I do know that you're intending on distributing an application that creates a web server to people who don't know enough about programming to figure out how to install something.

*blinks*

This is going to create security holes ... I would strongly suggest that, if you intend on doing this, you provide the source code to some community, possibly Perlmonks, so that it can be peer-reviewed. Otherwise, you will be doing your users a disservice by providing them unreviewed software that can open their computers to malicious people.

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Replies are listed 'Best First'.
Re^2: modularization, memory usage and performance
by jmagiera (Novice) on Feb 09, 2005 at 14:15 UTC
    CGI::Application sounds very promising, thank you for that.
    I think it's time for some more revelation about what I am doing so as to avoid misunderstanding. The application actually has its own website, but it's in German, and as this site's primary language is English I thought I wouldn't bother linking. But anyway: http://www.auctober.de
    Just to encourage you: I keep all code commented in English. :D

    Auctober is a freeware tool for sellers on eBay Germany. I know there are many of such tools, but I think I have a few unique goals:
    1) platform independence
    2) no presentation layer (Webbrowser is the GUI)
    3) very small (once perl is installed)

    At the beginning I made the tool for myself, but then I just got a kick out of publishing it, at first for "advanced users" who knew how to install a webserver or had one. Then I included Xitami for Windows-Users, which I shipped with the application. Now I want to get rid of Xitami and ship my own 20K webserver :D

    I hear your security concerns and I am aware of them. I am thinking of including at least an HTTP basic authentication in the webserver (should be easy with perl, right?). Of course I am also making sure that the requests can't access other documents besides the ones needed for the application (like /etc/passwd or so).

    I am considering using DBD::SQLIte2, but the compiled version (Windows) is 1.2 MB, and that's almost as big as my whole distribution at the moment. If possible I would like to avoid that. Tie::Persistent worked really well for me and maybe I can modify it so it doesn't keep references.

    -----------
    Perl help me.