<commit_before># Copyright: 2001-2005 The Perl Foundation.  All Rights Reserved.
# $Id$

=head1 NAME

config/init/optimize.pm - Optimization

=head1 DESCRIPTION

Enables optimization by adding the appropriate flags for the local
platform to the C<CCFLAGS>.
Should this be part of config/inter/progs.pm ? XXX

=cut

package init::optimize;

use strict;
use vars qw($description $result @args);

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

use Parrot::Configure::Step;

$description="Enabling optimization...";

@args=qw(verbose optimize);

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

    if ($conf->data->get('optimize')) {
        $conf->data->add(' ', ccflags => "-DDISABLE_GC_DEBUG=1 -DNDEBUG");
    } else {
        print "(none requested) " if $conf->options->get('verbose');
    }
}

1;
<commit_msg>change init::optimize to have a result of 'yes'/'no' instead of 'done'<commit_after># Copyright: 2001-2005 The Perl Foundation.  All Rights Reserved.
# $Id$

=head1 NAME

config/init/optimize.pm - Optimization

=head1 DESCRIPTION

Enables optimization by adding the appropriate flags for the local
platform to the C<CCFLAGS>.
Should this be part of config/inter/progs.pm ? XXX

=cut

package init::optimize;

use strict;
use vars qw($description $result @args);

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

use Parrot::Configure::Step;

$description="Enabling optimization...";

@args=qw(verbose optimize);

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

    if ($conf->data->get('optimize')) {
        $result = 'yes';
        $conf->data->add(' ', ccflags => "-DDISABLE_GC_DEBUG=1 -DNDEBUG");
    } else {
        $result = 'no';
        print "(none requested) " if $conf->options->get('verbose');
    }
}

1;

{'fraction_non_alphanumeric': 0.15110851808634773, 'fraction_numerical': 0.014002333722287048, 'mean_word_length': 3.92816091954023, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '6851312', 'n_tokens_mistral': 587, 'n_tokens_neox': 560, 'n_words': 162}