<commit_before>#!perl -T

use strict;
use warnings;
use lib 't';

use File::Temp;
use Test::More;
use Util;
use POSIX ();

local $SIG{'ALRM'} = sub {
    fail 'Timeout';
    exit;
};

prep_environment();

my $tempdir = File::Temp->newdir;
mkdir "$tempdir/foo";
my $rc = eval { POSIX::mkfifo( "$tempdir/foo/test.pipe", oct(660) ) };
if ( !$rc ) {
    dir_cleanup( $tempdir );
    plan skip_all => $@ ? $@ : q{I can't run a mkfifo, so cannot run this test.};
}

plan tests => 2;

touch( "$tempdir/foo/bar.txt" );

alarm 5; # Should be plenty of time.

my @results = run_ack( '-f', $tempdir );

is_deeply( \@results, [
    "$tempdir/foo/bar.txt",
], 'Acking should not find the fifo' );

dir_cleanup( $tempdir );

done_testing();

exit 0;

sub dir_cleanup {
    my $tempdir = shift;

    unlink "$tempdir/foo/bar.txt";
    rmdir "$tempdir/foo";
    rmdir $tempdir;

    return;
}<commit_msg>More scoping for hiding shadow variables<commit_after>#!perl -T

use strict;
use warnings;
use lib 't';

use File::Temp;
use Test::More;
use Util;
use POSIX ();

MAIN: {
    local $SIG{'ALRM'} = sub {
        fail 'Timeout';
        exit;
    };

    prep_environment();

    my $tempdir = File::Temp->newdir;
    mkdir "$tempdir/foo";
    my $rc = eval { POSIX::mkfifo( "$tempdir/foo/test.pipe", oct(660) ) };
    if ( !$rc ) {
        dir_cleanup( $tempdir );
        plan skip_all => $@ ? $@ : q{I can't run a mkfifo, so cannot run this test.};
    }

    plan tests => 2;

    touch( "$tempdir/foo/bar.txt" );

    alarm 5; # Should be plenty of time.

    my @results = run_ack( '-f', $tempdir );

    is_deeply( \@results, [
        "$tempdir/foo/bar.txt",
    ], 'Acking should not find the fifo' );

    dir_cleanup( $tempdir );

    done_testing();
}

exit 0;

sub dir_cleanup {
    my $tempdir = shift;

    unlink "$tempdir/foo/bar.txt";
    rmdir "$tempdir/foo";
    rmdir $tempdir;

    return;
}
{'fraction_non_alphanumeric': 0.1723774380600949, 'fraction_numerical': 0.0063257775434897206, 'mean_word_length': 2.849898580121704, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4177582', 'n_tokens_mistral': 753, 'n_tokens_neox': 712, 'n_words': 196}