Hello,
I'm new to the list, to C::A too and I use C::A::Dispatch.
My problem is the following :
When I get the page localhost/lunae or localhost/lunae/home, no pb, it says "It works ! 2". But when I try to get the page localhost/lunae/home/mode1 (or mode2 or mode3 or anything), I get a 404 not found page. After investinagting a bit I saw that it tries to load the module Lunae::Iface::Mode1 instead of Lunae::Iface::Home and set the run_mode to mode[123]. What's wrong ? I don't understand.
In my httpd.conf I have this :
---------------------------------------
<Location /lunae>
SetHandler perl-script
PerlHandler CGI::Application::Dispatch
PerlSetVar CGIAPP_DISPATCH_PREFIX Lunae::Iface
PerlSetVar CGIAPP_DISPATCH_DEFAULT home
</Location>
---------------------------------------I have a Lunae/Iface/Home.pm (in a dir in @INC) that looks like this :
--------------------------------------- #!/usr/bin/perl -w
package Lunae::Iface::Home;
use strict;
use base 'CGI::Application'; use Lunae::Common::Iface;
our $VERSION = "0.1";
sub setup {
my $self = shift; $self->mode_param(path_info => 1);
$self->start_mode('mode2');
$self->run_modes(
'mode1' => 'mode1',
'mode2' => 'mode2',
'mode3' => 'mode3'
);}
sub mode1 {
my $self = shift;return "It works ! 1"; }
sub mode2 {
my $self = shift;return "It works ! 2"; }
sub mode3 {
my $self = shift;return "It works ! 3"; } ---------------------------------------
Thanks for your help.
Regards, -- \^/ -/ O \---------------------------------------- | |/ \| Alexandre (Midnite) Jousset | -|___|----------------------------------------
--------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[email protected]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
