Use Path::Class for path and file name construction consistently

This commit is contained in:
Oliver Gorwits
2013-02-24 21:14:53 +00:00
parent edfb0f3e24
commit 981383c307
5 changed files with 13 additions and 10 deletions

View File

@@ -5,6 +5,7 @@ use Dancer::Plugin::DBIC 'schema';
use SNMP::Info;
use Try::Tiny;
use Path::Class 'dir';
use base 'Exporter';
our @EXPORT = ();
@@ -145,8 +146,7 @@ sub snmp_connect {
}
sub _build_mibdirs {
# FIXME: make this cross-platform (Path::Class?)
return map { setting('mibhome') .'/'. $_ }
return map { dir(setting('mibhome'), $_) }
@{ setting('mibdirs') || [] };
}