<commit_before># Copyright (C) 2001-2007, Parrot Foundation.
# $Id$

=head1 NAME

config/init/defaults.pm - Configuration Defaults

=head1 DESCRIPTION

Sets up the configuration system's default values and data structures.

=cut

package init::defaults;

use strict;
use warnings;

use base qw(Parrot::Configure::Step);

use Config;
use FindBin;    # see build_dir
use Parrot::BuildUtil;
use Parrot::Configure::Step;
use Parrot::Harness::DefaultTests ();
use Cwd qw(abs_path);
use File::Spec;


sub _init {
    my $self = shift;
    my %data;
    $data{description} = q{Set Configure's default values};
    $data{result}      = q{};
    return \%data;
}

my $parrot_version = Parrot::BuildUtil::parrot_version();
my @parrot_version = Parrot::BuildUtil::parrot_version();

sub runstep {
    my ( $self, $conf ) = @_;

    # Later configuration steps need access to values from the Perl 5
    # %Config.  However, other later configuration steps may change
    # the corresponding values in the Parrot::Configure object.  In
    # order to provide access to the original values from Perl 5
    # %Config, we grab those settings we need now and store them in
    # special keys within the Parrot::Configure object.
    # This is a multi-stage process.

    # Stage 1:
    foreach my $orig ( qw|
        longsize
        use64bitint
    | ) {
        $conf->data->set_p5( $orig => $Config{$orig} );
    }

    # Stage 2 (anticipating needs of config/auto/headers.pm):
    $conf->data->set_p5(
        map { $_ => $Config{$_} } grep { /^i_/ } keys %Config
    );

    # Stage 3 (Along similar lines, look up values from Perl 5 special
    # variables and stash them for later lookups.  Name them according
    # to their 'use English' names as documented in 'perlvar'.)
    $conf->data->set_p5( OSNAME => $^O );

    # configtests branch:  We start to handle these things differently.
    foreach my $orig ( qw|
        archname
        ccflags
        d_socklen_t
        optimize
        scriptdirexp
        sig_name
        sPRIgldbl
    | ) {
        $conf->data->set( qq|${orig}_provisional| => $Config{$orig} );
    }

    $conf->data->set(
#        map { qq|${_}_provisional| => $Config{$_} } grep { /^i_/ } keys %Config
        map { $_ . q{_provisional} => $Config{$_} } grep { /^i_/ } keys %Config
    );
    $conf->data->set( OSNAME_provisional => $^O );

    my $ccdlflags = $Config{ccdlflags};
    $ccdlflags =~ s/\s*-Wl,-rpath,\S*//g if $conf->options->get('disable-rpath');<commit_msg>Comment out all set_p5 calls.<commit_after># Copyright (C) 2001-2007, Parrot Foundation.
# $Id$

=head1 NAME

config/init/defaults.pm - Configuration Defaults

=head1 DESCRIPTION

Sets up the configuration system's default values and data structures.

=cut

package init::defaults;

use strict;
use warnings;

use base qw(Parrot::Configure::Step);

use Config;
use FindBin;    # see build_dir
use Parrot::BuildUtil;
use Parrot::Configure::Step;
use Parrot::Harness::DefaultTests ();
use Cwd qw(abs_path);
use File::Spec;


sub _init {
    my $self = shift;
    my %data;
    $data{description} = q{Set Configure's default values};
    $data{result}      = q{};
    return \%data;
}

my $parrot_version = Parrot::BuildUtil::parrot_version();
my @parrot_version = Parrot::BuildUtil::parrot_version();

sub runstep {
    my ( $self, $conf ) = @_;

    # Later configuration steps need access to values from the Perl 5
    # %Config.  However, other later configuration steps may change
    # the corresponding values in the Parrot::Configure object.  In
    # order to provide access to the original values from Perl 5
    # %Config, we grab those settings we need now and store them in
    # special keys within the Parrot::Configure object.
    # This is a multi-stage process.

#    # Stage 1:
#    foreach my $orig ( qw|
#        longsize
#    | ) {
#        $conf->data->set_p5( $orig => $Config{$orig} );
#    }
#
#    # Stage 2 (anticipating needs of config/auto/headers.pm):
#    $conf->data->set_p5(
#        map { $_ => $Config{$_} } grep { /^i_/ } keys %Config
#    );
#
#    # Stage 3 (Along similar lines, look up values from Perl 5 special
#    # variables and stash them for later lookups.  Name them according
#    # to their 'use English' names as documented in 'perlvar'.)
#    $conf->data->set_p5( OSNAME => $^O );

    # Later configuration steps need access to values from the Perl 5
    # %Config.  However, other later configuration steps may change
    # the corresponding values in the Parrot::Configure object.  In
    # order to provide access to the original values from Perl 5
    # %Config, we grab those settings we need now and store them in
    # special keys within the Parrot::Configure object.  We label these keys
    # '_provisional' to alert users that these should only be used during
    # configuration and testing of configuration steps.  They should not be
    # used during Parrot's build, nor should they be used in 'make test'.
    #
    # This is a multi-stage process.

    # Stage 1:
    foreach my $orig ( qw|
        archname
        ccflags
        d_socklen_t
        optimize
        scriptdirexp
        sig_name
        sPRIgldbl
    | ) {
        $conf->data->set( qq|${orig}_provisional| => $Config{$orig} );
    }

    # Stage 2 (anticipating needs of config/auto/headers.pm):
    $conf->data->set(
        map { $_ . q{_provisional} => $Config{$_} } grep { /^i_/ } keys %Config
    );

    # Stage 3 (Along similar lines, look up values from Perl 5 special
    # variables and stash them for later lookups.  Name them according
    # to their 'use English' names as documented in 'perlvar'.)
    $conf->data->set( OSNAME_provisional => $^O );

    my $ccdlflags = $Config{ccdlflags};
    $ccdlflags =~ s/\s*-Wl,-rpath,\S*//g if $conf->options->get('disable-rpath');
{'fraction_non_alphanumeric': 0.11978003093315003, 'fraction_numerical': 0.00807698917339749, 'mean_word_length': 2.9618788291354665, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 44, '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': '6238225', 'n_tokens_mistral': 1905, 'n_tokens_neox': 1819, 'n_words': 613}