Tagging trunk at r29566 so that the revisionpm can later be synched to it.
[parrot.git] / config / inter / types.pm
blob461219f57aa25a4bf5769476ee55c8c4ff0bd314
1 # Copyright (C) 2001-2003, The Perl Foundation.
2 # $Id$
4 =head1 NAME
6 config/inter/types.pm - Sizes for Parrot Types
8 =head1 DESCRIPTION
10 Asks the user which size integer, floating-point number and opcode types should
11 be.
13 =cut
15 package inter::types;
17 use strict;
18 use warnings;
20 use base qw(Parrot::Configure::Step);
22 use Parrot::Configure::Utils ':inter';
25 sub _init {
26 my $self = shift;
27 my %data;
28 $data{description} = q{Determining what types Parrot should use};
29 $data{result} = q{};
30 return \%data;
33 sub runstep {
34 my ( $self, $conf ) = @_;
36 my $intval = $conf->options->get('intval') || 'long';
37 my $floatval = $conf->options->get('floatval') || 'double';
38 my $opcode = $conf->options->get('opcode') || 'long';
40 if ( $conf->options->get('ask') ) {
41 $intval = prompt( "\n\nHow big would you like your integers to be?", $intval );
42 $floatval = prompt( "And your floats?", $floatval );
43 $opcode = prompt( "What's your native opcode type?", $opcode );
44 print "\n";
47 $conf->data->set(
48 iv => $intval,
49 nv => $floatval,
50 opcode_t => $opcode
53 return 1;
58 # Local Variables:
59 # mode: cperl
60 # cperl-indent-level: 4
61 # fill-column: 100
62 # End:
63 # vim: expandtab shiftwidth=4: