Do not load Gruntmaster::Data if not needed
authorMarius Gavrilescu <marius@ieval.ro>
Thu, 22 Jan 2015 21:41:16 +0000 (23:41 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Thu, 22 Jan 2015 21:41:16 +0000 (23:41 +0200)
lib/Gruntmaster/Daemon.pm

index 681a141430953da05c7e2a11db3362522059c61c..a84fc57cfeb3dff949f0eef1ac3c02cf03240b29 100644 (file)
@@ -8,7 +8,6 @@ our $VERSION = '5999.000_004';
 
 use Gruntmaster::Daemon::Constants qw/ERR/;
 use Gruntmaster::Daemon::Format qw/prepare_files/;
-use Gruntmaster::Data;
 
 use File::Basename qw/fileparse/;
 use File::Temp qw/tempdir/;
@@ -34,6 +33,8 @@ use constant FORMAT_EXTENSION => {
 
 ##################################################
 
+sub purge;
+
 my $db;
 
 sub safe_can_nodie {
@@ -168,6 +169,7 @@ sub got_job{
 }
 
 sub run{
+       require Gruntmaster::Data;
        $db = Gruntmaster::Data->connect('dbi:Pg:');
        Log::Log4perl->init('/etc/gruntmasterd/gruntmasterd-log.conf');
        get_logger->info("gruntmasterd $VERSION started");
This page took 0.011354 seconds and 4 git commands to generate.