Re: [PATCH] git-daemon: more powerful base-path/user-path settings, using formats.
From: Randal L. Schwartz <hidden>
Date: 2016-06-15 22:42:38
quoted
quoted
quoted
quoted
"Junio" == Junio C Hamano [off-list ref] writes:
Junio> About vger potentially throwing things away, I use this script
Junio> (called "taboo.perl") to check my messages before sending them
Junio> out.
Junio> Obviously the taboo-word list itself is not attached here, but
Junio> the actual script should have a copy of it after the __DATA__
Junio> marker.
With "Inline::Files" from the CPAN, you could have a switch where the
script updates itself with the new list:
use Inline::Files;
if (@ARGV == 1 and $ARGV[0] eq "-update") {
use LWP::Simple;
my $list = get "http://example.com/foo/bar.txt";
open DATA, ">$DATA" or die "cannot write myself: $!";
print DATA $list;
close DATA;
exit 0;
}
... rest of your program here ...
... read using <DATA> as before ...
__DATA__
the list will magically go here.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[off-list ref] <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!