<commit_before>#!/usr/bin/env perl

use 5.010;
use utf8;
use strict;
use warnings;

use App::FatPacker ();
use Module::CoreList;

{
    package Packer;
    BEGIN { our @ISA = ('App::FatPacker') }

    sub trace
    {
	my $self = shift;
	my @modules =
	    grep {
		/\.pm$/ && $_ ne 'Config.pm' && do {
		    (my $mod = substr($_, 0, -3)) =~ s{/}{::}gs;
		    ! $Module::CoreList::version{"5.010001"}{$mod}
		}
	    }
	    split /\r?\n/, $self->SUPER::trace(@_);

	#say STDERR $_ for @modules;

	return join("\n", @modules) . "\n"
    }
}



open my $script, '>:raw', 'perlinfo.json.pl';
my $stdout = select $script;
print $script Packer->script_command_pack([ 'bin/perlinfo.json.pl' ]);<commit_msg>build: make a shee-bang! that let /bin/sh search for perl in PATH<commit_after>#!/usr/bin/env perl

use 5.010;
use utf8;
use strict;
use warnings;

use App::FatPacker ();
use Module::CoreList;

{
    package Packer;
    BEGIN { our @ISA = ('App::FatPacker') }

    sub trace
    {
	my $self = shift;
	my @modules =
	    grep {
		/\.pm$/ && $_ ne 'Config.pm' && do {
		    (my $mod = substr($_, 0, -3)) =~ s{/}{::}gs;
		    ! $Module::CoreList::version{"5.010001"}{$mod}
		}
	    }
	    split /\r?\n/, $self->SUPER::trace(@_);

	#say STDERR $_ for @modules;

	return join("\n", @modules) . "\n"
    }
}



open my $script, '>:raw', 'perlinfo.json.pl';
my $stdout = select $script;

# Use /bin/sh as a launcher to be independent of the perl location
print $script <<'EOF';
#!/bin/sh
#! -*- perl -*-
eval 'exec perl -x $0 ${1+"$@"}'
    if 0;
EOF

print $script Packer->script_command_pack([ 'bin/perlinfo.json.pl' ]);
{'fraction_non_alphanumeric': 0.21140731556106634, 'fraction_numerical': 0.019218846869187848, 'mean_word_length': 2.9174757281553396, 'pattern_counts': {'":': 0, '<': 5, '<?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': '27835', 'n_tokens_mistral': 697, 'n_tokens_neox': 633, 'n_words': 163}