Index: t/steps/auto/format-01.t =================================================================== --- t/steps/auto/format-01.t (.../trunk) (revision 42352) +++ t/steps/auto/format-01.t (.../branches/auto_format_no_Config) (revision 42353) @@ -5,9 +5,10 @@ use strict; use warnings; -use Test::More tests => 16; +use Test::More tests => 21; use Carp; use lib qw( lib t/configure/testlib ); +use_ok('config::init::defaults'); use_ok('config::auto::format'); use Parrot::BuildUtil; use Parrot::Configure; @@ -26,6 +27,8 @@ my $conf = Parrot::Configure->new(); +test_step_thru_runstep( $conf, q{init::defaults}, $args ); + my ($task, $step_name, $step, $ret); my $pkg = q{auto::format}; @@ -97,15 +100,14 @@ ); } { - use Config; - my $p5format = '%.15' . $Config{sPRIgldbl}; + my $p5format = '%.15' . $conf->data->get_p5('sPRIgldbl'); $p5format =~ s/"//g;; # Perl 5's Config value has embedded double quotes $conf->data->set( nv => 'long double' ); auto::format::_set_floatvalfmt_nvsize($conf); is($conf->data->get( 'floatvalfmt' ), $p5format, - "floatvalfmt set as expected"); + "floatvalfmt set as expected: nv long double"); is($conf->data->get( 'nvsize' ), $conf->data->get( 'hugefloatvalsize' ), - "nvsize set as expected"); + "nvsize set as expected: nv long double"); $conf->data->set( nv => undef, floatvalfmt => undef, Index: config/init/defaults.pm =================================================================== --- config/init/defaults.pm (.../trunk) (revision 42352) +++ config/init/defaults.pm (.../branches/auto_format_no_Config) (revision 42353) @@ -59,6 +59,7 @@ sig_name scriptdirexp use64bitint + sPRIgldbl | ) { $conf->data->set_p5( $orig => $Config{$orig} ); } Index: config/auto/format.pm =================================================================== --- config/auto/format.pm (.../trunk) (revision 42352) +++ config/auto/format.pm (.../branches/auto_format_no_Config) (revision 42353) @@ -15,7 +15,6 @@ use strict; use warnings; -use Config; # for long double printf format use base qw(Parrot::Configure::Step); @@ -75,8 +74,9 @@ # Stay way from long double for now (it may be 64 or 80 bits) # die "long double not supported at this time, use double."; $nvsize = $ldsize; - if (defined($Config{'sPRIgldbl'})) { - $nvformat = "%.15" . $Config{'sPRIgldbl'}; + my $spri = $conf->data->get_p5('sPRIgldbl'); + if ( defined $spri ) { + $nvformat = "%.15" . $spri; $nvformat =~ s/"//g; # Perl 5's Config value has embedded double quotes } else {