[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

libfile-sharedir-perl: diff for NMU version 1.00-0.1



tags 496478 + patch
thanks

Dear maintainer,

I've prepared an NMU for libfile-sharedir-perl (versioned as 1.00-0.1) 
and uploaded it to DELAYED/7-day. Please feel free to tell me if 
I should delay it longer.

Regards,
    dam
    Debian Perl Group

-- 
dam            JabberID: dam@jabber.minus273.org
diff -Nru libfile-sharedir-perl-0.05/Changes libfile-sharedir-perl-1.00/Changes
--- libfile-sharedir-perl-0.05/Changes	2006-09-04 03:52:56.000000000 +0300
+++ libfile-sharedir-perl-1.00/Changes	2008-07-17 10:58:40.000000000 +0300
@@ -1,5 +1,15 @@
 Revision history for Perl extension File::ShareDir
 
+1.00 Thu 17 Jul 2008
+	- Everything appears ok, release prod
+
+0.99_01 Thu 10 Jul 2009
+	- Updating tests a little
+	- Adding the class_file function
+	- Allow *_file to find any kind of path, not just files (hdp)
+	- Localising $@ during evals
+	- Implementing the new sharedir model
+
 0.05 Mon  4 Sep 2006
 	- Upgrading to Module::Install 0.64
 
diff -Nru libfile-sharedir-perl-0.05/debian/changelog libfile-sharedir-perl-1.00/debian/changelog
--- libfile-sharedir-perl-0.05/debian/changelog	2008-11-15 23:15:33.000000000 +0200
+++ libfile-sharedir-perl-1.00/debian/changelog	2008-11-15 23:15:33.000000000 +0200
@@ -1,3 +1,17 @@
+libfile-sharedir-perl (1.00-0.1) unstable; urgency=low
+
+  * Non-maintainer upload
+  * add debian/watch
+  * New upstream release (Closes: #496478)
+    + update upstream author email and years of copyright
+  * do not ship README containing text version of POD
+  * remove fix-dist-dir.patch, included in this release
+    + remove quilt from control and rules
+  * adapt debian/rules to the new location of the sample resource files
+  * Standards-Version: 3.8.0 (no changes needed)
+
+ -- Damyan Ivanov <dmn@debian.org>  Sat, 15 Nov 2008 23:09:35 +0200
+
 libfile-sharedir-perl (0.05-1.2) unstable; urgency=high
 
   * Non-maintainer upload.
diff -Nru libfile-sharedir-perl-0.05/debian/control libfile-sharedir-perl-1.00/debian/control
--- libfile-sharedir-perl-0.05/debian/control	2008-11-15 23:15:33.000000000 +0200
+++ libfile-sharedir-perl-1.00/debian/control	2008-11-15 23:15:33.000000000 +0200
@@ -1,10 +1,10 @@
 Source: libfile-sharedir-perl
 Section: perl
 Priority: optional
-Build-Depends: debhelper (>= 5.0.0), quilt
+Build-Depends: debhelper (>= 5.0.0)
 Build-Depends-Indep: perl (>= 5.8.8-12), libclass-inspector-perl, libparams-util-perl
 Maintainer: Christian Sánchez <csanchez@unplug.org.ve>
-Standards-Version: 3.7.3
+Standards-Version: 3.8.0
 Homepage: http://search.cpan.org/dist/File-ShareDir/
 
 Package: libfile-sharedir-perl
diff -Nru libfile-sharedir-perl-0.05/debian/copyright libfile-sharedir-perl-1.00/debian/copyright
--- libfile-sharedir-perl-0.05/debian/copyright	2008-11-15 23:15:33.000000000 +0200
+++ libfile-sharedir-perl-1.00/debian/copyright	2008-11-15 23:15:33.000000000 +0200
@@ -5,11 +5,11 @@
 
 Upstream Author : 
 
-   Adam Kennedy <cpan@ali.as>
+   Adam Kennedy <adamk@cpan.org>
 
 Copyright:
 
-   Copyright 2005 - 2006 Adam Kennedy.
+   Copyright 2005 - 2008 Adam Kennedy.
 
 License:
 
diff -Nru libfile-sharedir-perl-0.05/debian/patches/fix-dist-path.patch libfile-sharedir-perl-1.00/debian/patches/fix-dist-path.patch
--- libfile-sharedir-perl-0.05/debian/patches/fix-dist-path.patch	2008-11-15 23:15:33.000000000 +0200
+++ libfile-sharedir-perl-1.00/debian/patches/fix-dist-path.patch	1970-01-01 02:00:00.000000000 +0200
@@ -1,160 +0,0 @@
-# fix regression in shared directory layout model
-# patch backported from 1.00 upstream release
-# http://bugs.debian.org/496122
---- a/lib/File/ShareDir.pm
-+++ b/lib/File/ShareDir.pm
-@@ -145,6 +145,44 @@ located or is not readable.
- 
- sub dist_dir {
- 	my $dist = _DIST(shift);
-+	my $dir;
-+
-+	# Try the new version
-+	$dir = _dist_dir_new( $dist );
-+	return $dir if defined $dir;
-+
-+	# Fall back to the legacy version
-+	$dir = _dist_dir_old( $dist );
-+	return $dir if defined $dir;
-+
-+	# Ran out of options
-+	croak("Failed to find share dir for dist '$dist'");
-+}
-+
-+sub _dist_dir_new {
-+	my $dist = shift;
-+
-+	# Create the subpath
-+	my $path = File::Spec->catdir(
-+		'auto', 'share', 'dist', $dist,
-+	);
-+
-+	# Find the full dir withing @INC
-+	foreach my $inc ( @INC ) {
-+		next unless defined $inc and ! ref $inc;
-+		my $dir = File::Spec->catdir( $inc, $path );
-+		next unless -d $dir;
-+		unless ( -r $dir ) {
-+			croak("Found directory '$dir', but no read permissions");
-+		}
-+		return $dir;
-+	}
-+
-+	return undef;
-+}
-+
-+sub _dist_dir_old {
-+	my $dist = shift;
- 
- 	# Create the subpath
- 	my $path = File::Spec->catdir(
-@@ -162,8 +200,7 @@ sub dist_dir {
- 		return $dir;
- 	}
- 
--	# Couldn't find it
--	croak("Failed to find share dir for dist '$dist'");
-+	return undef;
- }
- 
- =pod
-@@ -187,6 +224,43 @@ located or is not readable.
- 
- sub module_dir {
- 	my $module = _MODULE(shift);
-+	my $dir;
-+
-+	defined($module) or die "No module given";
-+
-+	# Try the new version
-+	$dir = _module_dir_new( $module );
-+	return $dir if defined $dir;
-+
-+	# Fall back to the legacy version
-+	return _module_dir_old( $module );
-+}
-+
-+sub _module_dir_new {
-+	my $module = shift;
-+
-+	# Create the subpath
-+	my $path = File::Spec->catdir(
-+		'auto', 'share', 'module',
-+		_module_subdir( $module ),
-+	);
-+
-+	# Find the full dir withing @INC
-+	foreach my $inc ( @INC ) {
-+		next unless defined $inc and ! ref $inc;
-+		my $dir = File::Spec->catdir( $inc, $path );
-+		next unless -d $dir;
-+		unless ( -r $dir ) {
-+			croak("Found directory '$dir', but no read permissions");
-+		}
-+		return $dir;
-+	}
-+
-+	return undef;
-+}
-+
-+sub _module_dir_old {
-+	my $module = shift;
- 	my $short  = Class::Inspector->filename($module);
- 	my $long   = Class::Inspector->loaded_filename($module);
- 	$short =~ tr{/} {:} if $IS_MACOS;
-@@ -226,8 +300,41 @@ sub dist_file {
- 	my $dist = _DIST(shift);
- 	my $file = _FILE(shift);
- 
-+	# Try the new version first
-+	my $path = _dist_file_new( $dist, $file );
-+	return $path if defined $path;
-+
-+	# Hand off to the legacy version
-+	return _dist_file_old( $dist, $file );;
-+}
-+
-+sub _dist_file_new {
-+	my $dist = shift;
-+	my $file = shift;
-+
-+	# If it exists, what should the path be
-+	my $dir  = _dist_dir_new( $dist );
-+	return undef unless defined($dir);
-+	my $path = File::Spec->catfile( $dir, $file );
-+
-+	# Does the file exist
-+	return undef unless -e $path;
-+	unless ( -f $path ) {
-+		croak("Found dist_file '$path', but not a file");
-+	}
-+	unless ( -r $path ) {
-+		croak("File '$path', no read permissions");
-+	}
-+
-+	return $path;
-+}
-+
-+sub _dist_file_old {
-+	my $dist = shift;
-+	my $file = shift;
-+
- 	# Create the subpath
--	my $path = File::Spec->catdir(
-+	my $path = File::Spec->catfile(
- 		'auto', split( /-/, $dist ), $file,
- 		);
- 
-@@ -290,6 +397,12 @@ sub module_file {
- #####################################################################
- # Support Functions
- 
-+sub _module_subdir {
-+	my $module = shift;
-+	$module =~ s/::/-/g;
-+	return $module;
-+}
-+
- # Matches a valid distribution name
- ### This is a total guess at this point
- sub _DIST {
diff -Nru libfile-sharedir-perl-0.05/debian/patches/series libfile-sharedir-perl-1.00/debian/patches/series
--- libfile-sharedir-perl-0.05/debian/patches/series	2008-11-15 23:15:33.000000000 +0200
+++ libfile-sharedir-perl-1.00/debian/patches/series	1970-01-01 02:00:00.000000000 +0200
@@ -1 +0,0 @@
-fix-dist-path.patch
diff -Nru libfile-sharedir-perl-0.05/debian/rules libfile-sharedir-perl-1.00/debian/rules
--- libfile-sharedir-perl-0.05/debian/rules	2008-11-15 23:15:33.000000000 +0200
+++ libfile-sharedir-perl-1.00/debian/rules	2008-11-15 23:15:33.000000000 +0200
@@ -2,8 +2,6 @@
 
 #export DH_VERBOSE=1
 
-include /usr/share/quilt/quilt.make
-
 export PERL_MM_USE_DEFAULT=1
 
 PACKAGE=$(shell dh_listpackages)
@@ -15,7 +13,7 @@
 TMP     =$(CURDIR)/debian/$(PACKAGE)
 
 build: build-stamp
-build-stamp: $(QUILT_STAMPFN)
+build-stamp:
 	dh_testdir
 
 	$(PERL) Makefile.PL INSTALLDIRS=vendor \
@@ -26,7 +24,7 @@
 
 	touch $@
 
-clean: unpatch
+clean:
 	dh_testdir
 	dh_testroot
 
@@ -41,7 +39,8 @@
 	dh_clean -k
 
 	$(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
-	chmod -x debian/libfile-sharedir-perl/usr/share/perl5/auto/File/ShareDir/sample.txt 
+	chmod -x $(TMP)/usr/share/perl5/auto/share/dist/File-ShareDir/subdir/sample.txt
+	chmod -x $(TMP)/usr/share/perl5/auto/share/dist/File-ShareDir/sample.txt
 	touch $@
 
 binary-arch:
@@ -50,7 +49,7 @@
 	dh_testdir
 	dh_testroot
 	dh_installexamples
-	dh_installdocs README
+	dh_installdocs
 	dh_installchangelogs Changes
 	dh_perl
 	dh_compress
diff -Nru libfile-sharedir-perl-0.05/debian/watch libfile-sharedir-perl-1.00/debian/watch
--- libfile-sharedir-perl-0.05/debian/watch	1970-01-01 02:00:00.000000000 +0200
+++ libfile-sharedir-perl-1.00/debian/watch	2008-11-15 23:15:33.000000000 +0200
@@ -0,0 +1,2 @@
+version=3
+http://search.cpan.org/dist/File-ShareDir/   .*/File-ShareDir-v?(\d[\d_.]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)
diff -Nru libfile-sharedir-perl-0.05/foo/test_file.txt libfile-sharedir-perl-1.00/foo/test_file.txt
--- libfile-sharedir-perl-0.05/foo/test_file.txt	1970-01-01 02:00:00.000000000 +0200
+++ libfile-sharedir-perl-1.00/foo/test_file.txt	2008-07-17 10:58:40.000000000 +0300
@@ -0,0 +1 @@
+Another test file
diff -Nru libfile-sharedir-perl-0.05/inc/Module/Install/Base.pm libfile-sharedir-perl-1.00/inc/Module/Install/Base.pm
--- libfile-sharedir-perl-0.05/inc/Module/Install/Base.pm	2006-09-04 03:52:56.000000000 +0300
+++ libfile-sharedir-perl-1.00/inc/Module/Install/Base.pm	2008-07-17 10:59:00.000000000 +0300
@@ -1,7 +1,7 @@
 #line 1
 package Module::Install::Base;
 
-$VERSION = '0.63';
+$VERSION = '0.76';
 
 # Suspend handler for "redefined" warnings
 BEGIN {
@@ -45,6 +45,8 @@
     $_[0]->_top->{admin} or Module::Install::Base::FakeAdmin->new;
 }
 
+#line 101
+
 sub is_admin {
     $_[0]->admin->VERSION;
 }
@@ -67,4 +69,4 @@
 
 1;
 
-#line 138
+#line 146
diff -Nru libfile-sharedir-perl-0.05/inc/Module/Install/Can.pm libfile-sharedir-perl-1.00/inc/Module/Install/Can.pm
--- libfile-sharedir-perl-0.05/inc/Module/Install/Can.pm	2006-09-04 03:52:56.000000000 +0300
+++ libfile-sharedir-perl-1.00/inc/Module/Install/Can.pm	2008-07-17 10:59:00.000000000 +0300
@@ -11,7 +11,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.63';
+	$VERSION = '0.76';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
diff -Nru libfile-sharedir-perl-0.05/inc/Module/Install/Fetch.pm libfile-sharedir-perl-1.00/inc/Module/Install/Fetch.pm
--- libfile-sharedir-perl-0.05/inc/Module/Install/Fetch.pm	2006-09-04 03:52:56.000000000 +0300
+++ libfile-sharedir-perl-1.00/inc/Module/Install/Fetch.pm	2008-07-17 10:59:00.000000000 +0300
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.63';
+	$VERSION = '0.76';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
diff -Nru libfile-sharedir-perl-0.05/inc/Module/Install/Makefile.pm libfile-sharedir-perl-1.00/inc/Module/Install/Makefile.pm
--- libfile-sharedir-perl-0.05/inc/Module/Install/Makefile.pm	2006-09-04 03:52:56.000000000 +0300
+++ libfile-sharedir-perl-1.00/inc/Module/Install/Makefile.pm	2008-07-17 10:59:00.000000000 +0300
@@ -7,7 +7,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.63';
+	$VERSION = '0.76';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
@@ -17,192 +17,235 @@
 my %seen = ();
 
 sub prompt {
-    shift;
+	shift;
 
-    # Infinite loop protection
-    my @c = caller();
-    if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
-        die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
-    }
-
-    # In automated testing, always use defaults
-    if ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL_MM_USE_DEFAULT} ) {
-        local $ENV{PERL_MM_USE_DEFAULT} = 1;
-        goto &ExtUtils::MakeMaker::prompt;
-    } else {
-        goto &ExtUtils::MakeMaker::prompt;
-    }
+	# Infinite loop protection
+	my @c = caller();
+	if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
+		die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
+	}
+
+	# In automated testing, always use defaults
+	if ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL_MM_USE_DEFAULT} ) {
+		local $ENV{PERL_MM_USE_DEFAULT} = 1;
+		goto &ExtUtils::MakeMaker::prompt;
+	} else {
+		goto &ExtUtils::MakeMaker::prompt;
+	}
 }
 
 sub makemaker_args {
-    my $self = shift;
-    my $args = ($self->{makemaker_args} ||= {});
-    %$args = ( %$args, @_ ) if @_;
-    $args;
+	my $self = shift;
+	my $args = ( $self->{makemaker_args} ||= {} );
+	%$args = ( %$args, @_ );
+	return $args;
 }
 
 # For mm args that take multiple space-seperated args,
 # append an argument to the current list.
 sub makemaker_append {
-    my $self = shift;
-    my $name = shift;
-    my $args = $self->makemaker_args;
-    $args->{name} = defined $args->{$name}
-    	? join( ' ', $args->{name}, @_ )
-    	: join( ' ', @_ );
+	my $self = sShift;
+	my $name = shift;
+	my $args = $self->makemaker_args;
+	$args->{name} = defined $args->{$name}
+		? join( ' ', $args->{name}, @_ )
+		: join( ' ', @_ );
 }
 
 sub build_subdirs {
-    my $self    = shift;
-    my $subdirs = $self->makemaker_args->{DIR} ||= [];
-    for my $subdir (@_) {
-        push @$subdirs, $subdir;
-    }
+	my $self    = shift;
+	my $subdirs = $self->makemaker_args->{DIR} ||= [];
+	for my $subdir (@_) {
+		push @$subdirs, $subdir;
+	}
 }
 
 sub clean_files {
-    my $self  = shift;
-    my $clean = $self->makemaker_args->{clean} ||= {};
-    %$clean = (
-        %$clean, 
-        FILES => join(' ', grep length, $clean->{FILES}, @_),
-    );
+	my $self  = shift;
+	my $clean = $self->makemaker_args->{clean} ||= {};
+	  %$clean = (
+		%$clean, 
+		FILES => join ' ', grep { length $_ } ($clean->{FILES} || (), @_),
+	);
 }
 
 sub realclean_files {
-    my $self  = shift;
-    my $realclean = $self->makemaker_args->{realclean} ||= {};
-    %$realclean = (
-        %$realclean, 
-        FILES => join(' ', grep length, $realclean->{FILES}, @_),
-    );
+	my $self      = shift;
+	my $realclean = $self->makemaker_args->{realclean} ||= {};
+	  %$realclean = (
+		%$realclean, 
+		FILES => join ' ', grep { length $_ } ($realclean->{FILES} || (), @_),
+	);
 }
 
 sub libs {
-    my $self = shift;
-    my $libs = ref $_[0] ? shift : [ shift ];
-    $self->makemaker_args( LIBS => $libs );
+	my $self = shift;
+	my $libs = ref $_[0] ? shift : [ shift ];
+	$self->makemaker_args( LIBS => $libs );
 }
 
 sub inc {
-    my $self = shift;
-    $self->makemaker_args( INC => shift );
+	my $self = shift;
+	$self->makemaker_args( INC => shift );
+}
+
+my %test_dir = ();
+
+sub _wanted_t {
+	/\.t$/ and -f $_ and $test_dir{$File::Find::dir} = 1;
+}
+
+sub tests_recursive {
+	my $self = shift;
+	if ( $self->tests ) {
+		die "tests_recursive will not work if tests are already defined";
+	}
+	my $dir = shift || 't';
+	unless ( -d $dir ) {
+		die "tests_recursive dir '$dir' does not exist";
+	}
+	%test_dir = ();
+	require File::Find;
+	File::Find::find( \&_wanted_t, $dir );
+	$self->tests( join ' ', map { "$_/*.t" } sort keys %test_dir );
 }
 
 sub write {
-    my $self = shift;
-    die "&Makefile->write() takes no arguments\n" if @_;
+	my $self = shift;
+	die "&Makefile->write() takes no arguments\n" if @_;
+
+	# Make sure we have a new enough
+	require ExtUtils::MakeMaker;
 
-    my $args = $self->makemaker_args;
-    $args->{DISTNAME} = $self->name;
-    $args->{NAME}     = $self->module_name || $self->name || $self->determine_NAME($args);
-    $args->{VERSION}  = $self->version || $self->determine_VERSION($args);
-    $args->{NAME}     =~ s/-/::/g;
-    if ( $self->tests ) {
-        $args->{test} = { TESTS => $self->tests };
-    }
-    if ($] >= 5.005) {
-        $args->{ABSTRACT} = $self->abstract;
-        $args->{AUTHOR}   = $self->author;
-    }
-    if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) {
-        $args->{NO_META} = 1;
-    }
-    if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 and $self->sign ) {
-        $args->{SIGN} = 1;
-    }
-    unless ( $self->is_admin ) {
-        delete $args->{SIGN};
-    }
-
-    # merge both kinds of requires into prereq_pm
-    my $prereq = ($args->{PREREQ_PM} ||= {});
-    %$prereq = ( %$prereq, map { @$_ } map { @$_ } grep $_,
-                 ($self->build_requires, $self->requires) );
-
-    # merge both kinds of requires into prereq_pm
-    my $subdirs = ($args->{DIR} ||= []);
-    if ($self->bundles) {
-        foreach my $bundle (@{ $self->bundles }) {
-            my ($file, $dir) = @$bundle;
-            push @$subdirs, $dir if -d $dir;
-            delete $prereq->{$file};
-        }
-    }
-
-    if ( my $perl_version = $self->perl_version ) {
-        eval "use $perl_version; 1"
-            or die "ERROR: perl: Version $] is installed, "
-                . "but we need version >= $perl_version";
-    }
-
-    my %args = map { ( $_ => $args->{$_} ) } grep {defined($args->{$_})} keys %$args;
-    if ($self->admin->preop) {
-        $args{dist} = $self->admin->preop;
-    }
+	# MakeMaker can complain about module versions that include
+	# an underscore, even though its own version may contain one!
+	# Hence the funny regexp to get rid of it.  See RT #35800
+	# for details.
+
+	$self->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
+
+	# Generate the 
+	my $args = $self->makemaker_args;
+	$args->{DISTNAME} = $self->name;
+	$args->{NAME}     = $self->module_name || $self->name;
+	$args->{VERSION}  = $self->version;
+	$args->{NAME}     =~ s/-/::/g;
+	if ( $self->tests ) {
+		$args->{test} = { TESTS => $self->tests };
+	}
+	if ($] >= 5.005) {
+		$args->{ABSTRACT} = $self->abstract;
+		$args->{AUTHOR}   = $self->author;
+	}
+	if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) {
+		$args->{NO_META} = 1;
+	}
+	if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 and $self->sign ) {
+		$args->{SIGN} = 1;
+	}
+	unless ( $self->is_admin ) {
+		delete $args->{SIGN};
+	}
+
+	# merge both kinds of requires into prereq_pm
+	my $prereq = ($args->{PREREQ_PM} ||= {});
+	%$prereq = ( %$prereq,
+		map { @$_ }
+		map { @$_ }
+		grep $_,
+		($self->configure_requires, $self->build_requires, $self->requires)
+	);
+
+	# Remove any reference to perl, PREREQ_PM doesn't support it
+	delete $args->{PREREQ_PM}->{perl};
+
+	# merge both kinds of requires into prereq_pm
+	my $subdirs = ($args->{DIR} ||= []);
+	if ($self->bundles) {
+		foreach my $bundle (@{ $self->bundles }) {
+			my ($file, $dir) = @$bundle;
+			push @$subdirs, $dir if -d $dir;
+			delete $prereq->{$file};
+		}
+	}
+
+	if ( my $perl_version = $self->perl_version ) {
+		eval "use $perl_version; 1"
+			or die "ERROR: perl: Version $] is installed, "
+			. "but we need version >= $perl_version";
+	}
+
+	$args->{INSTALLDIRS} = $self->installdirs;
+
+	my %args = map { ( $_ => $args->{$_} ) } grep {defined($args->{$_})} keys %$args;
+
+	my $user_preop = delete $args{dist}->{PREOP};
+	if (my $preop = $self->admin->preop($user_preop)) {
+		$args{dist} = $preop;
+	}
 
