--- Makefile.PL.old 2005-11-05 04:32:33.000000000 +0900 +++ Makefile.PL 2005-11-05 05:07:38.000000000 +0900 @@ -11,12 +11,16 @@ my %args = ( pkg_name => 'eidetic', name => 'eidetic', - DESTDIR => undef, ); my @pass_args; +my $destdir; + while (my $arg = shift @ARGV) { my ($key, $value) = split /=/, $arg; + if ($key eq "DESTDIR" ) { + $destdir = $value; + } if (exists $args{$key}) { $args{$key} = $value; } else { @@ -108,7 +112,6 @@ sub MY::postamble { my $self = shift; my $text = ''; - my $etcdir = ''; $text .= "RSYNC = rsync\n"; $text .= "CHOWN = chown\n\n"; @@ -126,7 +129,6 @@ EOM } - my $destdir = $args{DESTDIR} || rootdir(); my $prefix = $self->{PREFIX}; if ($prefix !~ /^$destdir/) { @@ -134,7 +136,7 @@ } my $real_etcdir = catdir( rootdir(), 'etc', $args{pkg_name} ); - $etcdir = catdir( $destdir, 'etc', $args{pkg_name} ); + my $etcdir = catdir( $destdir, 'etc', $args{pkg_name} ); my $etcfiles = catfile( "etc", "$args{name}.conf" ); $text .= install_clause($etcfiles, $etcdir, 0);