refactoring

optimize imports
reformat source code
remove unused cpu and memory log functionality
This commit is contained in:
Milan
2018-08-29 00:10:15 +02:00
parent c37c71f29e
commit 05b1251c1a
81 changed files with 9242 additions and 9962 deletions

View File

@@ -1,17 +1,17 @@
package config;
require Exporter;
my @ISA = qw(Exporter);
my @EXPORT_OK = qw(get $config);
my %EXPORT_TAGS = ( 'all' => [ @EXPORT_OK ] );
my @ISA = qw(Exporter);
my @EXPORT_OK = qw(get $config);
my %EXPORT_TAGS = ( 'all' => [@EXPORT_OK] );
use Config::General;
use Config::General();
our $modified_at=-999;
our $config= undef;
our $modified_at = -999;
our $config = undef;
sub get{
my $filename=shift;
sub get {
my $filename = shift;
#return config if known
#my $age=(-M $filename);
@@ -19,11 +19,12 @@ sub get{
#reload config if changed
my $configuration = new Config::General(
-ConfigFile=>$filename,
-UTF8=>1
-ConfigFile => $filename,
-UTF8 => 1
);
$config::config=$configuration->{DefaultConfig}->{config};
$config::modified_at=$age;
$config::config = $configuration->{DefaultConfig}->{config};
$config::modified_at = $age;
#print STDERR "reload $filename\n";
return $config::config;