fix sharedir to use dist; add missing dep

This commit is contained in:
Oliver Gorwits
2012-12-18 00:07:48 +00:00
parent ea9a71fdb7
commit 7b1318679a
3 changed files with 6 additions and 3 deletions

2
.gitignore vendored
View File

@@ -3,3 +3,5 @@ Netdisco/logs/*
*.swp
*.pid
test.pl
MYMETA.*
*.tar.gz

View File

@@ -17,10 +17,11 @@ requires 'HTTP::Tiny' => 0;
requires 'List::MoreUtils' => 0;
requires 'Net::MAC' => 0;
requires 'NetAddr::IP' => 0;
requires 'Parallel::Prefork' => 0;
requires 'Path::Class' => 0;
requires 'Plack' => 0;
requires 'Role::Tiny' => 0;
requires 'SNMP::Info' => 0;
requires 'SNMP::Info' => '2.11';
requires 'SQL::Translator' => 0;
requires 'Socket6' => 0;
requires 'Template' => 0;

View File

@@ -4,7 +4,7 @@ use strict;
use warnings FATAL => 'all';
use 5.10.0;
use File::ShareDir 'module_dir';
use File::ShareDir 'dist_dir';
use Path::Class;
our $VERSION = '2.00_009';
@@ -13,7 +13,7 @@ BEGIN {
if (not length $ENV{DANCER_APPDIR}
or not -f file($ENV{DANCER_APPDIR}, 'config.yml')) {
my $auto = dir(File::ShareDir::module_dir('App::Netdisco'))->absolute;
my $auto = dir(dist_dir('App-Netdisco'))->absolute;
$ENV{DANCER_APPDIR} ||= $auto->stringify;
$ENV{DANCER_CONFDIR} ||= $auto->stringify;