Git-Server
view release on metacpan or search on metacpan
hooks/post-action view on Meta::CPAN
my $total = @events-3 or last; # Ignore . and .. and .lock
my $progress = 0;
foreach my $file (sort @events) {
next if $file =~ /^\.(|\.|lock)$/;
$0 = "$Script - Running WebHooks: ".++$progress."/$total";
next if $file !~ /^webhook-.*\.queue$/;
my $f = "$queue/$file";
my $p = "$f.$$-RUNNING";
rename $f, $p or !warn localtime().": [$who] git-server: [$$] DEBUG: Rename Failed! [$f] $!\n" or next;
open $q, "+<", $p or open $q, "<", $p or !warn localtime().": [$who] git-server: [$$] DEBUG: Open Failed! [$f] $!\n" or next;
my $event = do { local $/ = ""; scalar <$q> };
if ($event =~ /^\s*\{/) {
# Must be JSON
$event = eval {
require JSON;
JSON->new->decode($event);
};
}
elsif ($event =~ /^\s*\$VAR1\s*=/) {
# Must be the silly Dumper
my $VAR1 = undef;
( run in 2.395 seconds using v1.01-cache-2.11-cpan-b16cb0d3907 )