it is the disc-extern:perl5:5.6.1b3:MacPerl ƒ:Droplets:installme droplet
in MacPerl

#!perl -w
#-----------------------------------------------------------------#
#  installme.plx
#  http://pudge.net/
#
#  Created:       Chris Nandor ([EMAIL PROTECTED])       24 Jan 1999
#  Last Modified: Chris Nandor ([EMAIL PROTECTED])       28 Jul 1999
#-----------------------------------------------------------------#
# This script installs distributions.  It will unpack and install
# .tar.gz or .tgz archives if they are dropped on it, or install
# the contents of a folder.
#
# Edit $verbose and $switch variables to customize for verbosity
# and conversion behavior.
#-----------------------------------------------------------------#
use Archive::Tar;
use File::Basename;
use Mac::Conversions ();
use Mac::BuildTools ();
use strict;
local $| = 1;

my $verbose = 1;
my $re = '\.t(ar\.)?gz$';

my $archive = my $dir = $ARGV[0];

if ($archive =~ /$re/) {
    my $switch = MacPerl::Answer(
        'Convert all text and MacBinary files?', 'Yes', 'No');
    my $conv = Mac::Conversions->new(Remove=>1);

    my $tar = Archive::Tar->new($archive, 1) or die $!;
    chdir(dirname($archive)) or die "Can't chdir: $!";

    my @files = $tar->list_files;

    foreach my $file (@files) {
        my $dir = ':' . dirname(Archive::Tar::_munge_file($file));
        die "$dir already exists, will not overwrite\n"
            if -e $dir;
    }

    print "Unpacking archive ...\n";
    $tar->extract(@files);

    print "Converting files ...\n";
    Mac::BuildTools::convert_files(\@files, $verbose) if $switch;

    $dir =~ s/$re//;
}

chdir $dir or die "Can't chdir $dir: $!\n";
Mac::BuildTools::make({});
Mac::BuildTools::make_install({});

print "Done.\n";

__END__



when I have dropped MHonArc2.5.2.tar.gz on
disc-extern:perl5:5.6.1b3:MacPerl ƒ:Droplets:installme droplet, the
answer is following:

# Can't locate Archive/Tar.pm in @INC.
File 'disc-extern:perl5:5.6.1b3:MacPerl ƒ:Droplets:installme'; Line 16
# BEGIN failed--compilation aborted.
File 'disc-extern:perl5:5.6.1b3:MacPerl ƒ:Droplets:installme'; Line 16


thank for your help,

Reply via email to