Skip Menu |

This queue is for tickets about the MooseX-Getopt CPAN distribution.

Report information
The Basics
Id: 44909
Status: resolved
Priority: 0/
Queue: MooseX-Getopt

People
Owner: Nobody in particular
Requestors: taro.nishino [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 0.17
  • 0.18
Fixed in: (no value)



Hi, Ricardo, As you know, 008_configfromfile.t failed under MSWin32. Could you apply the following patch? --- 008_configfromfile.t.orig Fri Apr 10 05:36:34 2009 +++ 008_configfromfile.t Fri Apr 10 05:42:25 2009 @@ -5,6 +5,7 @@ use Test::Exception; use Test::More; +use File::Spec; if ( !eval { require MooseX::ConfigFromFile } ) { @@ -55,7 +56,8 @@ optional_from_config => 'from_config_2', ); - if ( $file ne '/notused/default' ) { + my $cpath = File::Spec->canonpath('/notused/default'); + if ( $file ne $cpath ) { $config{config_from_override} = 1; } @@ -70,7 +72,7 @@ extends 'App'; has '+configfile' => ( - default => '/notused/default', + default => File::Spec->canonpath('/notused/default'), ); } @@ -88,7 +90,7 @@ ok( !$app->config_from_override, '... config_from_override false as expected' ); - is( $app->configfile, '/notused/default', + is( $app->configfile, File::Spec->canonpath('/notused/default'), '... configfile is /notused/default as expected' ); } } @@ -111,7 +113,7 @@ ok( $app->config_from_override, '... config_from_override true as expected' ); - is( $app->configfile, '/notused', + is( $app->configfile, File::Spec->canonpath('/notused'), '... configfile is /notused as expected' ); } } After applying this patch, 008_configfromfile.t passes as follows: C:\temp\MooseX-Getopt-0.18>prove -v t/008_configfromfile.t t/008_configfromfile.t .. 1..25 ok 1 - threw Regexp ((?-xism:Required option missing: required_from_config)) ok 2 - The object isa App::DefaultConfigFile ok 3 - ... required_from_config is from_config_1 as expected ok 4 - ... optional_from_config is from_config_2 as expected ok 5 - ... required_from_argv is 1 as expected ok 6 - ... config_from_override false as expected ok 7 - ... configfile is /notused/default as expected ok 8 - The object isa App ok 9 - ... required_from_config is from_config_1 as expected ok 10 - ... optional_from_config is from_config_2 as expected ok 11 - ... required_from_argv is 1 as expected ok 12 - The object isa App::DefaultConfigFile ok 13 - ... required_from_config is from_config_1 as expected ok 14 - ... optional_from_config is from_config_2 as expected ok 15 - ... required_from_argv is 1 as expected ok 16 - ... config_from_override true as expected ok 17 - ... configfile is /notused as expected ok 18 - threw Regexp ((?-xism:Required option missing: required_from_argv)) ok 19 - The object isa App ok 20 - ... required_from_config is override as expected ok 21 - ... optional_from_config is from_config_2 as expected ok 22 - The object isa App ok 23 - ... required_from_config is noconfig as expected ok 24 - ... optional_from_config is undef as expected ok 25 - Can create DerivedApp ok All tests successful. Files=1, Tests=25, 4 wallclock secs ( 0.08 usr + 0.05 sys = 0.12 CPU) Result: PASS Best regards, Taro Nishino
Committed as d1e5e425, thanks.