-    my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
-    $self->fix_up_makefile($mm->{FIRST_MAKEFILE} || 'Makefile');
+	my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
+	$self->fix_up_makefile($mm->{FIRST_MAKEFILE} || 'Makefile');
 }
 
 sub fix_up_makefile {
-    my $self          = shift;
-    my $makefile_name = shift;
-    my $top_class     = ref($self->_top) || '';
-    my $top_version   = $self->_top->VERSION || '';
-
-    my $preamble = $self->preamble 
-        ? "# Preamble by $top_class $top_version\n"
-            . $self->preamble
-        : '';
-    my $postamble = "# Postamble by $top_class $top_version\n"
-        . ($self->postamble || '');
-
-    local *MAKEFILE;
-    open MAKEFILE, "< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
-    my $makefile = do { local $/; <MAKEFILE> };
-    close MAKEFILE or die $!;
-
-    $makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /;
-    $makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g;
-    $makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g;
-    $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m;
-    $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m;
-
-    # Module::Install will never be used to build the Core Perl
-    # Sometimes PERL_LIB and PERL_ARCHLIB get written anyway, which breaks
-    # PREFIX/PERL5LIB, and thus, install_share. Blank them if they exist
-    $makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m;
-    #$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m;
-
-    # Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well.
-    $makefile =~ s/("?)-I\$\(PERL_LIB\)\1//g;
-
-    # XXX - This is currently unused; not sure if it breaks other MM-users
-    # $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg;
-
-    open  MAKEFILE, "> $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
-    print MAKEFILE  "$preamble$makefile$postamble" or die $!;
-    close MAKEFILE  or die $!;
+	my $self          = shift;
+	my $makefile_name = shift;
+	my $top_class     = ref($self->_top) || '';
+	my $top_version   = $self->_top->VERSION || '';
+
+	my $preamble = $self->preamble 
+		? "# Preamble by $top_class $top_version\n"
+			. $self->preamble
+		: '';
+	my $postamble = "# Postamble by $top_class $top_version\n"
+		. ($self->postamble || '');
+
+	local *MAKEFILE;
+	open MAKEFILE, "< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
+	my $makefile = do { local $/; <MAKEFILE> };
+	close MAKEFILE or die $!;
+
+	$makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /;
+	$makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g;
+	$makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g;
+	$makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m;
+	$makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m;
+
+	# Module::Install will never be used to build the Core Perl
+	# Sometimes PERL_LIB and PERL_ARCHLIB get written anyway, which breaks
+	# PREFIX/PERL5LIB, and thus, install_share. Blank them if they exist
+	$makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m;
+	#$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m;
+
+	# Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well.
+	$makefile =~ s/(\"?)-I\$\(PERL_LIB\)\1//g;
+
+	# XXX - This is currently unused; not sure if it breaks other MM-users
+	# $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg;
+
+	open  MAKEFILE, "> $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
+	print MAKEFILE  "$preamble$makefile$postamble" or die $!;
+	close MAKEFILE  or die $!;
 
-    1;
+	1;
 }
 
 sub preamble {
-    my ($self, $text) = @_;
-    $self->{preamble} = $text . $self->{preamble} if defined $text;
-    $self->{preamble};
+	my ($self, $text) = @_;
+	$self->{preamble} = $text . $self->{preamble} if defined $text;
+	$self->{preamble};
 }
 
 sub postamble {
-    my ($self, $text) = @_;
-    $self->{postamble} ||= $self->admin->postamble;
-    $self->{postamble} .= $text if defined $text;
-    $self->{postamble}
+	my ($self, $text) = @_;
+	$self->{postamble} ||= $self->admin->postamble;
+	$self->{postamble} .= $text if defined $text;
+	$self->{postamble}
 }
 
 1;
 
 __END__
 
-#line 334
+#line 377
diff -Nru libfile-sharedir-perl-0.05/inc/Module/Install/Metadata.pm libfile-sharedir-perl-1.00/inc/Module/Install/Metadata.pm
--- libfile-sharedir-perl-0.05/inc/Module/Install/Metadata.pm	2006-09-04 03:52:56.000000000 +0300
+++ libfile-sharedir-perl-1.00/inc/Module/Install/Metadata.pm	2008-07-17 10:59:00.000000000 +0300
@@ -6,310 +6,482 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.63';
+	$VERSION = '0.76';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
 
 my @scalar_keys = qw{
-    name module_name abstract author version license
-    distribution_type perl_version tests
+	name
+	module_name
+	abstract
+	author
+	version
+	distribution_type
+	tests
+	installdirs
 };
 
 my @tuple_keys = qw{
-    build_requires requires recommends bundles
+	configure_requires
+	build_requires
+	requires
+	recommends
+	bundles
+	resources
 };
 
-sub Meta            { shift        }
-sub Meta_ScalarKeys { @scalar_keys }
-sub Meta_TupleKeys  { @tuple_keys  }
-
-foreach my $key (@scalar_keys) {
-    *$key = sub {
-        my $self = shift;
-        return $self->{values}{$key} if defined wantarray and !@_;
-        $self->{values}{$key} = shift;
-        return $self;
-    };
-}
-
-foreach my $key (@tuple_keys) {
-    *$key = sub {
-        my $self = shift;
-        return $self->{values}{$key} unless @_;
-
-        my @rv;
-        while (@_) {
-            my $module = shift or last;
-            my $version = shift || 0;
-            if ( $module eq 'perl' ) {
-                $version =~ s{^(\d+)\.(\d+)\.(\d+)}
-                             {$1 + $2/1_000 + $3/1_000_000}e;
-                $self->perl_version($version);
-                next;
-            }
-            my $rv = [ $module, $version ];
-            push @rv, $rv;
-        }
-        push @{ $self->{values}{$key} }, @rv;
-        @rv;
-    };
+my @resource_keys = qw{
+	homepage
+	bugtracker
+	repository
+};
+
+sub Meta              { shift          }
+sub Meta_ScalarKeys   { @scalar_keys   }
+sub Meta_TupleKeys    { @tuple_keys    }
+sub Meta_ResourceKeys { @resource_keys }
+
+foreach my $key ( @scalar_keys ) {
+	*$key = sub {
+		my $self = shift;
+		return $self->{values}{$key} if defined wantarray and !@_;
+		$self->{values}{$key} = shift;
+		return $self;
+	};
+}
+
+foreach my $key ( @resource_keys ) {
+	*$key = sub {
+		my $self = shift;
+		unless ( @_ ) {
+			return () unless $self->{values}{resources};
+			return map  { $_->[1] }
+			       grep { $_->[0] eq $key }
+			       @{ $self->{values}{resources} };
+		}
+		return $self->{values}{resources}{$key} unless @_;
+		my $uri = shift or die(
+			"Did not provide a value to $key()"
+		);
+		$self->resources( $key => $uri );
+		return 1;
+	};
+}
+
+sub requires {
+	my $self = shift;
+	while ( @_ ) {
+		my $module  = shift or last;
+		my $version = shift || 0;
+		push @{ $self->{values}{requires} }, [ $module, $version ];
+	}
+	$self->{values}{requires};
+}
+
+sub build_requires {
+	my $self = shift;
+	while ( @_ ) {
+		my $module  = shift or last;
+		my $version = shift || 0;
+		push @{ $self->{values}{build_requires} }, [ $module, $version ];
+	}
+	$self->{values}{build_requires};
+}
+
+sub configure_requires {
+	my $self = shift;
+	while ( @_ ) {
+		my $module  = shift or last;
+		my $version = shift || 0;
+		push @{ $self->{values}{configure_requires} }, [ $module, $version ];
+	}
+	$self->{values}{configure_requires};
+}
+
+sub recommends {
+	my $self = shift;
+	while ( @_ ) {
+		my $module  = shift or last;
+		my $version = shift || 0;
+		push @{ $self->{values}{recommends} }, [ $module, $version ];
+	}
+	$self->{values}{recommends};
+}
+
+sub bundles {
+	my $self = shift;
+	while ( @_ ) {
+		my $module  = shift or last;
+		my $version = shift || 0;
+		push @{ $self->{values}{bundles} }, [ $module, $version ];
+	}
+	$self->{values}{bundles};
 }
 
+# Resource handling
+my %lc_resource = map { $_ => 1 } qw{
+	homepage
+	license
+	bugtracker
+	repository
+};
+
+sub resources {
+	my $self = shift;
+	while ( @_ ) {
+		my $name  = shift or last;
+		my $value = shift or next;
+		if ( $name eq lc $name and ! $lc_resource{$name} ) {
+			die("Unsupported reserved lowercase resource '$name'");
+		}
+		$self->{values}{resources} ||= [];
+		push @{ $self->{values}{resources} }, [ $name, $value ];
+	}
+	$self->{values}{resources};
+}
+
+# Aliases for build_requires that will have alternative
+# meanings in some future version of META.yml.
+sub test_requires      { shift->build_requires(@_) }
+sub install_requires   { shift->build_requires(@_) }
+
+# Aliases for installdirs options
+sub install_as_core    { $_[0]->installdirs('perl')   }
+sub install_as_cpan    { $_[0]->installdirs('site')   }
+sub install_as_site    { $_[0]->installdirs('site')   }
+sub install_as_vendor  { $_[0]->installdirs('vendor') }
+
 sub sign {
-    my $self = shift;
-    return $self->{'values'}{'sign'} if defined wantarray and !@_;
-    $self->{'values'}{'sign'} = ( @_ ? $_[0] : 1 );
-    return $self;
+	my $self = shift;
+	return $self->{values}{sign} if defined wantarray and ! @_;
+	$self->{values}{sign} = ( @_ ? $_[0] : 1 );
+	return $self;
 }
 
 sub dynamic_config {
 	my $self = shift;
 	unless ( @_ ) {
-		warn "You MUST provide an explicit true/false value to dynamic_config, skipping\n";
+		warn "You MUST provide an explicit true/false value to dynamic_config\n";
 		return $self;
 	}
-	$self->{'values'}{'dynamic_config'} = $_[0] ? 1 : 0;
-	return $self;
+	$self->{values}{dynamic_config} = $_[0] ? 1 : 0;
+	return 1;
+}
+
+sub perl_version {
+	my $self = shift;
+	return $self->{values}{perl_version} unless @_;
+	my $version = shift or die(
+		"Did not provide a value to perl_version()"
+	);
+	$version =~ s/_.+$//;
+	$version = $version + 0; # Numify
+	unless ( $version >= 5.005 ) {
+		die "Module::Install only supports 5.005 or newer (use ExtUtils::MakeMaker)\n";
+	}
+	$self->{values}{perl_version} = $version;
+	return 1;
+}
+
+sub license {
+	my $self = shift;
+	return $self->{values}{license} unless @_;
+	my $license = shift or die(
+		'Did not provide a value to license()'
+	);
+	$self->{values}{license} = $license;
+
+	# Automatically fill in license URLs
+	if ( $license eq 'perl' ) {
+		$self->resources( license => 'http://dev.perl.org/licenses/' );
+	}
+
+	return 1;
 }
 
 sub all_from {
-    my ( $self, $file ) = @_;
+	my ( $self, $file ) = @_;
+
+	unless ( defined($file) ) {
+		my $name = $self->name or die(
+			"all_from called with no args without setting name() first"
+		);
+		$file = join('/', 'lib', split(/-/, $name)) . '.pm';
+		$file =~ s{.*/}{} unless -e $file;
+		unless ( -e $file ) {
+			die("all_from cannot find $file from $name");
+		}
+	}
 
-    unless ( defined($file) ) {
-        my $name = $self->name
-            or die "all_from called with no args without setting name() first";
-        $file = join('/', 'lib', split(/-/, $name)) . '.pm';
-        $file =~ s{.*/}{} unless -e $file;
-        die "all_from: cannot find $file from $name" unless -e $file;
-    }
-
-    $self->version_from($file)      unless $self->version;
-    $self->perl_version_from($file) unless $self->perl_version;
-
-    # The remaining probes read from POD sections; if the file
-    # has an accompanying .pod, use that instead
-    my $pod = $file;
-    if ( $pod =~ s/\.pm$/.pod/i and -e $pod ) {
-        $file = $pod;
-    }
-
-    $self->author_from($file)   unless $self->author;
-    $self->license_from($file)  unless $self->license;
-    $self->abstract_from($file) unless $self->abstract;
+	# Some methods pull from POD instead of code.
+	# If there is a matching .pod, use that instead
+	my $pod = $file;
+	$pod =~ s/\.pm$/.pod/i;
+	$pod = $file unless -e $pod;
+
+	# Pull the different values
+	$self->name_from($file)         unless $self->name;
+	$self->version_from($file)      unless $self->version;
+	$self->perl_version_from($file) unless $self->perl_version;
+	$self->author_from($pod)        unless $self->author;
+	$self->license_from($pod)       unless $self->license;
+	$self->abstract_from($pod)      unless $self->abstract;
+
+	return 1;
 }
 
 sub provides {
-    my $self     = shift;
-    my $provides = ( $self->{values}{provides} ||= {} );
-    %$provides = (%$provides, @_) if @_;
-    return $provides;
+	my $self     = shift;
+	my $provides = ( $self->{values}{provides} ||= {} );
+	%$provides = (%$provides, @_) if @_;
+	return $provides;
 }
 
 sub auto_provides {
-    my $self = shift;
-    return $self unless $self->is_admin;
-
-    unless (-e 'MANIFEST') {
-        warn "Cannot deduce auto_provides without a MANIFEST, skipping\n";
-        return $self;
-    }
-
-    # Avoid spurious warnings as we are not checking manifest here.
-
-    local $SIG{__WARN__} = sub {1};
-    require ExtUtils::Manifest;
-    local *ExtUtils::Manifest::manicheck = sub { return };
-
-    require Module::Build;
-    my $build = Module::Build->new(
-        dist_name    => $self->name,
-        dist_version => $self->version,
-        license      => $self->license,
-    );
-    $self->provides(%{ $build->find_dist_packages || {} });
+	my $self = shift;
+	return $self unless $self->is_admin;
+	unless (-e 'MANIFEST') {
+		warn "Cannot deduce auto_provides without a MANIFEST, skipping\n";
+		return $self;
+	}
+	# Avoid spurious warnings as we are not checking manifest here.
+	local $SIG{__WARN__} = sub {1};
+	require ExtUtils::Manifest;
+	local *ExtUtils::Manifest::manicheck = sub { return };
+
+	require Module::Build;
+	my $build = Module::Build->new(
+		dist_name    => $self->name,
+		dist_version => $self->version,
+		license      => $self->license,
+	);
+	$self->provides( %{ $build->find_dist_packages || {} } );
 }
 
 sub feature {
-    my $self     = shift;
-    my $name     = shift;
-    my $features = ( $self->{values}{features} ||= [] );
-
-    my $mods;
-
-    if ( @_ == 1 and ref( $_[0] ) ) {
-        # The user used ->feature like ->features by passing in the second
-        # argument as a reference.  Accomodate for that.
-        $mods = $_[0];
-    } else {
-        $mods = \@_;
-    }
-
-    my $count = 0;
-    push @$features, (
-        $name => [
-            map {
-                ref($_) ? ( ref($_) eq 'HASH' ) ? %$_
-                                                : @$_
-                        : $_
-            } @$mods
-        ]
-    );
+	my $self     = shift;
+	my $name     = shift;
+	my $features = ( $self->{values}{features} ||= [] );
+	my $mods;
+
+	if ( @_ == 1 and ref( $_[0] ) ) {
+		# The user used ->feature like ->features by passing in the second
+		# argument as a reference.  Accomodate for that.
+		$mods = $_[0];
+	} else {
+		$mods = \@_;
+	}
+
+	my $count = 0;
+	push @$features, (
+		$name => [
+			map {
+				ref($_) ? ( ref($_) eq 'HASH' ) ? %$_ : @$_ : $_
+			} @$mods
+		]
+	);
 
-    return @$features;
+	return @$features;
 }
 
 sub features {
-    my $self = shift;
-    while ( my ( $name, $mods ) = splice( @_, 0, 2 ) ) {
-        $self->feature( $name, @$mods );
-    }
-    return $self->{values}->{features}
-    	? @{ $self->{values}->{features} }
-    	: ();
+	my $self = shift;
+	while ( my ( $name, $mods ) = splice( @_, 0, 2 ) ) {
+		$self->feature( $name, @$mods );
+	}
+	return $self->{values}{features}
+		? @{ $self->{values}{features} }
+		: ();
 }
 
 sub no_index {
-    my $self = shift;
-    my $type = shift;
-    push @{ $self->{values}{no_index}{$type} }, @_ if $type;
-    return $self->{values}{no_index};
+	my $self = shift;
+	my $type = shift;
+	push @{ $self->{values}{no_index}{$type} }, @_ if $type;
+	return $self->{values}{no_index};
 }
 
 sub read {
-    my $self = shift;
-    $self->include_deps( 'YAML', 0 );
+	my $self = shift;
+	$self->include_deps( 'YAML::Tiny', 0 );
 
-    require YAML;
-    my $data = YAML::LoadFile('META.yml');
+	require YAML::Tiny;
+	my $data = YAML::Tiny::LoadFile('META.yml');
 
-    # Call methods explicitly in case user has already set some values.
-    while ( my ( $key, $value ) = each %$data ) {
-        next unless $self->can($key);
-        if ( ref $value eq 'HASH' ) {
-            while ( my ( $module, $version ) = each %$value ) {
-                $self->can($key)->($self, $module => $version );
-            }
-        }
-        else {
-            $self->can($key)->($self, $value);
-        }
-    }
-    return $self;
+	# Call methods explicitly in case user has already set some values.
+	while ( my ( $key, $value ) = each %$data ) {
+		next unless $self->can($key);
+		if ( ref $value eq 'HASH' ) {
+			while ( my ( $module, $version ) = each %$value ) {
+				$self->can($key)->($self, $module => $version );
+			}
+		} else {
+			$self->can($key)->($self, $value);
+		}
+	}
+	return $self;
 }
 
 sub write {
-    my $self = shift;
-    return $self unless $self->is_admin;
-    $self->admin->write_meta;
-    return $self;
+	my $self = shift;
+	return $self unless $self->is_admin;
+	$self->admin->write_meta;
+	return $self;
 }
 
 sub version_from {
-    my ( $self, $file ) = @_;
-    require ExtUtils::MM_Unix;
-    $self->version( ExtUtils::MM_Unix->parse_version($file) );
+	require ExtUtils::MM_Unix;
+	my ( $self, $file ) = @_;
+	$self->version( ExtUtils::MM_Unix->parse_version($file) );
 }
 
 sub abstract_from {
-    my ( $self, $file ) = @_;
-    require ExtUtils::MM_Unix;
-    $self->abstract(
-        bless(
-            { DISTNAME => $self->name },
-            'ExtUtils::MM_Unix'
-        )->parse_abstract($file)
-     );
-}
-
-sub _slurp {
-    my ( $self, $file ) = @_;
-
-    local *FH;
-    open FH, "< $file" or die "Cannot open $file.pod: $!";
-    do { local $/; <FH> };
+	require ExtUtils::MM_Unix;
+	my ( $self, $file ) = @_;
+	$self->abstract(
+		bless(
+			{ DISTNAME => $self->name },
+			'ExtUtils::MM_Unix'
+		)->parse_abstract($file)
+	 );
+}
+
+# Add both distribution and module name
+sub name_from {
+	my ($self, $file) = @_;
+	if (
+		Module::Install::_read($file) =~ m/
+		^ \s*
+		package \s*
+		([\w:]+)
+		\s* ;
+		/ixms
+	) {
+		my ($name, $module_name) = ($1, $1);
+		$name =~ s{::}{-}g;
+		$self->name($name);
+		unless ( $self->module_name ) {
+			$self->module_name($module_name);
+		}
+	} else {
+		die("Cannot determine name from $file\n");
+	}
 }
 
 sub perl_version_from {
-    my ( $self, $file ) = @_;
-
-    if (
-        $self->_slurp($file) =~ m/
-        ^
-        use \s*
-        v?
-        ([\d_\.]+)
-        \s* ;
-    /ixms
-      )
-    {
-        my $v = $1;
-        $v =~ s{_}{}g;
-        $self->perl_version($1);
-    }
-    else {
-        warn "Cannot determine perl version info from $file\n";
-        return;
-    }
+	my $self = shift;
+	if (
+		Module::Install::_read($_[0]) =~ m/
+		^
+		(?:use|require) \s*
+		v?
+		([\d_\.]+)
+		\s* ;
+		/ixms
+	) {
+		my $perl_version = $1;
+		$perl_version =~ s{_}{}g;
+		$self->perl_version($perl_version);
+	} else {
+		warn "Cannot determine perl version info from $_[0]\n";
+		return;
+	}
 }
 
 sub author_from {
-    my ( $self, $file ) = @_;
-    my $content = $self->_slurp($file);
-    if ($content =~ m/
-        =head \d \s+ (?:authors?)\b \s*
-        ([^\n]*)
-        |
-        =head \d \s+ (?:licen[cs]e|licensing|copyright|legal)\b \s*
-        .*? copyright .*? \d\d\d[\d.]+ \s* (?:\bby\b)? \s*
-        ([^\n]*)
-    /ixms) {
-        my $author = $1 || $2;
-        $author =~ s{E<lt>}{<}g;
-        $author =~ s{E<gt>}{>}g;
-        $self->author($author); 
-    }
-    else {
-        warn "Cannot determine author info from $file\n";
-    }
+	my $self    = shift;
+	my $content = Module::Install::_read($_[0]);
+	if ($content =~ m/
+		=head \d \s+ (?:authors?)\b \s*
+		([^\n]*)
+		|
+		=head \d \s+ (?:licen[cs]e|licensing|copyright|legal)\b \s*
+		.*? copyright .*? \d\d\d[\d.]+ \s* (?:\bby\b)? \s*
+		([^\n]*)
+	/ixms) {
+		my $author = $1 || $2;
+		$author =~ s{E<lt>}{<}g;
+		$author =~ s{E<gt>}{>}g;
+		$self->author($author);
+	} else {
+		warn "Cannot determine author info from $_[0]\n";
+	}
 }
 
 sub license_from {
-    my ( $self, $file ) = @_;
+	my $self = shift;
+	if (
+		Module::Install::_read($_[0]) =~ m/
+		(
+			=head \d \s+
+			(?:licen[cs]e|licensing|copyright|legal)\b
+			.*?
+		)
+		(=head\\d.*|=cut.*|)
+		\z
+	/ixms ) {
+		my $license_text = $1;
+		my @phrases      = (
+			'under the same (?:terms|license) as perl itself' => 'perl',        1,
+			'GNU public license'                              => 'gpl',         1,
+			'GNU lesser public license'                       => 'lgpl',        1,
+			'BSD license'                                     => 'bsd',         1,
+			'Artistic license'                                => 'artistic',    1,
+			'GPL'                                             => 'gpl',         1,
+			'LGPL'                                            => 'lgpl',        1,
+			'BSD'                                             => 'bsd',         1,
+			'Artistic'                                        => 'artistic',    1,
+			'MIT'                                             => 'mit',         1,
+			'proprietary'                                     => 'proprietary', 0,
+		);
+		while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
+			$pattern =~ s{\s+}{\\s+}g;
+			if ( $license_text =~ /\b$pattern\b/i ) {
+				if ( $osi and $license_text =~ /All rights reserved/i ) {
+					print "WARNING: 'All rights reserved' in copyright may invalidate Open Source license.\n";
+				}
+				$self->license($license);
+				return 1;
+			}
+		}
+	}
+
+	warn "Cannot determine license info from $_[0]\n";
+	return 'unknown';
+}
 
-    if (
-        $self->_slurp($file) =~ m/
-        =head \d \s+
-        (?:licen[cs]e|licensing|copyright|legal)\b
-        (.*?)
-        (=head\\d.*|=cut.*|)
-        \z
-    /ixms
-      )
-    {
-        my $license_text = $1;
-        my @phrases      = (
-            'under the same (?:terms|license) as perl itself' => 'perl',
-            'GNU public license'                              => 'gpl',
-            'GNU lesser public license'                       => 'gpl',
-            'BSD license'                                     => 'bsd',
-            'Artistic license'                                => 'artistic',
-            'GPL'                                             => 'gpl',
-            'LGPL'                                            => 'lgpl',
-            'BSD'                                             => 'bsd',
-            'Artistic'                                        => 'artistic',
-        );
-        while ( my ( $pattern, $license ) = splice( @phrases, 0, 2 ) ) {
-            $pattern =~ s{\s+}{\\s+}g;
-            if ( $license_text =~ /\b$pattern\b/i ) {
-                $self->license($license);
-                return 1;
-            }
-        }
-    }
+sub bugtracker_from {
+	my $self    = shift;
+	my $content = Module::Install::_read($_[0]);
+	my @links   = $content =~ m/L\<(http\:\/\/rt\.cpan\.org\/[^>]+)\>/g;
+	unless ( @links ) {
+		warn "Cannot determine bugtracker info from $_[0]\n";
+		return 0;
+	}
+	if ( @links > 1 ) {
+		warn "Found more than on rt.cpan.org link in $_[0]\n";
+		return 0;
+	}
 
-    warn "Cannot determine license info from $file\n";
-    return 'unknown';
+	# Set the bugtracker
+	bugtracker( $links[0] );
+	return 1;
+}
+
+sub install_script {
+	my $self = shift;
+	my $args = $self->makemaker_args;
+	my $exe  = $args->{EXE_FILES} ||= [];
+        foreach ( @_ ) {
+		if ( -f $_ ) {
+			push @$exe, $_;
+		} elsif ( -d 'script' and -f "script/$_" ) {
+			push @$exe, "script/$_";
+		} else {
+			die("Cannot find script '$_'");
+		}
+	}
 }
 
 1;
diff -Nru libfile-sharedir-perl-0.05/inc/Module/Install/Share.pm libfile-sharedir-perl-1.00/inc/Module/Install/Share.pm
--- libfile-sharedir-perl-0.05/inc/Module/Install/Share.pm	2006-09-04 03:52:56.000000000 +0300
+++ libfile-sharedir-perl-1.00/inc/Module/Install/Share.pm	2008-07-17 10:59:00.000000000 +0300
@@ -6,35 +6,62 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.63';
+	$VERSION = '0.76';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
 
 sub install_share {
-	my ($self, $dir) = @_;
-
-	if ( ! defined $dir ) {
-		die "Cannot find the 'share' directory" unless -d 'share';
-		$dir = 'share';
+	my $self = shift;
+	my $dir  = @_ ? pop   : 'share';
+	my $type = @_ ? shift : 'dist';
+	unless ( defined $type and $type eq 'module' or $type eq 'dist' ) {
+		die "Illegal or invalid share dir type '$type'";
+	}
+	unless ( defined $dir and -d $dir ) {
+		die "Illegal or missing directory install_share param";
 	}
 
-	$self->postamble(<<"END_MAKEFILE");
+	# Split by type
+	my $S = ($^O eq 'MSWin32') ? "\\" : "\/";
+	if ( $type eq 'dist' ) {
+		die "Too many parameters to install_share" if @_;
+
+		# Set up the install
+		$self->postamble(<<"END_MAKEFILE");
+config ::
+\t\$(NOECHO) \$(MOD_INSTALL) \\
+\t\t"$dir" \$(INST_LIB)${S}auto${S}share${S}dist${S}\$(DISTNAME)
+
+END_MAKEFILE
+	} else {
+		my $module = Module::Install::_CLASS($_[0]);
+		unless ( defined $module ) {
+			die "Missing or invalid module name '$_[0]'";
+		}
+		$module =~ s/::/-/g;
+
+		# Set up the install
+		$self->postamble(<<"END_MAKEFILE");
 config ::
 \t\$(NOECHO) \$(MOD_INSTALL) \\
-\t\t\"$dir\" \$(INST_AUTODIR)
+\t\t"$dir" \$(INST_LIB)${S}auto${S}share${S}module${S}$module
 
 END_MAKEFILE
+	}
 
 	# The above appears to behave incorrectly when used with old versions
 	# of ExtUtils::Install (known-bad on RHEL 3, with 5.8.0)
 	# So when we need to install a share directory, make sure we add a
 	# dependency on a moderately new version of ExtUtils::MakeMaker.
 	$self->build_requires( 'ExtUtils::MakeMaker' => '6.11' );
+
+	# 99% of the time we don't want to index a shared dir
+	$self->no_index( directory => $dir );
 }
 
 1;
 
 __END__
 
-#line 98
+#line 125
diff -Nru libfile-sharedir-perl-0.05/inc/Module/Install/Win32.pm libfile-sharedir-perl-1.00/inc/Module/Install/Win32.pm
--- libfile-sharedir-perl-0.05/inc/Module/Install/Win32.pm	2006-09-04 03:52:56.000000000 +0300
+++ libfile-sharedir-perl-1.00/inc/Module/Install/Win32.pm	2008-07-17 10:59:00.000000000 +0300
@@ -4,11 +4,11 @@
 use strict;
 use Module::Install::Base;
 
-use vars qw{$VERSION $ISCORE @ISA};
+use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.63';
-	$ISCORE  = 1;
+	$VERSION = '0.76';
 	@ISA     = qw{Module::Install::Base};
+	$ISCORE  = 1;
 }
 
 # determine if the user needs nmake, and download it if needed
@@ -16,7 +16,7 @@
 	my $self = shift;
 	$self->load('can_run');
 	$self->load('get_file');
-	
+
 	require Config;
 	return unless (
 		$^O eq 'MSWin32'                     and
@@ -38,8 +38,7 @@
 		remove    => 1,
 	);
 
-	if (!$rv) {
-        die <<'END_MESSAGE';
+	die <<'END_MESSAGE' unless $rv;
 
 -------------------------------------------------------------------------------
 
@@ -59,7 +58,7 @@
 
 -------------------------------------------------------------------------------
 END_MESSAGE
-	}
+
 }
 
 1;
diff -Nru libfile-sharedir-perl-0.05/inc/Module/Install/WriteAll.pm libfile-sharedir-perl-1.00/inc/Module/Install/WriteAll.pm
--- libfile-sharedir-perl-0.05/inc/Module/Install/WriteAll.pm	2006-09-04 03:52:56.000000000 +0300
+++ libfile-sharedir-perl-1.00/inc/Module/Install/WriteAll.pm	2008-07-17 10:59:00.000000000 +0300
@@ -4,40 +4,37 @@
 use strict;
 use Module::Install::Base;
 
-use vars qw{$VERSION $ISCORE @ISA};
+use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.63';
-	$ISCORE  = 1;
+	$VERSION = '0.76';
 	@ISA     = qw{Module::Install::Base};
+	$ISCORE  = 1;
 }
 
 sub WriteAll {
-    my $self = shift;
-    my %args = (
-        meta        => 1,
-        sign        => 0,
-        inline      => 0,
-        check_nmake => 1,
-        @_
-    );
-
-    $self->sign(1)                if $args{sign};
-    $self->Meta->write            if $args{meta};
-    $self->admin->WriteAll(%args) if $self->is_admin;
-
-    if ( $0 =~ /Build.PL$/i ) {
-        $self->Build->write;
-    } else {
-        $self->check_nmake if $args{check_nmake};
-        unless ( $self->makemaker_args->{'PL_FILES'} ) {
-        	$self->makemaker_args( PL_FILES => {} );
-        }
-        if ($args{inline}) {
-            $self->Inline->write;
-        } else {
-            $self->Makefile->write;
-        }
-    }
+	my $self = shift;
+	my %args = (
+		meta        => 1,
+		sign        => 0,
+		inline      => 0,
+		check_nmake => 1,
+		@_,
+	);
+
+	$self->sign(1)                if $args{sign};
+	$self->Meta->write            if $args{meta};
+	$self->admin->WriteAll(%args) if $self->is_admin;
+
+	$self->check_nmake if $args{check_nmake};
+	unless ( $self->makemaker_args->{PL_FILES} ) {
+		$self->makemaker_args( PL_FILES => {} );
+	}
+
+	if ( $args{inline} ) {
+		$self->Inline->write;
+	} else {
+		$self->Makefile->write;
+	}
 }
 
 1;
