From: Dave Rolsky Date: Mon, 7 Dec 2009 17:00:48 +0000 (-0600) Subject: fix t/082_get_code_info.t for bleadperl X-Git-Tag: 0.96~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6bb3669a84ccc4e5e984238258c4bcd0868fe137;p=gitmo%2FClass-MOP.git fix t/082_get_code_info.t for bleadperl --- diff --git a/Changes b/Changes index 981c3e0..bdc9973 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Revision history for Perl extension Class-MOP. +0.96 + * tests + - Fixed t/082_get_code_info.t so it passes with bleadperl. + 0.95 Wed, Nov 19, 2009 * Class::MOP - Make is_class_loaded without any arguments fail loudly diff --git a/t/082_get_code_info.t b/t/082_get_code_info.t index afc17fb..604a1fd 100644 --- a/t/082_get_code_info.t +++ b/t/082_get_code_info.t @@ -36,7 +36,13 @@ code_name_is( \&Class::MOP::Method::name, "Class::MOP::Method", "name" ); sub MODIFY_CODE_ATTRIBUTES { my ($class, $code) = @_; my @info = Class::MOP::get_code_info($code); - ::is_deeply(\@info, [], "no name for a coderef that's still compiling"); + + if ( $] >= 5.011 ) { + ::is_deeply(\@info, ['Foo', 'foo'], "got a name for a code ref in an attr handler"); + } + else { + ::is_deeply(\@info, [], "no name for a coderef that's still compiling"); + } return (); }