<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -12,6 +12,8 @@ Revision history for autodie
         * DOCUMENTATION: The closedir() function is properly
           documented as being included in the :filesys tag.
 
+        * BUILD: Upgrade to Module::Intstall 0.77
+
 1.992 Sun Sep  7 15:51:32 AUSEST 2008
 
         * BUGFIX: unlink(), rename(), chdir() and closedir() functions</diff>
      <filename>Changes</filename>
    </modified>
    <modified>
      <diff>@@ -30,7 +30,7 @@ BEGIN {
 	# 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.75';
+	$VERSION = '0.77';
 
 	*inc::Module::Install::VERSION = *VERSION;
 	@inc::Module::Install::ISA     = __PACKAGE__;
@@ -125,8 +125,10 @@ sub autoload {
 			goto &amp;$code unless $cwd eq $pwd;
 		}
 		$$sym =~ /([^:]+)$/ or die &quot;Cannot autoload $who - $sym&quot;;
-		unshift @_, ( $self, $1 );
-		goto &amp;{$self-&gt;can('call')} unless uc($1) eq $1;
+		unless ( uc($1) eq $1 ) {
+			unshift @_, ( $self, $1 );
+			goto &amp;{$self-&gt;can('call')};
+		}
 	};
 }
 
@@ -339,7 +341,10 @@ sub _write {
 	close FH or die &quot;close($_[0]): $!&quot;;
 }
 
