Alien-MeCab

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

# Ask if we want to download the source.
my $sourcefile = $RUNNING_IN_HELL ? $MECAB_EXE : $MECAB_SOURCE;
if (! -f $sourcefile) {
    my $yn = prompt("mecab source file $sourcefile does not exist. Download it now?", "y");
    if ($yn =~ /^y(?:es)?$/i) {
        my @cmd = ($^X, File::Spec->catfile("src", "fetchsrc.pl"), "--version", $MECAB_VERSION);
        system(@cmd);
    }
}

# If the source hasn't been expanded, then unpack it
if ($^O ne 'MSWin32') {
    if (! -d $MECAB_SOURCE_DIR) {
        my $yn = prompt("Mecab source directory has not been unpacked yet. Unpack it now?", "y");
        if ($yn =~ /^y(?:es)?$/i) {
            eval {
                require Archive::Tar;
                Archive::Tar->can_handle_compressed_files or die "No compression support :(";
            };
            if ($@) {
                print STDERR "Archive extraction requires Archive::Tar (with IO::Zlib)\n";



( run in 0.435 second using v1.01-cache-2.11-cpan-5b529ec07f3 )