fix dancer import issues

This commit is contained in:
Oliver Gorwits
2012-12-03 21:09:25 +00:00
parent 1db530652f
commit ed234bd2dc
3 changed files with 6 additions and 9 deletions

View File

@@ -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
} }

View File

@@ -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;

View File

@@ -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;
} }