Skip to content
Browse files

look harder for a sharedir when installing and corrected typo with to…

…o much cut and paste
  • Loading branch information...
1 parent 9cc3f17 commit 2ba2bcb855ea1ae22fe5df31a4d99aca2a994d86 @jjn1056 committed May 3, 2012
Showing with 14 additions and 5 deletions.
  1. +3 −0 Changes
  2. +1 −1 dist.ini
  3. +1 −1 examples/MusicBase/dist.ini
  4. +1 −1 lib/DBIx/Class/Migration.pm
  5. +8 −2 lib/DBIx/Class/Migration/ShareDirBuilder.pm
View
3 Changes
@@ -1,5 +1,8 @@
Revision history for DBIx-Class-Migration
+0.023 03 May 2012
+ - Look harder for a sharedir
+
0.022 11 April 2012
- Fixed broken POD in last release. No functional changes
View
2 dist.ini
@@ -4,7 +4,7 @@ license = Perl_5
copyright_holder = John Napiorkowski
copyright_year = 2012
abstract = Tools to make migrating your DBIx::Class databases easier
-version = 0.022
+version = 0.023
[@Basic]
[Prereqs]
View
2 examples/MusicBase/dist.ini
@@ -1,4 +1,4 @@
-name = DBIx-Class-Migration
+name = MusicBase
author = John Napiorkowski <jjnapiork@cpan.org>
license = Perl_5
copyright_holder = John Napiorkowski
View
2 lib/DBIx/Class/Migration.pm
@@ -1,6 +1,6 @@
package DBIx::Class::Migration;
-our $VERSION = "0.022";
+our $VERSION = "0.023";
use Moose;
use JSON::XS;
View
10 lib/DBIx/Class/Migration/ShareDirBuilder.pm
@@ -24,8 +24,14 @@ sub build {
File::ShareDir::ProjectDistDir->import('dist_dir',
filename => filename_from_class($class));
- return dist_dir(
- class_to_distname($class));
+ my $sharedir;
+ while($class) {
+ last if $sharedir = eval { dist_dir( class_to_distname($class) ) };
+ last unless $class =~s/::[^\:\:]+$//;
+ }
+
+ return $sharedir || die "Can't find a /share for $class";
+
}
__PACKAGE__->meta->make_immutable;

0 comments on commit 2ba2bcb

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