diff -Nru libfile-sharedir-perl-0.05/inc/Module/Install.pm libfile-sharedir-perl-1.00/inc/Module/Install.pm
--- libfile-sharedir-perl-0.05/inc/Module/Install.pm	2006-09-04 03:52:56.000000000 +0300
+++ libfile-sharedir-perl-1.00/inc/Module/Install.pm	2008-07-17 10:58:59.000000000 +0300
@@ -17,20 +17,30 @@
 #     3. The ./inc/ version of Module::Install loads
 # }
 
-use 5.004;
+BEGIN {
+	require 5.004;
+}
 use strict 'vars';
 
 use vars qw{$VERSION};
 BEGIN {
-    # All Module::Install core packages now require synchronised versions.
-    # This will be used to ensure we don't accidentally load old or
-    # different versions of modules.
-    # This is not enforced yet, but will be some time in the next few
-    # releases once we can make sure it won't clash with custom
-    # Module::Install extensions.
-    $VERSION = '0.63';
+	# All Module::Install core packages now require synchronised versions.
+	# This will be used to ensure we don't accidentally load old or
+	# different versions of modules.
+	# This is not enforced yet, but will be some time in the next few
+	# releases once we can make sure it won't clash with custom
+	# Module::Install extensions.
+	$VERSION = '0.76';
+
+	*inc::Module::Install::VERSION = *VERSION;
+	@inc::Module::Install::ISA     = __PACKAGE__;
+
 }
 
