From: Florian Ragwitz Date: Thu, 4 Dec 2008 02:42:47 +0000 (+0000) Subject: Test execution of stub meta methods after the stub functions got defined. X-Git-Tag: 0.71_01~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e24c686f825f9f9043c6a44acdf414ec37ca2fc1;p=gitmo%2FClass-MOP.git Test execution of stub meta methods after the stub functions got defined. --- diff --git a/t/305_RT_41255.t b/t/305_RT_41255.t index 1dd1049..5e2691f 100644 --- a/t/305_RT_41255.t +++ b/t/305_RT_41255.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use strict; -use Test::More tests => 10; +use Test::More tests => 20; use Test::Exception; use Class::MOP; @@ -31,3 +31,21 @@ while (my ($name, $meta_method) = each %methods) { is $meta_method->fully_qualified_name, "Derived::${name}"; throws_ok { $meta_method->execute } qr/Undefined subroutine .* called at/; } + +{ + package Derived; + eval <<'EOC'; + + sub m1 { 'affe' } + sub m2 () { 'apan' } + sub m3 :method { 'tiger' } + sub m4 { 'birne' } + sub m5 { 'apfel' } + +EOC +} + +while (my ($name, $meta_method) = each %methods) { + is $meta_method->fully_qualified_name, "Derived::${name}"; + lives_ok { $meta_method->execute }; +}