f083fcef81ee1b21c180fc4ef2a998828e7ac898
[catagits/Catalyst-Runtime.git] / t / meta_method_unneeded.t
1 use strict;
2 use warnings;
3 use Test::More tests => 1;
4 use Test::Exception;
5 use Carp ();
6 $SIG{__DIE__} = \&Carp::confess; # Stacktrace please.
7
8 # Doing various silly things, like for example
9 # use CGI qw/:stanard/ in your conrtoller / app
10 # will overwrite your meta method, therefore Catalyst
11 # can't depend on it being there correctly.
12
13 # This is/was demonstrated by Catalyst::Controller::WrapCGI
14 # and Catalyst::Plugin::Cache::Curried
15
16 {    
17     package TestAppWithMeta;
18     use Catalyst;
19     no warnings 'redefine';
20     sub meta {}
21 }
22
23 lives_ok { TestAppWithMeta->setup } 'Can setup an app which defines its own meta method';