+
+
+
+
 # Whether or not inc::Module::Install is actually loaded, the
 # $INC{inc/Module/Install.pm} is what will still get set as long as
 # the caller loaded module this in the documented manner.
@@ -38,26 +48,29 @@
 # they may not have a MI version that works with the Makefile.PL. This would
 # result in false errors or unexpected behaviour. And we don't want that.
 my $file = join( '/', 'inc', split /::/, __PACKAGE__ ) . '.pm';
-unless ( $INC{$file} ) {
-    die <<"END_DIE";
+unless ( $INC{$file} ) { die <<"END_DIE" }
+
 Please invoke ${\__PACKAGE__} with:
 
-    use inc::${\__PACKAGE__};
+	use inc::${\__PACKAGE__};
 
 not:
 
-    use ${\__PACKAGE__};
+	use ${\__PACKAGE__};
 
 END_DIE
-}
+
+
+
+
 
 # If the script that is loading Module::Install is from the future,
 # then make will detect this and cause it to re-run over and over
 # again. This is bad. Rather than taking action to touch it (which
 # is unreliable on some platforms and requires write permissions)
 # for now we should catch this and refuse to run.
-if ( -f $0 and (stat($0))[9] > time ) {
-	die << "END_DIE";
+if ( -f $0 and (stat($0))[9] > time ) { die <<"END_DIE" }
+
 Your installer $0 has a modification time in the future.
 
 This is known to create infinite loops in make.
@@ -65,115 +78,142 @@
 Please correct this, then run $0 again.
 
 END_DIE
-}
+
+
+
+
+
+# Build.PL was formerly supported, but no longer is due to excessive
+# difficulty in implementing every single feature twice.
+if ( $0 =~ /Build.PL$/i ) { die <<"END_DIE" }
+
+Module::Install no longer supports Build.PL.
+
+It was impossible to maintain duel backends, and has been deprecated.
+
+Please remove all Build.PL files and only use the Makefile.PL installer.
+
+END_DIE
+
+
+
+
+
+# To save some more typing in Module::Install installers, every...
+# use inc::Module::Install
+# ...also acts as an implicit use strict.
+$^H |= strict::bits(qw(refs subs vars));
+
+
+
+
 
 use Cwd        ();
 use File::Find ();
 use File::Path ();
 use FindBin;
 
