From: Jakub Narebski <jnareb@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, Eric Wong <normalperson@yhbt.net>
Subject: Re: [RFC/PATCHv3] git-instaweb: Add support for running gitweb via 'plackup'
Date: Tue, 25 May 2010 02:11:02 +0200 [thread overview]
Message-ID: <201005250211.04469.jnareb@gmail.com> (raw)
In-Reply-To: <AANLkTikSXOrF-mS3XzVAohgoNXXNZwN3jBw6Sh4TnK6M@mail.gmail.com>
On Sun, 23 May 2010, Ævar Arnfjörð Bjarmason wrote:
> 2010/5/22 Jakub Narebski <jnareb@gmail.com>:
> >
> > Webrick, which is in similar situation, uses httpd.conf config file in
> > YAML. Unfortunately there is no config / serialization reader in Perl
> > core, so if we have to go this route either the config file would have
> > to be in Perl, or gitweb.psgi wrapper would have to include some simple
> > config file parsing.
>
> You could easily do (pseudocode):
>
> unless (eval { require Config::Any; 1 }) {
> do $conf_file;
> } else {
> my $parser = Config::Any->new( ... );
> $parser->docnf( $conf_file );
> }
>
> Then you'd read (eval) a perl config file by default, but remain
> compatible with saner config formats for users prepared to install
> things from the CPAN.
I was thinking more about something like that:
my @opts = qw(--env deployment);
while (<>) {
chomp;
next unless $_; # skip empty lines
next if /^\s*#/; # skip comments
if (/^\s*(.*?)\s*=\s*(.*)\s*$/) {
push @opts, '--'.lc($1), $2;
}
}
where httpd.conf would look like this:
port = 1234
host = 127.0.0.1
Anyway, if such code is to be be added, it would be added in a separate
commit.
--
Jakub Narebski
Poland
next prev parent reply other threads:[~2010-05-25 0:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-19 17:31 [RFC/PATCH] git-instaweb: Add support for running gitweb via 'plackup' Jakub Narebski
2010-05-19 20:52 ` Jakub Narebski
2010-05-20 11:56 ` [PATCHv2 (RFC)] " Jakub Narebski
2010-05-20 21:55 ` [RFC/PATCHv3] " Jakub Narebski
2010-05-22 21:30 ` Jakub Narebski
2010-05-23 9:19 ` Eric Wong
2010-05-23 11:17 ` Jakub Narebski
2010-05-23 12:38 ` Ævar Arnfjörð Bjarmason
2010-05-25 0:11 ` Jakub Narebski [this message]
2010-05-25 9:02 ` Jakub Narebski
2010-05-23 9:31 ` [RFC/PATCH] " Eric Wong
2010-05-23 20:21 ` Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201005250211.04469.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=normalperson@yhbt.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.