-sub _version {
+# _version is for processing module versions (eg, 1.03_05) not
+# Perl versions (eg, 5.8.1).
+
+sub _version ($) {
 	my $s = shift || 0;
 	   $s =~ s/^(\d+)\.?//;
 	my $l = $1 || 0;
@@ -348,6 +353,17 @@ sub _version {
 	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>
      <filename>inc/Module/Install.pm</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 #line 1
 package Module::Install::Base;
 
-$VERSION = '0.75';
+$VERSION = '0.77';
 
 # Suspend handler for &quot;redefined&quot; warnings
 BEGIN {
@@ -45,6 +45,8 @@ sub admin {
     $_[0]-&gt;_top-&gt;{admin} or Module::Install::Base::FakeAdmin-&gt;new;
 }
 
+#line 101
+
 sub is_admin {
     $_[0]-&gt;admin-&gt;VERSION;
 }
@@ -67,4 +69,4 @@ BEGIN {
 
 1;
 
-#line 138
+#line 146</diff>
      <filename>inc/Module/Install/Base.pm</filename>
    </modified>
    <modified>
      <diff>@@ -11,7 +11,7 @@ use ExtUtils::MakeMaker ();
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.75';
+	$VERSION = '0.77';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
@@ -39,6 +39,7 @@ sub can_run {
 	return $_cmd if (-x $_cmd or $_cmd = MM-&gt;maybe_command($_cmd));
 
 	for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
+		next if $dir eq '';
 		my $abs = File::Spec-&gt;catfile($dir, $_[1]);
 		return $abs if (-x $abs or $abs = MM-&gt;maybe_command($abs));
 	}
@@ -79,4 +80,4 @@ if ( $^O eq 'cygwin' ) {
 
 __END__
 
-#line 157
+#line 158</diff>
      <filename>inc/Module/Install/Can.pm</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ use Module::Install::Base;
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.75';
+	$VERSION = '0.77';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }</diff>
      <filename>inc/Module/Install/Fetch.pm</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,7 @@ use ExtUtils::MakeMaker ();
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.75';
+	$VERSION = '0.77';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
@@ -36,9 +36,9 @@ sub prompt {
 
 sub makemaker_args {
 	my $self = shift;
-	my $args = ($self-&gt;{makemaker_args} ||= {});
-	  %$args = ( %$args, @_ ) if @_;
-	$args;
+	my $args = ( $self-&gt;{makemaker_args} ||= {} );
+	%$args = ( %$args, @_ );
+	return $args;
 }
 
 # For mm args that take multiple space-seperated args,
@@ -116,7 +116,13 @@ sub write {
 
 	# Make sure we have a new enough
 	require ExtUtils::MakeMaker;
-	$self-&gt;configure_requires( 'ExtUtils::MakeMaker' =&gt; $ExtUtils::MakeMaker::VERSION );
+
+	# 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-&gt;configure_requires( 'ExtUtils::MakeMaker' =&gt; $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
 
 	# Generate the 
 	my $args = $self-&gt;makemaker_args;
@@ -175,7 +181,9 @@ sub write {
 
 	my $user_preop = delete $args{dist}-&gt;{PREOP};
 	if (my $preop = $self-&gt;admin-&gt;preop($user_preop)) {
-		$args{dist} = $preop;
+		foreach my $key ( keys %$preop ) {
+			$args{dist}-&gt;{$key} = $preop-&gt;{$key};
+		}
 	}
 
 	my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
@@ -242,4 +250,4 @@ sub postamble {
 
 __END__
 
-#line 371
+#line 379</diff>
      <filename>inc/Module/Install/Makefile.pm</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ use Module::Install::Base;
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.75';
+	$VERSION = '0.77';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
@@ -17,9 +17,7 @@ my @scalar_keys = qw{
 	abstract
 	author
 	version
-	license
 	distribution_type
-	perl_version
 	tests
 	installdirs
 };
@@ -33,11 +31,18 @@ my @tuple_keys = qw{
 	resources
 };
 
-sub Meta            { shift        }
-sub Meta_ScalarKeys { @scalar_keys }
-sub Meta_TupleKeys  { @tuple_keys  }
+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) {
+foreach my $key ( @scalar_keys ) {
 	*$key = sub {
 		my $self = shift;
 		return $self-&gt;{values}{$key} if defined wantarray and !@_;
@@ -46,12 +51,30 @@ foreach my $key (@scalar_keys) {
 	};
 }
 
+foreach my $key ( @resource_keys ) {
+	*$key = sub {
+		my $self = shift;
+		unless ( @_ ) {
+			return () unless $self-&gt;{values}{resources};
+			return map  { $_-&gt;[1] }
+			       grep { $_-&gt;[0] eq $key }
+			       @{ $self-&gt;{values}{resources} };
+		}
+		return $self-&gt;{values}{resources}{$key} unless @_;
+		my $uri = shift or die(
+			&quot;Did not provide a value to $key()&quot;
+		);
+		$self-&gt;resources( $key =&gt; $uri );
+		return 1;
+	};
+}
+
 sub requires {
 	my $self = shift;
 	while ( @_ ) {
 		my $module  = shift or last;
 		my $version = shift || 0;
-		push @{ $self-&gt;{values}-&gt;{requires} }, [ $module, $version ];
+		push @{ $self-&gt;{values}{requires} }, [ $module, $version ];
 	}
 	$self-&gt;{values}{requires};
 }
@@ -61,7 +84,7 @@ sub build_requires {
 	while ( @_ ) {
 		my $module  = shift or last;
 		my $version = shift || 0;
-		push @{ $self-&gt;{values}-&gt;{build_requires} }, [ $module, $version ];
+		push @{ $self-&gt;{values}{build_requires} }, [ $module, $version ];
 	}
 	$self-&gt;{values}{build_requires};
 }
@@ -71,9 +94,9 @@ sub configure_requires {
 	while ( @_ ) {
 		my $module  = shift or last;
 		my $version = shift || 0;
-		push @{ $self-&gt;{values}-&gt;{configure_requires} }, [ $module, $version ];
+		push @{ $self-&gt;{values}{configure_requires} }, [ $module, $version ];
 	}
-	$self-&gt;{values}-&gt;{configure_requires};
+	$self-&gt;{values}{configure_requires};
 }
 
 sub recommends {
@@ -81,9 +104,9 @@ sub recommends {
 	while ( @_ ) {
 		my $module  = shift or last;
 		my $version = shift || 0;
-		push @{ $self-&gt;{values}-&gt;{recommends} }, [ $module, $version ];
+		push @{ $self-&gt;{values}{recommends} }, [ $module, $version ];
 	}
-	$self-&gt;{values}-&gt;{recommends};
+	$self-&gt;{values}{recommends};
 }
 
 sub bundles {
@@ -91,26 +114,31 @@ sub bundles {
 	while ( @_ ) {
 		my $module  = shift or last;
 		my $version = shift || 0;
-		push @{ $self-&gt;{values}-&gt;{bundles} }, [ $module, $version ];
+		push @{ $self-&gt;{values}{bundles} }, [ $module, $version ];
 	}
-	$self-&gt;{values}-&gt;{bundles};
+	$self-&gt;{values}{bundles};
 }
 
 # Resource handling
+my %lc_resource = map { $_ =&gt; 1 } qw{
+	homepage
+	license
+	bugtracker
+	repository
+};
+
 sub resources {
 	my $self = shift;
 	while ( @_ ) {
-		my $resource = shift or last;
-		my $value    = shift or next;
-		push @{ $self-&gt;{values}-&gt;{resources} }, [ $resource, $value ];
+		my $name  = shift or last;
+		my $value = shift or next;
+		if ( $name eq lc $name and ! $lc_resource{$name} ) {
+			die(&quot;Unsupported reserved lowercase resource '$name'&quot;);
+		}
+		$self-&gt;{values}{resources} ||= [];
+		push @{ $self-&gt;{values}{resources} }, [ $name, $value ];
 	}
-	$self-&gt;{values}-&gt;{resources};
-}
-
-sub repository {
-	my $self = shift;
-	$self-&gt;resources( repository =&gt; shift );
-	return 1;
+	$self-&gt;{values}{resources};
 }
 
 # Aliases for build_requires that will have alternative
@@ -126,30 +154,73 @@ sub install_as_vendor  { $_[0]-&gt;installdirs('vendor') }
 
 sub sign {
 	my $self = shift;
-	return $self-&gt;{'values'}{'sign'} if defined wantarray and ! @_;
-	$self-&gt;{'values'}{'sign'} = ( @_ ? $_[0] : 1 );
+	return $self-&gt;{values}{sign} if defined wantarray and ! @_;
+	$self-&gt;{values}{sign} = ( @_ ? $_[0] : 1 );
 	return $self;
 }
 
 sub dynamic_config {
 	my $self = shift;
 	unless ( @_ ) {
-		warn &quot;You MUST provide an explicit true/false value to dynamic_config, skipping\n&quot;;
+		warn &quot;You MUST provide an explicit true/false value to dynamic_config\n&quot;;
 		return $self;
 	}
 	$self-&gt;{values}{dynamic_config} = $_[0] ? 1 : 0;
-	return $self;
+	return 1;
+}
+
+sub perl_version {
+	my $self = shift;
+	return $self-&gt;{values}{perl_version} unless @_;
+	my $version = shift or die(
+		&quot;Did not provide a value to perl_version()&quot;
+	);
+
+	# Convert triple-part versions (eg, 5.6.1 or 5.8.9) to
+	# numbers (eg, 5.006001 or 5.008009).
+
+	$version =~ s/^(\d+)\.(\d+)\.(\d+)$/sprintf(&quot;%d.%03d%03d&quot;,$1,$2,$3)/e;
+
+	$version =~ s/_.+$//;
+	$version = $version + 0; # Numify
+	unless ( $version &gt;= 5.005 ) {
+		die &quot;Module::Install only supports 5.005 or newer (use ExtUtils::MakeMaker)\n&quot;;
+	}
+	$self-&gt;{values}{perl_version} = $version;
+	return 1;
+}
+
+sub license {
+	my $self = shift;
+	return $self-&gt;{values}{license} unless @_;
+	my $license = shift or die(
+		'Did not provide a value to license()'
+	);
+	$self-&gt;{values}{license} = $license;
+
+	# Automatically fill in license URLs
+	if ( $license eq 'perl' ) {
+		$self-&gt;resources( license =&gt; 'http://dev.perl.org/licenses/' );
+	}
+
+	return 1;
 }
 
 sub all_from {
 	my ( $self, $file ) = @_;
 
 	unless ( defined($file) ) {
-		my $name = $self-&gt;name
-			or die &quot;all_from called with no args without setting name() first&quot;;
+		my $name = $self-&gt;name or die(
+			&quot;all_from called with no args without setting name() first&quot;
+		);
 		$file = join('/', 'lib', split(/-/, $name)) . '.pm';
 		$file =~ s{.*/}{} unless -e $file;
-		die &quot;all_from: cannot find $file from $name&quot; unless -e $file;
+		unless ( -e $file ) {
+			die(&quot;all_from cannot find $file from $name&quot;);
+		}
+	}
+	unless ( -f $file ) {
+		die(&quot;The path '$file' does not exist, or is not a file&quot;);
 	}
 
 	# Some methods pull from POD instead of code.
@@ -228,8 +299,8 @@ sub features {
 	while ( my ( $name, $mods ) = splice( @_, 0, 2 ) ) {
 		$self-&gt;feature( $name, @$mods );
 	}
-	return $self-&gt;{values}-&gt;{features}
-		? @{ $self-&gt;{values}-&gt;{features} }
+	return $self-&gt;{values}{features}
+		? @{ $self-&gt;{values}{features} }
 		: ();
 }
 
@@ -303,7 +374,7 @@ sub name_from {
 			$self-&gt;module_name($module_name);
 		}
 	} else {
-		die &quot;Cannot determine name from $file\n&quot;;
+		die(&quot;Cannot determine name from $file\n&quot;);
 	}
 }
 
@@ -362,8 +433,12 @@ sub license_from {
 		my $license_text = $1;
 		my @phrases      = (
 			'under the same (?:terms|license) as perl itself' =&gt; 'perl',        1,
+			'GNU general public license'                      =&gt; 'gpl',         1,
 			'GNU public license'                              =&gt; 'gpl',         1,
+			'GNU lesser general public license'               =&gt; 'lgpl',        1,
 			'GNU lesser public license'                       =&gt; 'lgpl',        1,
+			'GNU library general public license'              =&gt; 'lgpl',        1,
+			'GNU library public license'                      =&gt; 'lgpl',        1,
 			'BSD license'                                     =&gt; 'bsd',         1,
 			'Artistic license'                                =&gt; 'artistic',    1,
 			'GPL'                                             =&gt; 'gpl',         1,
@@ -389,6 +464,24 @@ sub license_from {
 	return 'unknown';
 }
 
+sub bugtracker_from {
+	my $self    = shift;
+	my $content = Module::Install::_read($_[0]);
+	my @links   = $content =~ m/L\&lt;(http\:\/\/rt\.cpan\.org\/[^&gt;]+)\&gt;/g;
+	unless ( @links ) {
+		warn &quot;Cannot determine bugtracker info from $_[0]\n&quot;;
+		return 0;
+	}
+	if ( @links &gt; 1 ) {
+		warn &quot;Found more than on rt.cpan.org link in $_[0]\n&quot;;
+		return 0;
+	}
+
+	# Set the bugtracker
+	bugtracker( $links[0] );
+	return 1;
+}
+
 sub install_script {
 	my $self = shift;
 	my $args = $self-&gt;makemaker_args;
@@ -399,7 +492,7 @@ sub install_script {
 		} elsif ( -d 'script' and -f &quot;script/$_&quot; ) {
 			push @$exe, &quot;script/$_&quot;;
 		} else {
-			die &quot;Cannot find script '$_'&quot;;
+			die(&quot;Cannot find script '$_'&quot;);
 		}
 	}
 }</diff>
      <filename>inc/Module/Install/Metadata.pm</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ use Module::Install::Base;
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.75';
+	$VERSION = '0.77';
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }</diff>
      <filename>inc/Module/Install/Win32.pm</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ use Module::Install::Base;
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.75';
+	$VERSION = '0.77';
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }</diff>
      <filename>inc/Module/Install/WriteAll.pm</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3fbd1c9a99c654d00f340c9c48d91acad28c5ce0</id>
    </parent>
  </parents>
  <author>
    <name>Paul Fenwick</name>
    <email>pjf@perltraining.com.au</email>
  </author>
  <url>http://github.com/pfenwick/autodie/commit/48b815fb631d205e9870b505081e96ae4611b387</url>
  <id>48b815fb631d205e9870b505081e96ae4611b387</id>
  <committed-date>2008-09-13T17:45:56-07:00</committed-date>
  <authored-date>2008-09-13T17:45:56-07:00</authored-date>
  <message>Upgrade to Module::Install 0.77</message>
  <tree>249a3f8796408095ca8799502ce2ac77fb894c32</tree>
  <committer>
    <name>Paul Fenwick</name>
    <email>pjf@perltraining.com.au</email>
  </committer>
</commit>