-*inc::Module::Install::VERSION = *VERSION;
-@inc::Module::Install::ISA     = __PACKAGE__;
-
 sub autoload {
-    my $self = shift;
-    my $who  = $self->_caller;
-    my $cwd  = Cwd::cwd();
-    my $sym  = "${who}::AUTOLOAD";
-    $sym->{$cwd} = sub {
-        my $pwd = Cwd::cwd();
-        if ( my $code = $sym->{$pwd} ) {
-            # delegate back to parent dirs
-            goto &$code unless $cwd eq $pwd;
-        }
-        $$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
-        unshift @_, ($self, $1);
-        goto &{$self->can('call')} unless uc($1) eq $1;
-    };
+	my $self = shift;
+	my $who  = $self->_caller;
+	my $cwd  = Cwd::cwd();
+	my $sym  = "${who}::AUTOLOAD";
+	$sym->{$cwd} = sub {
+		my $pwd = Cwd::cwd();
+		if ( my $code = $sym->{$pwd} ) {
+			# delegate back to parent dirs
+			goto &$code unless $cwd eq $pwd;
+		}
+		$$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
+		unshift @_, ( $self, $1 );
+		goto &{$self->can('call')} unless uc($1) eq $1;
+	};
 }
 
 sub import {
-    my $class = shift;
-    my $self  = $class->new(@_);
-    my $who   = $self->_caller;
-
-    unless ( -f $self->{file} ) {
-        require "$self->{path}/$self->{dispatch}.pm";
-        File::Path::mkpath("$self->{prefix}/$self->{author}");
-        $self->{admin} = "$self->{name}::$self->{dispatch}"->new( _top => $self );
-        $self->{admin}->init;
-        @_ = ($class, _self => $self);
-        goto &{"$self->{name}::import"};
-    }
-
-    *{"${who}::AUTOLOAD"} = $self->autoload;
-    $self->preload;
-
-    # Unregister loader and worker packages so subdirs can use them again
-    delete $INC{"$self->{file}"};
-    delete $INC{"$self->{path}.pm"};
+	my $class = shift;
+	my $self  = $class->new(@_);
+	my $who   = $self->_caller;
+
+	unless ( -f $self->{file} ) {
+		require "$self->{path}/$self->{dispatch}.pm";
+		File::Path::mkpath("$self->{prefix}/$self->{author}");
+		$self->{admin} = "$self->{name}::$self->{dispatch}"->new( _top => $self );
+		$self->{admin}->init;
+		@_ = ($class, _self => $self);
+		goto &{"$self->{name}::import"};
+	}
+
+	*{"${who}::AUTOLOAD"} = $self->autoload;
+	$self->preload;
+
+	# Unregister loader and worker packages so subdirs can use them again
+	delete $INC{"$self->{file}"};
+	delete $INC{"$self->{path}.pm"};
+
+	return 1;
 }
 
 sub preload {
-    my ($self) = @_;
-
-    unless ( $self->{extensions} ) {
-        $self->load_extensions(
-            "$self->{prefix}/$self->{path}", $self
-        );
-    }
-
-    my @exts = @{$self->{extensions}};
-    unless ( @exts ) {
-        my $admin = $self->{admin};
-        @exts = $admin->load_all_extensions;
-    }
-
-    my %seen;
-    foreach my $obj ( @exts ) {
-        while (my ($method, $glob) = each %{ref($obj) . '::'}) {
-            next unless $obj->can($method);
-            next if $method =~ /^_/;
-            next if $method eq uc($method);
-            $seen{$method}++;
-        }
-    }
-
-    my $who = $self->_caller;
-    foreach my $name ( sort keys %seen ) {
-        *{"${who}::$name"} = sub {
-            ${"${who}::AUTOLOAD"} = "${who}::$name";
-            goto &{"${who}::AUTOLOAD"};
-        };
-    }
+	my $self = shift;
+	unless ( $self->{extensions} ) {
+		$self->load_extensions(
+			"$self->{prefix}/$self->{path}", $self
+		);
+	}
+
+	my @exts = @{$self->{extensions}};
+	unless ( @exts ) {
+		my $admin = $self->{admin};
+		@exts = $admin->load_all_extensions;
+	}
+
+	my %seen;
+	foreach my $obj ( @exts ) {
+		while (my ($method, $glob) = each %{ref($obj) . '::'}) {
+			next unless $obj->can($method);
+			next if $method =~ /^_/;
+			next if $method eq uc($method);
+			$seen{$method}++;
+		}
+	}
+
+	my $who = $self->_caller;
+	foreach my $name ( sort keys %seen ) {
+		*{"${who}::$name"} = sub {
+			${"${who}::AUTOLOAD"} = "${who}::$name";
+			goto &{"${who}::AUTOLOAD"};
+		};
+	}
 }
 
 sub new {
-    my ($class, %args) = @_;
+	my ($class, %args) = @_;
 
-    # ignore the prefix on extension modules built from top level.
-    my $base_path = Cwd::abs_path($FindBin::Bin);
-    unless ( Cwd::abs_path(Cwd::cwd()) eq $base_path ) {
-        delete $args{prefix};
-    }
-
-    return $args{_self} if $args{_self};
-
-    $args{dispatch} ||= 'Admin';
-    $args{prefix}   ||= 'inc';
-    $args{author}   ||= ($^O eq 'VMS' ? '_author' : '.author');
-    $args{bundle}   ||= 'inc/BUNDLES';
-    $args{base}     ||= $base_path;
-    $class =~ s/^\Q$args{prefix}\E:://;
-    $args{name}     ||= $class;
-    $args{version}  ||= $class->VERSION;
-    unless ( $args{path} ) {
-        $args{path}  = $args{name};
-        $args{path}  =~ s!::!/!g;
-    }
-    $args{file}     ||= "$args{base}/$args{prefix}/$args{path}.pm";
+	# ignore the prefix on extension modules built from top level.
+	my $base_path = Cwd::abs_path($FindBin::Bin);
+	unless ( Cwd::abs_path(Cwd::cwd()) eq $base_path ) {
+		delete $args{prefix};
+	}
+
+	return $args{_self} if $args{_self};
+
+	$args{dispatch} ||= 'Admin';
+	$args{prefix}   ||= 'inc';
+	$args{author}   ||= ($^O eq 'VMS' ? '_author' : '.author');
+	$args{bundle}   ||= 'inc/BUNDLES';
+	$args{base}     ||= $base_path;
+	$class =~ s/^\Q$args{prefix}\E:://;
+	$args{name}     ||= $class;
+	$args{version}  ||= $class->VERSION;
+	unless ( $args{path} ) {
+		$args{path}  = $args{name};
+		$args{path}  =~ s!::!/!g;
+	}
+	$args{file}     ||= "$args{base}/$args{prefix}/$args{path}.pm";
+	$args{wrote}      = 0;
 
-    bless( \%args, $class );
+	bless( \%args, $class );
 }
 
 sub call {
@@ -184,98 +224,141 @@
 }
 
 sub load {
-    my ($self, $method) = @_;
-
-    $self->load_extensions(
-        "$self->{prefix}/$self->{path}", $self
-    ) unless $self->{extensions};
+	my ($self, $method) = @_;
 
-    foreach my $obj (@{$self->{extensions}}) {
-        return $obj if $obj->can($method);
-    }
+	$self->load_extensions(
+		"$self->{prefix}/$self->{path}", $self
+	) unless $self->{extensions};
+
+	foreach my $obj (@{$self->{extensions}}) {
+		return $obj if $obj->can($method);
+	}
 
-    my $admin = $self->{admin} or die <<"END_DIE";
+	my $admin = $self->{admin} or die <<"END_DIE";
 The '$method' method does not exist in the '$self->{prefix}' path!
 Please remove the '$self->{prefix}' directory and run $0 again to load it.
 END_DIE
 
-    my $obj = $admin->load($method, 1);
-    push @{$self->{extensions}}, $obj;
+	my $obj = $admin->load($method, 1);
+	push @{$self->{extensions}}, $obj;
 
-    $obj;
+	$obj;
 }
 
 sub load_extensions {
-    my ($self, $path, $top) = @_;
+	my ($self, $path, $top) = @_;
 
-    unless ( grep { lc $_ eq lc $self->{prefix} } @INC ) {
-        unshift @INC, $self->{prefix};
-    }
-
-    foreach my $rv ( $self->find_extensions($path) ) {
-        my ($file, $pkg) = @{$rv};
-        next if $self->{pathnames}{$pkg};
-
-        local $@;
-        my $new = eval { require $file; $pkg->can('new') };
-        unless ( $new ) {
-            warn $@ if $@;
-            next;
-        }
-        $self->{pathnames}{$pkg} = delete $INC{$file};
-        push @{$self->{extensions}}, &{$new}($pkg, _top => $top );
-    }
+	unless ( grep { lc $_ eq lc $self->{prefix} } @INC ) {
+		unshift @INC, $self->{prefix};
+	}
+
+	foreach my $rv ( $self->find_extensions($path) ) {
+		my ($file, $pkg) = @{$rv};
+		next if $self->{pathnames}{$pkg};
+
+		local $@;
+		my $new = eval { require $file; $pkg->can('new') };
+		unless ( $new ) {
+			warn $@ if $@;
+			next;
+		}
+		$self->{pathnames}{$pkg} = delete $INC{$file};
+		push @{$self->{extensions}}, &{$new}($pkg, _top => $top );
+	}
 
-    $self->{extensions} ||= [];
+	$self->{extensions} ||= [];
 }
 
 sub find_extensions {
-    my ($self, $path) = @_;
+	my ($self, $path) = @_;
+
+	my @found;
+	File::Find::find( sub {
+		my $file = $File::Find::name;
+		return unless $file =~ m!^\Q$path\E/(.+)\.pm\Z!is;
+		my $subpath = $1;
+		return if lc($subpath) eq lc($self->{dispatch});
+
+		$file = "$self->{path}/$subpath.pm";
+		my $pkg = "$self->{name}::$subpath";
+		$pkg =~ s!/!::!g;
 
-    my @found;
-    File::Find::find( sub {
-        my $file = $File::Find::name;
-        return unless $file =~ m!^\Q$path\E/(.+)\.pm\Z!is;
-        my $subpath = $1;
-        return if lc($subpath) eq lc($self->{dispatch});
-
-        $file = "$self->{path}/$subpath.pm";
-        my $pkg = "$self->{name}::$subpath";
-        $pkg =~ s!/!::!g;
-
-        # If we have a mixed-case package name, assume case has been preserved
-        # correctly.  Otherwise, root through the file to locate the case-preserved
-        # version of the package name.
-        if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) {
-            open PKGFILE, "<$subpath.pm" or die "find_extensions: Can't open $subpath.pm: $!";
-            my $in_pod = 0;
-            while ( <PKGFILE> ) {
-                $in_pod = 1 if /^=\w/;
-                $in_pod = 0 if /^=cut/;
-                next if ($in_pod || /^=cut/);  # skip pod text
-                next if /^\s*#/;               # and comments
-                if ( m/^\s*package\s+($pkg)\s*;/i ) {
-                    $pkg = $1;
-                    last;
-                }
-            }
-            close PKGFILE;
-        }
+		# If we have a mixed-case package name, assume case has been preserved
+		# correctly.  Otherwise, root through the file to locate the case-preserved
+		# version of the package name.
+		if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) {
+			my $content = Module::Install::_read($subpath . '.pm');
+			my $in_pod  = 0;
+			foreach ( split //, $content ) {
+				$in_pod = 1 if /^=\w/;
+				$in_pod = 0 if /^=cut/;
+				next if ($in_pod || /^=cut/);  # skip pod text
+				next if /^\s*#/;               # and comments
+				if ( m/^\s*package\s+($pkg)\s*;/i ) {
+					$pkg = $1;
+					last;
+				}
+			}
+		}
 
-        push @found, [ $file, $pkg ];
-    }, $path ) if -d $path;
+		push @found, [ $file, $pkg ];
+	}, $path ) if -d $path;
 
