X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F23_multi_init.t;fp=t%2F23_multi_init.t;h=0000000000000000000000000000000000000000;hb=fbe8c8c4b14d12e8f2e254abe7aab98c74391920;hp=ebe9a721bd440a8a9568ff5d7e9469f37e4c2676;hpb=8995e8271e0f7f7b9c0942a4425e8a44099bf608;p=gitmo%2FClass-C3-XS.git diff --git a/t/23_multi_init.t b/t/23_multi_init.t deleted file mode 100644 index ebe9a72..0000000 --- a/t/23_multi_init.t +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -use Test::More tests => 2; - -BEGIN { - use_ok('Class::C3'); -} - -=pod - -rt.cpan.org # 21558 - -If compile-time code from another module issues a [re]initialize() part-way -through the process of setting up own our modules, that shouldn't prevent -our own initialize() call from working properly. - -=cut - -{ - package TestMRO::A; - use Class::C3; - sub testmethod { 42 } - - package TestMRO::B; - use base 'TestMRO::A'; - use Class::C3; - - package TestMRO::C; - use base 'TestMRO::A'; - use Class::C3; - sub testmethod { shift->next::method + 1 } - - package TestMRO::D; - BEGIN { Class::C3::initialize } - use base 'TestMRO::B'; - use base 'TestMRO::C'; - use Class::C3; - sub new { - my $class = shift; - my $self = {}; - bless $self => $class; - } -} - -Class::C3::initialize; -is(TestMRO::D->new->testmethod, 43, 'double-initialize works ok');