in reply to Net::Server config-file extension

If I understand your question correctly, then you need to have a read of What is the easiest way of having a configuration file for my program?

HTH.

Walking the road to enlightenment... I found a penguin and a camel on the way.....
Fancy a yourname@perl.me.uk? Just ask!!!

Replies are listed 'Best First'.
Re^2: Net::Server config-file extension
by PetaMem (Priest) on May 26, 2005 at 10:34 UTC
    The question - formulated so it can be correctly understood - is:

    How do I sneak in my configuration parameters to a Net::Server configuration file?

    I definitely know how to get own config files easily and I definitely do not want an ADDITIONAL config file for this project.

    Bye
     PetaMem
        All Perl:   MT, NLP, NLU

      Ah, Okay, apologies. I never noticed you were a Saint ;-)

      Anyway, according to Server.pm, these are the only arguments that are available:

      Key/value pairs used by the server are removed by the configuration process so that server layers on top of C<Net::Server> can pass and read their own parameters. Currently, Getopt::Long is not used. The following arguments are available in the default C<Net::Server> or C<Net::Server::Single> modules. (Other personalities may use additional parameters and may optionally not use parameters from the base class.) Key Value Default conf_file "filename" undef log_level 0-4 2 log_file (filename|Sys::Syslog) undef ## syslog parameters syslog_logsock (unix|inet) unix syslog_ident "identity" "net_server" syslog_logopt (cons|ndelay|nowait|pid) pid syslog_facility \w+ daemon port \d+ 20203 host "host" "*" proto (tcp|udp|unix) "tcp" listen \d+ SOMAXCONN reverse_lookups 1 undef allow /regex/ none deny /regex/ none ## daemonization parameters pid_file "filename" undef chroot "directory" undef user (uid|username) "nobody" group (gid|group) "nobody" background 1 undef setsid 1 undef no_close_by_child (1|undef) undef ## See Net::Server::Proto::(TCP|UDP|UNIX|etc) ## for more sample parameters.

      I would suggest either hacking Server.pm, or creating a new config file for the whole lot.

      Just my poor advise.

      Walking the road to enlightenment... I found a penguin and a camel on the way.....
      Fancy a yourname@perl.me.uk? Just ask!!!