-    @found;
+	@found;
 }
 
+
+
+
+
+#####################################################################
+# Utility Functions
+
 sub _caller {
-    my $depth = 0;
-    my $call  = caller($depth);
-    while ( $call eq __PACKAGE__ ) {
-        $depth++;
-        $call = caller($depth);
-    }
-    return $call;
+	my $depth = 0;
+	my $call  = caller($depth);
+	while ( $call eq __PACKAGE__ ) {
+		$depth++;
+		$call = caller($depth);
+	}
+	return $call;
+}
+
+sub _read {
+	local *FH;
+	open FH, "< $_[0]" or die "open($_[0]): $!";
+	my $str = do { local $/; <FH> };
+	close FH or die "close($_[0]): $!";
+	return $str;
+}
+
+sub _write {
+	local *FH;
+	open FH, "> $_[0]" or die "open($_[0]): $!";
+	foreach ( 1 .. $#_ ) { print FH $_[$_] or die "print($_[0]): $!" }
+	close FH or die "close($_[0]): $!";
+}
+
+sub _version ($) {
+	my $s = shift || 0;
+	   $s =~ s/^(\d+)\.?//;
+	my $l = $1 || 0;
+	my @v = map { $_ . '0' x (3 - length $_) } $s =~ /(\d{1,3})\D?/g;
+	   $l = $l . '.' . join '', @v if @v;
+	return $l + 0;
+}
+
+# Cloned from Params::Util::_CLASS
+sub _CLASS ($) {
+	(
+		defined $_[0]
+		and
+		! ref $_[0]
+		and
+		$_[0] =~ m/^[^\W\d]\w*(?:::\w+)*$/s
+	) ? $_[0] : undef;
 }
 
 1;
+
+# Copyright 2008 Adam Kennedy.
diff -Nru libfile-sharedir-perl-0.05/lib/File/ShareDir.pm libfile-sharedir-perl-1.00/lib/File/ShareDir.pm
--- libfile-sharedir-perl-0.05/lib/File/ShareDir.pm	2006-09-04 03:52:56.000000000 +0300
+++ libfile-sharedir-perl-1.00/lib/File/ShareDir.pm	2008-07-17 10:58:40.000000000 +0300
@@ -19,6 +19,9 @@
   # Find a specific file in our dist/module shared dir
   $file = dist_file(  'File-ShareDir',  'file/name.txt');
   $file = module_file('File::ShareDir', 'file/name.txt');
+  
+  # Like module_file, but search up the inheritance tree
+  $file = class_file( 'Foo::Bar', 'file/name.txt' );
 
 =head1 DESCRIPTION
 
@@ -104,22 +107,29 @@
 
 use 5.005;
 use strict;
-use base 'Exporter';
 use Carp             'croak';
+use Config           ();
+use Exporter         ();
 use File::Spec       ();
 use Params::Util     '_CLASS';
 use Class::Inspector ();
 
-use vars qw{$VERSION $IS_MACOS @EXPORT_OK %EXPORT_TAGS};
+use vars qw{$VERSION @ISA @EXPORT_OK %EXPORT_TAGS};
 BEGIN {
-	$VERSION     = '0.05';
-	$IS_MACOS    = $^O eq 'MacOS';
-	@EXPORT_OK   = qw{dist_dir dist_file module_dir module_file};
+	$VERSION     = '1.00';
+	@ISA         = qw{ Exporter };
+	@EXPORT_OK   = qw{
+		dist_dir dist_file
+		module_dir module_file
+		class_dir class_file
+	};
 	%EXPORT_TAGS = (
 		ALL => [ @EXPORT_OK ],
-		);	
+	);	
 }
 
+use constant IS_MACOS => !!($^O eq 'MacOS');
+
 
 
 
@@ -131,7 +141,7 @@
 
 =head2 dist_dir
 
-  # Get a distrubition's shared files directory
+  # Get a distribution's shared files directory
   my $dir = dist_dir('My-Distribution');
 
 The C<dist_dir> function takes a single parameter of the name of an
@@ -145,11 +155,49 @@
 
 sub dist_dir {
 	my $dist = _DIST(shift);
+	my $dir;
+
+	# Try the new version
+	$dir = _dist_dir_new( $dist );
+	return $dir if defined $dir;
+
+	# Fall back to the legacy version
+	$dir = _dist_dir_old( $dist );
+	return $dir if defined $dir;
+
+	# Ran out of options
+	croak("Failed to find share dir for dist '$dist'");
+}
+
+sub _dist_dir_new {
+	my $dist = shift;
+
+	# Create the subpath
+	my $path = File::Spec->catdir(
+		'auto', 'share', 'dist', $dist,
+	);
+
+	# Find the full dir withing @INC
+	foreach my $inc ( @INC ) {
+		next unless defined $inc and ! ref $inc;
+		my $dir = File::Spec->catdir( $inc, $path );
+		next unless -d $dir;
+		unless ( -r $dir ) {
+			croak("Found directory '$dir', but no read permissions");
+		}
+		return $dir;
+	}
+
+	return undef;
+}
+
+sub _dist_dir_old {
+	my $dist = shift;
 
 	# Create the subpath
 	my $path = File::Spec->catdir(
 		'auto', split( /-/, $dist ),
-		);
+	);
 
 	# Find the full dir withing @INC
 	foreach my $inc ( @INC ) {
@@ -157,13 +205,12 @@
 		my $dir = File::Spec->catdir( $inc, $path );
 		next unless -d $dir;
 		unless ( -r $dir ) {
-			croak("Directory '$dir', no read permissions");
+			croak("Found directory '$dir', but no read permissions");
 		}
 		return $dir;
 	}
 
