Added logging of the last run + moved use IO::Socket::SSL earlier in pcurse.pm to avoid warnings about prototype mismatch
This commit is contained in:
12
pcurse
12
pcurse
@ -1,12 +1,17 @@
|
||||
#!/usr/bin/env perl
|
||||
use strict;
|
||||
no warnings 'all';
|
||||
use feature ':5.10';
|
||||
use IO::Tee;
|
||||
use lib '.';
|
||||
use pcurse;
|
||||
use feature ':5.10';
|
||||
|
||||
select(STDOUT);
|
||||
$| = 1;
|
||||
my $logfile = $ENV{'HOME'}.'/.pcurse/lastrun.log';
|
||||
open my $lf, '>', $logfile or die 'Cannot write to logfile '.$logfile.': '.$!;
|
||||
select STDOUT;
|
||||
$| = 1;
|
||||
my $tee = IO::Tee->new(\*STDOUT, $lf);
|
||||
select $tee;
|
||||
|
||||
my $ret;
|
||||
my $msg;
|
||||
@ -125,3 +130,4 @@ foreach my $unpacking(keys %tounpack) {
|
||||
|
||||
($ret,$msg) = pcurse::save_config($conf->{'addons'},$addons);
|
||||
print $msg."\n" unless($ret);
|
||||
close $lf;
|
||||
|
||||
@ -2,13 +2,13 @@
|
||||
package pcurse;
|
||||
use strict;
|
||||
no warnings 'all';
|
||||
use IO::Socket::SSL;
|
||||
use Getopt::Long;
|
||||
use Archive::Extract;
|
||||
use Thread::Pool;
|
||||
use JSON;
|
||||
use LWP::UserAgent;
|
||||
use HTML::HTML5::Parser;
|
||||
use IO::Socket::SSL;
|
||||
use feature ':5.10';
|
||||
|
||||
sub merge_opts {
|
||||
@ -35,7 +35,7 @@ sub parse_arguments {
|
||||
"baseuri=s" => \$toret->{'baseuri'},
|
||||
"config=s" => \$toret->{'config'},
|
||||
"test" => \$toret->{'test'},
|
||||
"workers" => \$toret->{'workers'},
|
||||
"workers=i" => \$toret->{'workers'},
|
||||
"debug" => \$toret->{'debug'},
|
||||
"add=s" => \$toret->{'add'},
|
||||
"name=s" => \$toret->{'name'},
|
||||
|
||||
Reference in New Issue
Block a user