Skip to content
Browse files

Use File::ShareDir::ProjectDistDir

  • Loading branch information...
1 parent 22c8b07 commit 9bf2826d67c3820af9be3c1092e0b2014881ab03 @mlawren committed May 9, 2012
Showing with 12 additions and 15 deletions.
  1. +10 −10 Makefile.PL
  2. +2 −5 lib/App/sqldb_schema.pm
View
20 Makefile.PL
@@ -23,16 +23,16 @@ test_requires 'Test::Differences' => 0;
test_requires 'Test::More' => 0;
feature 'sqldb-schema',
- -default => 1,
- 'Data::Dumper' => 0,
- 'DBI' => 0,
- 'File::Basename' => 0,
- 'File::ShareDir' => 0,
- 'File::Slurp' => 0,
- 'File::Spec' => 0,
- 'Getopt::Long::Descriptive' => 0,
- 'Term::Prompt' => 0,
- 'Template::Tiny' => 0,
+ -default => 1,
+ 'Data::Dumper' => 0,
+ 'DBI' => 0,
+ 'File::Basename' => 0,
+ 'File::ShareDir::ProjectDistDir' => 0,
+ 'File::Slurp' => 0,
+ 'File::Spec' => 0,
+ 'Getopt::Long::Descriptive' => 0,
+ 'Term::Prompt' => 0,
+ 'Template::Tiny' => 0,
;
feature 'Deploy',
View
7 lib/App/sqldb_schema.pm
@@ -5,7 +5,7 @@ use Data::Dumper;
use DBI;
use File::Basename qw/dirname/;
use File::Slurp qw/read_file write_file/;
-use File::ShareDir qw/dist_file/;
+use File::ShareDir::ProjectDistDir qw/dist_file/;
use File::Spec;
use OptArgs;
use Template::Tiny;
@@ -107,10 +107,7 @@ sub run {
driver => $driver,
};
- my $develt =
- File::Spec->catfile( dirname($0), File::Spec->updir, 'share',
- 'schema.tmpl' );
- my $template = -e $develt ? $develt : dist_file( 'SQL-DB', 'schema.tmpl' );
+ my $template = dist_file( 'SQL-DB', 'schema.tmpl' );
my $input = read_file($template);
my $output;

0 comments on commit 9bf2826

Please sign in to comment.
Something went wrong with that request. Please try again.