sub output { shift->body(@_) }
+sub code { shift->status(@_) }
+
no Moose;
=head1 NAME
$res = $c->response;
$res->body;
+ $res->code;
$res->content_encoding;
$res->content_length;
$res->content_type;
Predicate which returns true when a body has been set.
+=head2 $res->code
+
+Alias for $res->status.
+
=head2 $res->content_encoding
Shortcut for $res->headers->content_encoding.
Sets or returns the HTTP status.
$c->response->status(404);
+
+$res->code is an alias for this, to match HTTP::Response->code.
=head2 $res->write( $data )
--- /dev/null
+use strict;
+use warnings;
+use Test::More tests => 4;
+
+use_ok('Catalyst::Response');
+
+my $res = Catalyst::Response->new;
+
+# test aliasing of res->code for res->status
+$res->code(500);
+is($res->code, 500, 'code sets itself');
+is($res->status, 500, 'code sets status');
+$res->status(501);
+is($res->code, 501, 'status sets code');