X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F100_bugs%2F021_DEMOLISHALL_shortcutted.t;fp=t%2F100_bugs%2F021_DEMOLISHALL_shortcutted.t;h=0000000000000000000000000000000000000000;hb=224bfdd88300af5e6aa044b64111c3e0b1e64e94;hp=ba1833e51282423e178852bb61efbe35e0cfefa1;hpb=6ff81d81df833c5faa820ab7148df1c7d58d24d3;p=gitmo%2FMouse.git diff --git a/t/100_bugs/021_DEMOLISHALL_shortcutted.t b/t/100_bugs/021_DEMOLISHALL_shortcutted.t deleted file mode 100644 index ba1833e..0000000 --- a/t/100_bugs/021_DEMOLISHALL_shortcutted.t +++ /dev/null @@ -1,32 +0,0 @@ -## This test ensures that sub DEMOLISHALL fires even if there is no sub DEMOLISH -## Currently fails because of a bad optimization in DESTROY -## Feb 12, 2009 -- Evan Carroll me@evancarroll.com -package Role::DemolishAll; -use Mouse::Role; -our $ok = 0; - -sub BUILD { $ok = 0 }; -after 'DEMOLISHALL' => sub { $Role::DemolishAll::ok++ }; - -package DemolishAll::WithoutDemolish; -use Mouse; -with 'Role::DemolishAll'; - -package DemolishAll::WithDemolish; -use Mouse; -with 'Role::DemolishAll'; -sub DEMOLISH {}; - - -package main; -use Test::More tests => 2; - -my $m = DemolishAll::WithDemolish->new; -undef $m; -is ( $Role::DemolishAll::ok, 1, 'DemolishAll w/ explicit DEMOLISH sub' ); - -$m = DemolishAll::WithoutDemolish->new; -undef $m; -is ( $Role::DemolishAll::ok, 1, 'DemolishAll wo/ explicit DEMOLISH sub' ); - -1;