-	# Couldn't find it
-	croak("Failed to find share dir for dist '$dist'");
+	return undef;
 }
 
 =pod
@@ -187,11 +234,46 @@
 
 sub module_dir {
 	my $module = _MODULE(shift);
+	my $dir;
+
+	# Try the new version
+	$dir = _module_dir_new( $module );
+	return $dir if defined $dir;
+
+	# Fall back to the legacy version
+	return _module_dir_old( $module );
+}
+
+sub _module_dir_new {
+	my $module = shift;
+
+	# Create the subpath
+	my $path = File::Spec->catdir(
+		'auto', 'share', 'module',
+		_module_subdir( $module ),
+	);
+
+	# Find the full dir withing @INC
+	foreach my $inc ( @INC ) {
+		next unless defined $inc and ! ref $inc;
+		my $dir = File::Spec->catdir( $inc, $path );
+		next unless -d $dir;
+		unless ( -r $dir ) {
+			croak("Found directory '$dir', but no read permissions");
+		}
+		return $dir;
+	}
+
+	return undef;
+}
+	
+sub _module_dir_old {
+	my $module = shift;
 	my $short  = Class::Inspector->filename($module);
 	my $long   = Class::Inspector->loaded_filename($module);
-	$short =~ tr{/} {:} if $IS_MACOS;
+	$short =~ tr{/}{:} if IS_MACOS;
 	substr( $short, -3, 3, '' );
-	$long  =~ m{^(.*)\Q$short\E\.pm\z}s or die("Failed to find base dir");
+	$long  =~ m/^(.*)\Q$short\E\.pm\z/s or die("Failed to find base dir");
 	my $dir = File::Spec->catdir( "$1", 'auto', $short );
 	unless ( -d $dir ) {
 		croak("Directory '$dir', does not exist");
@@ -199,7 +281,7 @@
 	unless ( -r $dir ) {
 		croak("Directory '$dir', no read permissions");
 	}
-	return $dir;		
+	return $dir;
 }
 
 =pod
@@ -226,16 +308,48 @@
 	my $dist = _DIST(shift);
 	my $file = _FILE(shift);
 
+	# Try the new version first
+	my $path = _dist_file_new( $dist, $file );
+	return $path if defined $path;
+
+	# Hand off to the legacy version
+	return _dist_file_old( $dist, $file );;
+}
+
+sub _dist_file_new {
+	my $dist = shift;
+	my $file = shift;
+
+	# If it exists, what should the path be
+	my $dir  = _dist_dir_new( $dist );
+	my $path = File::Spec->catfile( $dir, $file );
+
+	# Does the file exist
+	return undef unless -e $path;
+	unless ( -f $path ) {
+		croak("Found dist_file '$path', but not a file");
+	}
+	unless ( -r $path ) {
+		croak("File '$path', no read permissions");
+	}
+
+	return $path;
+}
+
+sub _dist_file_old {
+	my $dist = shift;
+	my $file = shift;
+
 	# Create the subpath
-	my $path = File::Spec->catdir(
+	my $path = File::Spec->catfile(
 		'auto', split( /-/, $dist ), $file,
-		);
+	);
 
 	# Find the full dir withing @INC
 	foreach my $inc ( @INC ) {
 		next unless defined $inc and ! ref $inc;
 		my $full = File::Spec->catdir( $inc, $path );
-		next unless -f $full;
+		next unless -e $full;
 		unless ( -r $full ) {
 			croak("Directory '$full', no read permissions");
 		}
@@ -253,7 +367,7 @@
   # Find a file in our module shared dir
   my $dir = module_file('My::Module', 'file/name.txt');
 
-The C<dist_file> function takes two params of the module name
+The C<module_file> function takes two params of the module name
 and file name. It locates the module dir, and then finds the file within
 it, verifying that the file actually exists, and that it is readable.
 
@@ -274,7 +388,7 @@
 	my $file   = _FILE(shift);
 	my $dir    = module_dir($module);
 	my $path   = File::Spec->catfile($dir, $file);
-	unless ( -e $path and -f _ ) {
+	unless ( -e $path ) {
 		croak("File '$file' does not exist in module dir");
 	}
 	unless ( -r $path ) {
@@ -283,6 +397,71 @@
 	$path;
 }
 
+=pod
+
+=head2 class_file
+
+  # Find a file in our module shared dir, or in our parent class
+  my $dir = class_file('My::Module', 'file/name.txt');
+
+The C<module_file> function takes two params of the module name
+and file name. It locates the module dir, and then finds the file within
+it, verifying that the file actually exists, and that it is readable.
+
+In order to find the directory, the module B<must> be loaded when
+calling this function.
+
+The filename should be a relative path in the format of your local
+filesystem. It will simply added to the directory using L<File::Spec>'s
+C<catfile> method.
+
+If the file is NOT found for that module, C<class_file> will scan up
+the module's @ISA tree, looking for the file in all of the parent
+classes.
+
+This allows you to, in effect, "subclass" shared files.
+
+Returns the file path as a string, or dies if the file or the dist's
+directory cannot be located, or the file is not readable.
+
+=cut
+
+sub class_file {
+	my $module = _MODULE(shift);
+	my $file   = _FILE(shift);
+
+	# Get the super path ( not including UNIVERSAL )
+	# Rather than using Class::ISA, we'll use an inlined version
+	# that implements the same basic algorithm.
+	my @path  = ();
+	my @queue = ( $module );
+	my %seen  = ( $module => 1 );
+	while ( my $cl = shift @queue ) {
+		push @path, $cl;
+		no strict 'refs';
+		unshift @queue, grep { ! $seen{$_}++ }
+			map { s/^::/main::/; s/\'/::/g; $_ }
+			( @{"${cl}::ISA"} );
+	}
+
+	# Search up the path
+	foreach my $class ( @path ) {
+		local $@;
+		my $dir = eval {
+		 	module_dir($class);
+		};
+		next if $@;
+		my $path = File::Spec->catfile($dir, $file);
+		unless ( -e $path ) {
+			next;
+		}
+		unless ( -r $path ) {
+			croak("File '$file' cannot be read, no read permissions");
+		}
+		return $path;
+	}
+	croak("File '$file' does not exist in class or parent shared files");
+}
 
 
 
@@ -290,6 +469,35 @@
 #####################################################################
 # Support Functions
 
+sub _module_subdir {
+	my $module = shift;
+	$module =~ s/::/-/g;
+	return $module;
+}
+
+sub _dist_packfile {
+	my $module = shift;
+	my @dirs   = grep { -e } ( $Config::Config{archlibexp}, $Config::Config{sitearchexp} );
+	my $file   = File::Spec->catfile(
+		'auto', split( /::/, $module), '.packlist',
+	);
+
+	foreach my $dir ( @dirs ) {
+		my $path = File::Spec->catfile( $dir, $file );
+		next unless -f $path;
+
+		# Load the file
+		my $packlist = ExtUtils::Packlist->new($path);
+		unless ( $packlist ) {
+			die "Failed to load .packlist file for $module";
+		}
+
+		die "CODE INCOMPLETE";
+	}
+
+	die "CODE INCOMPLETE";
+}
+
 # Matches a valid distribution name
 ### This is a total guess at this point
 sub _DIST {
@@ -330,11 +538,11 @@
 
 L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-ShareDir>
 
-For other issues, contact the maintainer
+For other issues, contact the maintainer.
 
 =head1 AUTHOR
 
-Adam Kennedy E<lt>cpan@ali.asE<gt>, L<http://ali.as/>
+Adam Kennedy E<lt>adamk@cpan.orgE<gt>
 
 =head1 SEE ALSO
 
@@ -342,7 +550,8 @@
 
 =head1 COPYRIGHT
 
-Copyright (c) 2005, 2006 Adam Kennedy. All rights reserved.
+Copyright 2005 - 2008 Adam Kennedy.
+
 This program is free software; you can redistribute
 it and/or modify it under the same terms as Perl itself.
 
diff -Nru libfile-sharedir-perl-0.05/Makefile.PL libfile-sharedir-perl-1.00/Makefile.PL
--- libfile-sharedir-perl-0.05/Makefile.PL	2006-09-04 03:52:56.000000000 +0300
+++ libfile-sharedir-perl-1.00/Makefile.PL	2008-07-17 10:58:40.000000000 +0300
@@ -1,12 +1,18 @@
-use inc::Module::Install;
+use inc::Module::Install 0.76;
 
-name           'File-ShareDir';
-all_from       'lib/File/ShareDir.pm';
-requires       'Carp'             => 0;
-requires       'Params::Util'     => '0.07';
-requires       'Class::Inspector' => '1.12';
-requires       'File::Spec'       => '0.80';
-build_requires 'Test::More'       => '0.47';
+all_from      'lib/File/ShareDir.pm';
+requires      'Carp'             => 0;
+requires      'Params::Util'     => '0.07';
+requires      'Class::Inspector' => '1.12';
+requires      'File::Spec'       => '0.80';
+test_requires 'Test::More'       => '0.47';
+
+# Default version
 install_share;
 
+# Full version
+install_share(
+	module => 'File::ShareDir' => 'foo',
+);
+
 WriteAll;
diff -Nru libfile-sharedir-perl-0.05/MANIFEST libfile-sharedir-perl-1.00/MANIFEST
--- libfile-sharedir-perl-0.05/MANIFEST	2006-09-04 03:52:57.000000000 +0300
+++ libfile-sharedir-perl-1.00/MANIFEST	2008-07-17 10:59:02.000000000 +0300
@@ -1,4 +1,5 @@
 Changes
+foo/test_file.txt
 inc/Module/Install.pm
 inc/Module/Install/Base.pm
 inc/Module/Install/Can.pm
@@ -15,6 +16,10 @@
 META.yml
 README
 share/sample.txt
+share/subdir/sample.txt
 t/01_compile.t
 t/02_main.t
-t/99_pod.t
+t/97_meta.t
+t/98_pod.t
+t/99_pmv.t
+t/lib/ShareDir.pm
diff -Nru libfile-sharedir-perl-0.05/META.yml libfile-sharedir-perl-1.00/META.yml
--- libfile-sharedir-perl-0.05/META.yml	2006-09-04 03:52:56.000000000 +0300
+++ libfile-sharedir-perl-1.00/META.yml	2008-07-17 10:59:00.000000000 +0300
@@ -1,20 +1,31 @@
-abstract: Locate per-dist and per-module shared files
-author: Adam Kennedy <cpan@ali.as>, L<http://ali.as/>
-build_requires: 
+---
+abstract: 'Locate per-dist and per-module shared files'
+author:
+  - 'Adam Kennedy <adamk@cpan.org>'
+build_requires:
   ExtUtils::MakeMaker: 6.11
   Test::More: 0.47
 distribution_type: module
-generated_by: Module::Install version 0.63
+generated_by: 'Module::Install version 0.76'
 license: perl
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: 1.4
+module_name: File::ShareDir
 name: File-ShareDir
-no_index: 
-  directory: 
+no_index:
+  directory:
+    - share
+    - foo
+    - share
     - inc
     - t
-requires: 
+requires:
   Carp: 0
   Class::Inspector: 1.12
   File::Spec: 0.80
   Params::Util: 0.07
   perl: 5.005
-version: 0.05
+resources:
+  license: http://dev.perl.org/licenses/
+version: 1.00
diff -Nru libfile-sharedir-perl-0.05/README libfile-sharedir-perl-1.00/README
--- libfile-sharedir-perl-0.05/README	2006-09-04 03:52:56.000000000 +0300
+++ libfile-sharedir-perl-1.00/README	2008-07-17 10:58:40.000000000 +0300
@@ -13,6 +13,9 @@
       # Find a specific file in our dist/module shared dir
       $file = dist_file(  'File-ShareDir',  'file/name.txt');
       $file = module_file('File::ShareDir', 'file/name.txt');
+  
+      # Like module_file, but search up the inheritance tree
+      $file = class_file( 'Foo::Bar', 'file/name.txt' );
 
 DESCRIPTION
     The intent of File::ShareDir is to provide a companion to
@@ -90,7 +93,7 @@
     exception.
 
   dist_dir
-      # Get a distrubition's shared files directory
+      # Get a distribution's shared files directory
       my $dir = dist_dir('My-Distribution');
 
     The "dist_dir" function takes a single parameter of the name of an
@@ -133,7 +136,25 @@
       # Find a file in our module shared dir
       my $dir = module_file('My::Module', 'file/name.txt');
 
-    The "dist_file" function takes two params of the module name and file
+    The "module_file" function takes two params of the module name and file
+    name. It locates the module dir, and then finds the file within it,
+    verifying that the file actually exists, and that it is readable.
+
+    In order to find the directory, the module must be loaded when calling
+    this function.
+
+    The filename should be a relative path in the format of your local
+    filesystem. It will simply added to the directory using File::Spec's
+    "catfile" method.
+
+    Returns the file path as a string, or dies if the file or the dist's
+    directory cannot be located, or the file is not readable.
+
+  class_file
+      # Find a file in our module shared dir, or in our parent class
+      my $dir = class_file('My::Module', 'file/name.txt');
+
+    The "module_file" function takes two params of the module name and file
     name. It locates the module dir, and then finds the file within it,
     verifying that the file actually exists, and that it is readable.
 
@@ -144,6 +165,11 @@
     filesystem. It will simply added to the directory using File::Spec's
     "catfile" method.
 
+    If the file is NOT found for that module, "class_file" will scan up the
+    module's @ISA tree, looking for the file in all of the parent classes.
+
+    This allows you to, in effect, "subclass" shared files.
+
     Returns the file path as a string, or dies if the file or the dist's
     directory cannot be located, or the file is not readable.
 
@@ -152,18 +178,19 @@
 
     <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-ShareDir>
 
-    For other issues, contact the maintainer
+    For other issues, contact the maintainer.
 
 AUTHOR
-    Adam Kennedy <cpan@ali.as>, <http://ali.as/>
+    Adam Kennedy <adamk@cpan.org>
 
 SEE ALSO
     File::HomeDir, Module::Install, Module::Install::Share
 
 COPYRIGHT
-    Copyright (c) 2005, 2006 Adam Kennedy. All rights reserved. This program
-    is free software; you can redistribute it and/or modify it under the
-    same terms as Perl itself.
+    Copyright 2005 - 2008 Adam Kennedy.
+
+    This program is free software; you can redistribute it and/or modify it
+    under the same terms as Perl itself.
 
     The full text of the license can be found in the LICENSE file included
     with this module.
diff -Nru libfile-sharedir-perl-0.05/share/subdir/sample.txt libfile-sharedir-perl-1.00/share/subdir/sample.txt
--- libfile-sharedir-perl-0.05/share/subdir/sample.txt	1970-01-01 02:00:00.000000000 +0200
+++ libfile-sharedir-perl-1.00/share/subdir/sample.txt	2008-07-17 10:58:40.000000000 +0300
@@ -0,0 +1,7 @@
+This is a sample shared file.
+
+You should be able to locate it using the following
+
+  use File::ShareDir ();
+  
+  module_file('File::ShareDir', 'subdir/sample.txt');
diff -Nru libfile-sharedir-perl-0.05/t/01_compile.t libfile-sharedir-perl-1.00/t/01_compile.t
--- libfile-sharedir-perl-0.05/t/01_compile.t	2006-09-04 03:52:56.000000000 +0300
+++ libfile-sharedir-perl-1.00/t/01_compile.t	2008-07-17 10:58:40.000000000 +0300
@@ -1,18 +1,11 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 # Compile-testing for PITA::Report
 
 use strict;
-use lib ();
-use File::Spec::Functions ':ALL';
 BEGIN {
-	$| = 1;
-	unless ( $ENV{HARNESS_ACTIVE} ) {
-		require FindBin;
-		$FindBin::Bin = $FindBin::Bin; # Avoid a warning
-		chdir catdir( $FindBin::Bin, updir() );
-		lib->import('blib', 'lib');
-	}
+	$|  = 1;
+	$^W = 1;
 }
 
 use Test::More tests => 2;
diff -Nru libfile-sharedir-perl-0.05/t/02_main.t libfile-sharedir-perl-1.00/t/02_main.t
--- libfile-sharedir-perl-0.05/t/02_main.t	2006-09-04 03:52:56.000000000 +0300
+++ libfile-sharedir-perl-1.00/t/02_main.t	2008-07-17 10:58:40.000000000 +0300
@@ -1,25 +1,14 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
-# Compile-testing for PITA::Report
+# Compile-testing for File::ShareDir
 
 use strict;
-use lib ();
-use File::Spec::Functions ':ALL';
 BEGIN {
-	$| = 1;
-	unless ( $ENV{HARNESS_ACTIVE} ) {
-		require FindBin;
-		$FindBin::Bin = $FindBin::Bin; # Avoid a warning
-		chdir catdir( $FindBin::Bin, updir() );
-		lib->import(
-			catdir('blib', 'lib'),
-			catdir('blib', 'arch'),
-			'lib',
-			);
-	}
+	$|  = 1;
+	$^W = 1;
 }
 
-use Test::More tests => 25;
+use Test::More tests => 30;
 use File::ShareDir;
 
 sub dies {
@@ -47,7 +36,7 @@
 ok( ! defined &module_dir,  'module_dir not imported by default'  );
 ok( ! defined &dist_file,   'dist_file not imported by default'   );
 ok( ! defined &module_file, 'module_file not imported by default' );
-
+ok( ! defined &class_file,  'class_file not imported by default'  );
 use_ok( 'File::ShareDir', ':ALL' );
 
 # Import as needed
@@ -55,11 +44,15 @@
 ok( defined &module_dir,  'module_dir imported'  );
 ok( defined &dist_file,   'dist_file imported'   );
 ok( defined &module_file, 'module_file imported' );
+ok( defined &class_file,  'class_file imported'  );
 
 # Allow all named functions
-use_ok( 'File::ShareDir',
-	'module_dir', 'module_file', 'dist_dir', 'dist_file',
-	);
+use_ok(
+	'File::ShareDir',
+	'module_dir', 'module_file',
+	'dist_dir', 'dist_file',
+	'class_file',
+);
 
 
 
@@ -89,12 +82,15 @@
 dies( sub { module_dir('') }, 'Null param to module_dir dies' );
 dies( sub { module_dir('File::ShareDir::Bad') }, 'Getting module dir for known non-existanct module dies' );
 
+my $module_file = module_file('File::ShareDir', 'test_file.txt');
+ok( -f $module_file, 'module_file ok' );
+
 
 
 
 
 #####################################################################
-# Distribution Tets
+# Distribution Tests
 
 my $dist_dir = dist_dir('File-ShareDir');
 ok( $dist_dir, 'Can find our own dist dir' );
@@ -108,5 +104,17 @@
 
 # Make sure the directory in dist_dir, matches the one from dist_file
 # Bug found in Module::Install 0.54, fixed in 0.55
-is( catfile($dist_dir, 'sample.txt'), $dist_file,
+is( File::Spec->catfile($dist_dir, 'sample.txt'), $dist_file,
 	'dist_dir and dist_file find the same directory' );
+
+
+
+
+
+#####################################################################
+# Class Tests
+
+use t::lib::ShareDir;
+my $class_file = class_file('t::lib::ShareDir', 'test_file.txt');
+ok( -f $class_file, 'class_file ok' );
+is( $class_file, $module_file, 'class_file matches module_file for subclass' );
diff -Nru libfile-sharedir-perl-0.05/t/97_meta.t libfile-sharedir-perl-1.00/t/97_meta.t
--- libfile-sharedir-perl-0.05/t/97_meta.t	1970-01-01 02:00:00.000000000 +0200
+++ libfile-sharedir-perl-1.00/t/97_meta.t	2008-07-17 10:58:40.000000000 +0300
@@ -0,0 +1,27 @@
+#!/usr/bin/perl
+
+# Test that our META.yml file matches the current specification.
+
+use strict;
+BEGIN {
+	$|  = 1;
+	$^W = 1;
+}
+
+my $MODULE = 'Test::CPAN::Meta 0.12';
+
+# Don't run tests for installs
+use Test::More;
+unless ( $ENV{AUTOMATED_TESTING} or $ENV{RELEASE_TESTING} ) {
+	plan( skip_all => "Author tests not required for installation" );
+}
+
+# Load the testing module
+eval "use $MODULE";
+if ( $@ ) {
+	$ENV{RELEASE_TESTING}
+	? die( "Failed to load required release-testing module $MODULE" )
+	: plan( skip_all => "$MODULE not available for testing" );
+}
+
+meta_yaml_ok();
diff -Nru libfile-sharedir-perl-0.05/t/98_pod.t libfile-sharedir-perl-1.00/t/98_pod.t
--- libfile-sharedir-perl-0.05/t/98_pod.t	1970-01-01 02:00:00.000000000 +0200
+++ libfile-sharedir-perl-1.00/t/98_pod.t	2008-07-17 10:58:40.000000000 +0300
@@ -0,0 +1,32 @@
+#!/usr/bin/perl
+
+# Test that the syntax of our POD documentation is valid
+
+use strict;
+BEGIN {
+	$|  = 1;
+	$^W = 1;
+}
+
+my @MODULES = (
+	'Pod::Simple 3.07',
+	'Test::Pod 1.26',
+);
+
+# Don't run tests for installs
+use Test::More;
+unless ( $ENV{AUTOMATED_TESTING} or $ENV{RELEASE_TESTING} ) {
+	plan( skip_all => "Author tests not required for installation" );
+}
+
+# Load the testing modules
+foreach my $MODULE ( @MODULES ) {
+	eval "use $MODULE";
+	if ( $@ ) {
+		$ENV{RELEASE_TESTING}
+		? die( "Failed to load required release-testing module $MODULE" )
+		: plan( skip_all => "$MODULE not available for testing" );
+	}
+}
+
+all_pod_files_ok();
diff -Nru libfile-sharedir-perl-0.05/t/99_pmv.t libfile-sharedir-perl-1.00/t/99_pmv.t
--- libfile-sharedir-perl-0.05/t/99_pmv.t	1970-01-01 02:00:00.000000000 +0200
+++ libfile-sharedir-perl-1.00/t/99_pmv.t	2008-07-17 10:58:40.000000000 +0300
@@ -0,0 +1,27 @@
+#!/usr/bin/perl
+
+# Test that our declared minimum Perl version matches our syntax
+
+use strict;
+BEGIN {
+	$|  = 1;
+	$^W = 1;
+}
+
+my $MODULE = 'Test::MinimumVersion 0.008';
+
+# Don't run tests for installs
+use Test::More;
+unless ( $ENV{AUTOMATED_TESTING} or $ENV{RELEASE_TESTING} ) {
+	plan( skip_all => "Author tests not required for installation" );
+}
+
+# Load the testing module
+eval "use $MODULE";
+if ( $@ ) {
+	$ENV{RELEASE_TESTING}
+	? die( "Failed to load required release-testing module $MODULE" )
+	: plan( skip_all => "$MODULE not available for testing" );
+}
+
+all_minimum_version_from_metayml_ok();
diff -Nru libfile-sharedir-perl-0.05/t/99_pod.t libfile-sharedir-perl-1.00/t/99_pod.t
--- libfile-sharedir-perl-0.05/t/99_pod.t	2006-09-04 03:52:56.000000000 +0300
+++ libfile-sharedir-perl-1.00/t/99_pod.t	1970-01-01 02:00:00.000000000 +0200
@@ -1,36 +0,0 @@
-use Test::More;
-eval "use Test::Pod 1.00";
-plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
-
-#####################################################################
-# WARNING: INSANE BLACK MAGIC
-#####################################################################
-
-# Hack Pod::Simple::BlackBox to ignore the Test::Inline "=begin has more than one word errors"
-my $begin = \&Pod::Simple::BlackBox::_ponder_begin;
-sub mybegin {
-	my $para = $_[1];
-	my $content = join ' ', splice @$para, 2;
-	$content =~ s/^\s+//s;
-	$content =~ s/\s+$//s;
-	my @words = split /\s+/, $content;
-	if ( $words[0] =~ /^test(?:ing)?\z/s ) {
-		foreach ( 2 .. $#$para ) {
-			$para->[$_] = '';
-		}
-		$para->[2] = $words[0];
-	}
-
-	# Continue as normal
-	push @$para, @words;
-	return &$begin(@_);
-}
-
-local $^W = 0;
-*Pod::Simple::BlackBox::_ponder_begin = \&mybegin;
-
-#####################################################################
-# END BLACK MAGIC
-#####################################################################
-
-all_pod_files_ok();
diff -Nru libfile-sharedir-perl-0.05/t/lib/ShareDir.pm libfile-sharedir-perl-1.00/t/lib/ShareDir.pm
--- libfile-sharedir-perl-0.05/t/lib/ShareDir.pm	1970-01-01 02:00:00.000000000 +0200
+++ libfile-sharedir-perl-1.00/t/lib/ShareDir.pm	2008-07-17 10:58:40.000000000 +0300
@@ -0,0 +1,11 @@
+package t::lib::ShareDir;
+
+use strict;
+
+use vars qw{$VERSION @ISA};
+BEGIN {
+	$VERSION = '1.06';
+	@ISA     = 'File::ShareDir';
+}
+
+1;

Attachment: signature.asc
Description: Digital signature


Reply to: