Fix DB schema files location with Module::Build

This commit is contained in:
Oliver Gorwits
2017-04-24 12:41:15 +01:00
parent 0737914af5
commit 48cb6dd4c1
42 changed files with 8 additions and 3 deletions

View File

@@ -1,3 +1,9 @@
2.035002 - 2017-04-24
[BUG FIXES]
* Fix DB schema files location with Module::Build
2.035001 - 2017-04-19 2.035001 - 2017-04-19
[ENHANCEMENTS] [ENHANCEMENTS]

View File

@@ -14,10 +14,9 @@ our # try to hide from kwalitee
$VERSION = 41; # schema version used for upgrades, keep as integer $VERSION = 41; # schema version used for upgrades, keep as integer
use Path::Class; use Path::Class;
use File::Basename; use File::ShareDir 'dist_dir';
my (undef, $libpath, undef) = fileparse( $INC{ 'App/Netdisco/DB.pm' } ); our $schema_versions_dir = Path::Class::Dir->new( dist_dir('App-Netdisco') )
our $schema_versions_dir = Path::Class::Dir->new($libpath)
->subdir("DB", "schema_versions")->stringify; ->subdir("DB", "schema_versions")->stringify;
__PACKAGE__->load_components(qw/ __PACKAGE__->load_components(qw/