fixed not_found call
okko [Tue, 13 Apr 2010 12:56:38 +0000 (15:56 +0300)]
Changes
lib/Catalyst/Controller/MovableType.pm

diff --git a/Changes b/Changes
index 543e7e5..ebf7239 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,7 @@
+0.003
+        2010-04-xx
+        Fixed not_found call when an unexisting script is requested.
+
 0.002
         2010-04-13
         Fixed Makefile.pl to require Catalyst::Controller::WrapCGI.
index 2dcddd8..8718b14 100644 (file)
@@ -4,7 +4,7 @@ BEGIN { extends 'Catalyst::Controller::WrapCGI'; }
 use utf8;
 use namespace::autoclean;
 
-our $VERSION = 0.002;
+our $VERSION = 0.003;
 
 has 'perl' => (is => 'rw', default => 'perl');
 
@@ -37,7 +37,7 @@ sub run_mt_script :Path {
     # Allow it only in debug mode.
     $mt_scripts{'mt_check.cgi'} = 1 if ($c->debug());
 
-    $self->not_found() unless ($mt_scripts{$cgi_script});
+    $self->not_found($c) unless ($mt_scripts{$cgi_script});
 
     $ENV{MT_HOME} = $self->mt_home;
 
@@ -61,6 +61,37 @@ __END__
 
 Catalyst::Controller::MovableType - Run Movable Type through Catalyst
 
+=head1 INSTALLATION
+
+Install Movable Type by extracting the zip into your template root directory.
+Move mt-static to root/static/mt. See Synopsis on how to inherit the Controller
+in your app. Presuming you installed Movable Type into root/mt, in your App's
+config add:
+
+<Controller::Root>
+        cgi_root_path mt/
+        cgi_dir mt/
+</Controller::Root>
+<Controller::Mt>
+        mt_home = /full/path/to/MyApp/root/mt/
+</Controller::Mt>
+
+The cgi_* directives are always given for the Root controller, no matter what
+the Root controller is or even if it doesn't even exist.
+
+Finally, make sure that the Static::Simple doesn't affect the Movable Type's
+installation directory. An example:
+
+__PACKAGE__->config(
+    name => 'TerveinkansaFi',
+                     static => {
+                        # first ignore all extensions, then specify static directories!
+                        'ignore_extensions' => [ qr/.*/ ],
+                        'dirs' => [ qw/static/ ]
+                        }
+);
+
+
 =head1 SYNOPSIS
 
  package MyApp::Controller::Mt;
@@ -71,10 +102,7 @@ Catalyst::Controller::MovableType - Run Movable Type through Catalyst
 
  1;
 
-=head1 INSTALLATION
-
-Install Movable Type by extracting the zip into your template root directory.
-Move mt-static to root/static/mt, and configure Movable Type accordingly.
+=head1
 
 =head1 DESCRIPTION