From: okko Date: Tue, 13 Apr 2010 12:56:38 +0000 (+0300) Subject: fixed not_found call X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Controller-MovableType.git;a=commitdiff_plain;h=8513967037590cd7602b6f8f5bd9daf7a6457011 fixed not_found call --- diff --git a/Changes b/Changes index 543e7e5..ebf7239 100644 --- 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. diff --git a/lib/Catalyst/Controller/MovableType.pm b/lib/Catalyst/Controller/MovableType.pm index 2dcddd8..8718b14 100644 --- a/lib/Catalyst/Controller/MovableType.pm +++ b/lib/Catalyst/Controller/MovableType.pm @@ -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: + + + cgi_root_path mt/ + cgi_dir mt/ + + + mt_home = /full/path/to/MyApp/root/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