use NEXT;
use File::MMagic::XS qw(:compat);
-our $VERSION = '2.121';
+our $VERSION = '2.13';
our $mmagic = File::MMagic::XS->new();
# proposed privacy conventions:
# process request with model if applicable and template not set.
if ($applicable) {
- unless ($r->{template}) {
+ unless ($self->{template}) {
eval { $self->model_class->process($self) };
if ( my $error = $@ ) {
$status = $self->call_exception($error, "model");
sub __get_mime_type {
my $self = shift;
my $type = 'text/html';
- if ($self->path =~ m/.*\.(\w{3,4})$/) {
+ if ($self->path =~ m/.*\.(\w{2,4})$/) {
$type = $filetypes{$1};
} else {
my $output = $self->output;