From: Fuji, Goro Date: Wed, 10 Nov 2010 03:54:31 +0000 (+0900) Subject: Display xsubpp settings to make CPAN testers more informative X-Git-Tag: 0.84~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=commitdiff_plain;h=8030a9aa269a35137bacfd5fa0af11b54775fa2a Display xsubpp settings to make CPAN testers more informative --- diff --git a/t/000-load.t b/t/000-load.t index b3132e2..5508bce 100644 --- a/t/000-load.t +++ b/t/000-load.t @@ -9,10 +9,24 @@ require_ok 'Mouse::Role'; no warnings 'uninitialized'; -diag "Testing Mouse/$Mouse::VERSION (", exists $INC{'Mouse/PurePerl.pm'} ? 'Pure Perl' : 'XS', ")"; +my $xs = !exists( $INC{'Mouse/PuprePerl.pm'} ); + +diag "Testing Mouse/$Mouse::VERSION (", $xs ? 'XS' : 'Pure Perl', ")"; diag "Soft dependency versions:"; eval { require Moose }; diag " Class::MOP: $Class::MOP::VERSION"; diag " Moose: $Moose::VERSION"; + +if($xs) { # display info for CPAN testers + if(open my $in, '<', 'Makefile') { + diag 'xsubpp settings:'; + while(<$in>) { + if(/^XSUBPP/) { + diag $_; + } + } + } +} +