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

@@ -14,6 +14,7 @@ use Term::ReadLine;
use Archive::Extract;
use HTTP::Tiny;
use Try::Tiny;
use Path::Class 'file';
=head1 netdisco-deploy
@@ -108,7 +109,7 @@ sub deploy_oui {
sub deploy_mibs {
my $url = 'http://downloads.sourceforge.net/project/netdisco/netdisco-mibs/latest-snapshot/netdisco-mibs-snapshot.tar.gz';
my $file = "$ENV{HOME}/netdisco-mibs-snapshot.tar.gz";
my $file = file($ENV{HOME}, 'netdisco-mibs-snapshot.tar.gz');
my $resp = HTTP::Tiny->new->mirror($url, $file);
if ($resp->{success}) {