21 my @opt = <<'=back' =~ /B<--(\S+)>/g;
25 Tells us what it would do and exits.
35 Starts catalyst. Concurrency is managed by IPC::ConcurrencyLimit.
41 use lib
"$FindBin::Bin/../CPAN-Blame/lib";
45 use CPAN
::Blame
::Config
::Cnntp
;
48 use File
::Basename
qw(dirname);
49 use File
::Path
qw(mkpath);
54 use Hash
::Util
qw(lock_keys);
58 lock_keys
%Opt, map { /([^=|!]+)/ } @opt;
68 $workdir = File
::Spec
->catdir
69 ($CPAN::Blame
::Config
::Cnntp
::Config
->{solver_vardir
},
72 use IPC
::ConcurrencyLimit
;
74 my($basename) = File
::Basename
::basename
(__FILE__
);
75 my $limit = IPC
::ConcurrencyLimit
->new
78 path
=> "$workdir/IPC-ConcurrencyLimit-$basename",
80 my $limitid = $limit->get_lock;
82 warn "Another process appears to be still running. Exiting.";
86 my $logfile = __FILE__
. ".log";
90 my $tm = Time
::Moment
->now_utc;
91 open my $fh, ">>", $logfile or die "Could not open '$logfile': $!";
92 print $fh "$tm $what\n";
93 close $fh or die "Could not close '$logfile': $!";
96 appendlog
("Starting as $$");
97 my $wd = "$FindBin::Bin/..";
98 chdir $wd or die "Could not chdir to $wd: $!";
99 0==system qq{"$^X" "$FindBin::Bin/../CPAN-Blame/script/cpan_blame_server.pl" "--port" "3002" >> $logfile 2>&1} or die "problem running webserver, giving up";
100 appendlog
("Finished as $$");
104 # cperl-indent-level: 4