[Bps-public-commit] r15502 - in Shipwright/branches/1.10: .
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Wed Aug 27 00:09:34 EDT 2008
Author: sunnavy
Date: Wed Aug 27 00:09:33 2008
New Revision: 15502
Modified:
Shipwright/branches/1.10/META.yml
Shipwright/branches/1.10/Makefile.PL
Shipwright/branches/1.10/lib/Shipwright/Util.pm
Log:
merged 15501 to 1.1
Modified: Shipwright/branches/1.10/META.yml
==============================================================================
--- Shipwright/branches/1.10/META.yml (original)
+++ Shipwright/branches/1.10/META.yml Wed Aug 27 00:09:33 2008
@@ -28,7 +28,6 @@
Class::Accessor::Fast: 0
File::Copy: 0
File::Copy::Recursive: 0
- File::ShareDir: 0
File::Slurp: 0
File::Spec: 0
File::Temp: 0
Modified: Shipwright/branches/1.10/Makefile.PL
==============================================================================
--- Shipwright/branches/1.10/Makefile.PL (original)
+++ Shipwright/branches/1.10/Makefile.PL Wed Aug 27 00:09:33 2008
@@ -16,7 +16,6 @@
requires 'File::Temp' => 0;
requires 'File::Copy' => 0;
requires 'File::Copy::Recursive' => 0;
-requires 'File::ShareDir' => 0;
requires 'File::Spec' => 0;
requires 'File::Slurp' => 0;
requires 'Hash::Merge' => 0;
Modified: Shipwright/branches/1.10/lib/Shipwright/Util.pm
==============================================================================
--- Shipwright/branches/1.10/lib/Shipwright/Util.pm (original)
+++ Shipwright/branches/1.10/lib/Shipwright/Util.pm Wed Aug 27 00:09:33 2008
@@ -105,25 +105,19 @@
sub share_root {
my $self = shift;
- require File::ShareDir;
- $SHARE_ROOT ||=
- eval { abs_path( File::ShareDir::module_dir('Shipwright') ) };
-
unless ($SHARE_ROOT) {
-
- # XXX TODO: This is a bloody hack
- # Module::Install::Share and File::ShareDir don't play nicely
- # together
my @root = splitdir( $self->shipwright_root );
- $root[-1] = 'share'; # replace 'lib' to 'share'
- $SHARE_ROOT = catdir(@root);
- }
- if ( $SHARE_ROOT !~ m{([/\\])auto\1share\1}
- && $SHARE_ROOT =~ m{([/\\])blib\1lib\1} )
- {
- my $sep = $1;
- $SHARE_ROOT =~ s!${sep}auto$sep!${sep}auto${sep}share${sep}dist${sep}!;
+ if ( $root[-2] ne 'blib' && $root[-1] eq 'lib' ) {
+
+ # so it's -Ilib in the Shipwright's source dir
+ $root[-1] = 'share';
+ }
+ else {
+ push @root, qw/auto share dist Shipwright/;
+ }
+
+ $SHARE_ROOT = catdir(@root);
}
return ($SHARE_ROOT);
More information about the Bps-public-commit
mailing list