Commit | Line | Data |
---|---|---|
35154983 | 1 | use Test::More tests => 1; |
6a7254b5 | 2 | use strict; |
3 | use warnings; | |
4 | ||
5 | { | |
6 | package MyApp::Component; | |
7 | use Test::More; | |
8 | ||
c48335a3 | 9 | sub COMPONENT { |
35154983 | 10 | fail 'This no longer gets dispatched to'; |
6a7254b5 | 11 | } |
12 | ||
13 | package MyApp::MyComponent; | |
14 | ||
15 | use base 'Catalyst::Component', 'MyApp::Component'; | |
16 | ||
17 | } | |
18 | ||
35154983 | 19 | my $warn = ''; |
20 | { | |
6a7254b5 | 21 | local $SIG{__WARN__} = sub { |
35154983 | 22 | $warn .= $_[0]; |
6a7254b5 | 23 | }; |
24 | MyApp::MyComponent->COMPONENT('MyApp'); | |
25 | } | |
35154983 | 26 | |
27 | like($warn, qr/after Catalyst::Component in MyApp::Component/, | |
28 | 'correct warning thrown'); | |
29 |