fix dancer import issues
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env perl
|
#!/usr/bin/env perl
|
||||||
|
|
||||||
use Dancer ':script';
|
use Dancer ':syntax :script';
|
||||||
use Dancer::Plugin::DBIC 'schema';
|
use Dancer::Plugin::DBIC 'schema';
|
||||||
|
|
||||||
# add dispatch methods for each port control action
|
# add dispatch methods for each port control action
|
||||||
@@ -29,9 +29,6 @@ sub gd_preconfig {
|
|||||||
sleep_time => 5,
|
sleep_time => 5,
|
||||||
};
|
};
|
||||||
|
|
||||||
# store for later access
|
|
||||||
var(nd_config => $config);
|
|
||||||
|
|
||||||
return (); # important
|
return (); # important
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
package Netdisco::PortControl;
|
package Netdisco::PortControl;
|
||||||
|
|
||||||
use strict;
|
|
||||||
use warnings FATAL => 'all';
|
|
||||||
|
|
||||||
use Netdisco::Util ':port_control';
|
use Netdisco::Util ':port_control';
|
||||||
use Try::Tiny;
|
use Try::Tiny;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package Netdisco::Util;
|
package Netdisco::Util;
|
||||||
|
|
||||||
use strict;
|
use Dancer qw/:syntax :script/;
|
||||||
use warnings FATAL => 'all';
|
use Dancer::Plugin::DBIC 'schema';
|
||||||
|
|
||||||
use SNMP::Info;
|
use SNMP::Info;
|
||||||
use Config::Tiny;
|
use Config::Tiny;
|
||||||
@@ -27,6 +27,9 @@ sub load_nd_config {
|
|||||||
die (Config::Tiny->errstr ."\n") if !defined $config;
|
die (Config::Tiny->errstr ."\n") if !defined $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# store for later access
|
||||||
|
var(nd_config => $config);
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user