Permalink
Browse files

using file::sharedir for template spec file

  • Loading branch information...
1 parent 2353f10 commit 34876360c4c5beede38e76b2cd83b73a692412fd @jquelin committed Feb 9, 2010
Showing with 4 additions and 5 deletions.
  1. +4 −5 lib/CPANPLUS/Dist/Mdv.pm
  2. 0 {lib/CPANPLUS/Dist/Mdv → share}/template.spec
View
@@ -8,13 +8,13 @@ package CPANPLUS::Dist::Mdv;
use base 'CPANPLUS::Dist::Base';
use CPANPLUS::Error; # imported subs: error(), msg()
-use File::Basename qw{ basename dirname fileparse };
+use File::Basename qw{ basename dirname };
use File::Copy qw{ copy };
+use File::ShareDir qw{ dist_dir };
use File::Slurp qw{ slurp };
use IPC::Cmd qw{ run can_run };
use List::Util qw{ first };
use List::MoreUtils qw{ uniq };
-use Module::Util qw{ find_installed };
use Pod::POM;
use Pod::POM::View::Text;
use POSIX ();
@@ -438,9 +438,8 @@ sub _is_module_build_compat {
# return the absolute path where the template spec will be located.
#
sub _template_spec_file_path {
- my $path = find_installed(__PACKAGE__);
- my ($undef, $dirname) = fileparse($path);
- return "$dirname/Mdv/template.spec";
+ my $path = dist_dir('CPANPLUS-Dist-Mdv');
+ return "$path/template.spec";
}
File renamed without changes.

0 comments on commit 3487636

Please sign in to comment.