added needed use directive
[monkeysphere-validation-agent.git] / Crypt / Monkeysphere / MSVA / Monitor.pm
index 237e55b3f5776d3067a7df2369ab384ef1abbd8e..8dae0de0ca76187727fb7bcb77b10e8138f3398a 100644 (file)
@@ -23,6 +23,7 @@
 
 { package Crypt::Monkeysphere::MSVA::Monitor;
 
+  use Module::Load::Conditional;
   use strict;
   use warnings;
 
@@ -95,6 +96,8 @@ Would you like to restart the validation agent?");
   sub childmain {
     my $self = shift;
 
+    $0 = 'MSVA (perl) Upgrade Monitor';
+
     $self->{files} = [ $0, values(%INC) ];
     $self->{logger}->log('debug3', "setting up monitoring on these files:\n%s\n", join("\n", @{$self->{files}}));
 
@@ -106,7 +109,7 @@ Would you like to restart the validation agent?");
 
     require Linux::Inotify2;
 
-    $self->{inotify} = new Linux::Inotify2
+    $self->{inotify} = Linux::Inotify2::->new()
       or die "unable to create new inotify object: $!";
 
     my $flags = 0xc06;