Back out r11057 which breaks one of the chained tests, whilst not fixing the bug...
[catagits/Catalyst-Runtime.git] / t / lib / TestAppClassExceptionSimpleTest.pm
CommitLineData
08f9c848 1package TestAppClassExceptionSimpleTest::Exceptions;
2
3use strict;
4use warnings;
5
6BEGIN {
7 $Catalyst::Exception::CATALYST_EXCEPTION_CLASS = 'TestAppClassExceptionSimpleTest::Exception';
8
9 my %classes = (
10 'TestAppClassExceptionSimpleTest::Exception' => {
11 description => 'Generic exception',
12 alias => 'throw'
13 },
14 );
15
16 my @exports = grep { defined } map { $classes{ $_ }->{ alias } } keys %classes;
17
18 require Exception::Class;
19 require Sub::Exporter;
20
21 Exception::Class->import(%classes);
22 Sub::Exporter->import( -setup => { exports => \@exports } );
23}
24
25package TestAppClassExceptionSimpleTest::Exception;
26
08f9c848 27use strict;
28use warnings;
29no warnings 'redefine';
30
31use HTTP::Headers ();
32use HTTP::Status ();
33use Scalar::Util qw( blessed );
34
35sub status {
36 return $_[0]->{status} ||= 500;
37}
38
39#########
40
41package TestAppClassExceptionSimpleTest;
42
43use strict;
44use warnings;
45use Scalar::Util ();
46use Catalyst::Runtime '5.80';
47
48use Catalyst qw/ -Debug /;
49
50our $VERSION = '0.02';
51
08f9c848 52__PACKAGE__->setup;
53
08f9c848 541;