=================================================================== RCS file: /cvs/todotxt/Text-Todo-REST-API/lib/Text/Todo/REST/API/Response.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- todotxt/Text-Todo-REST-API/lib/Text/Todo/REST/API/Response.pm 2010/01/24 04:17:39 1.2 +++ todotxt/Text-Todo-REST-API/lib/Text/Todo/REST/API/Response.pm 2010/01/26 05:05:34 1.3 @@ -1,6 +1,6 @@ package Text::Todo::REST::API::Response; -# $AFresh1: Response.pm,v 1.1 2010/01/23 07:04:43 andrew Exp $ +# $AFresh1: Response.pm,v 1.2 2010/01/24 04:17:39 andrew Exp $ use warnings; use strict; @@ -42,16 +42,17 @@ return $self; } - #sub content_type { - #my ($self) = shift; - #my $ident = ident($self); - #return defined $content_type_of{$ident} - #} + sub content_type { + my ($self) = shift; + return $self->_handle_representation('content_type'); + } sub _handle_representation { my ( $self, $method, $options ) = @_; - $method = join q{_}, $method, $self->type; + if ($method ne 'content_type') { + $method = join q{_}, $method, $self->type; + } my $format = $self->format; if ( $options->{format} ) {