[Catalyst-commits] r11788 - Catalyst-Runtime/5.80/trunk/lib/Catalyst
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Mon Nov 9 22:21:19 GMT 2009
Author: rafl
Date: 2009-11-09 22:21:19 +0000 (Mon, 09 Nov 2009)
New Revision: 11788
Modified:
Catalyst-Runtime/5.80/trunk/lib/Catalyst/Request.pm
Log:
Make request->body fail when used as a writer.
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Request.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Request.pm 2009-11-09 02:50:17 UTC (rev 11787)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Request.pm 2009-11-09 22:21:19 UTC (rev 11788)
@@ -110,7 +110,7 @@
sub body {
my $self = shift;
$self->_context->prepare_body();
- $self->_body(@_) if scalar @_;
+ croak 'body is a reader' if scalar @_;
return blessed $self->_body ? $self->_body->body : $self->_body;
}
More information about the Catalyst-commits
mailing list