Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

CGI->redirect() won't, it seems.

by hesco (Deacon)
on May 29, 2009 at 21:49 UTC ( [id://766965]=perlquestion: print w/replies, xml ) Need Help??

hesco has asked for the wisdom of the Perl Monks concerning the following question:

I apparently don't get it. FYI, the $self->{'q'} object isa 'CGI', and the $self->{'cfg'} isa Config::Simple.
$self->log('DEBUG',"The status is current. We now redirect to: +\n" . $self->{'cfg'}->param("www.dashboard")); $redirect = 1; $html = $self->{'q'}->redirect( uri => $self->{'cfg'}->param("www.dashboard"), status => 303 );
What I expect to see is the url in the location bar of my browser change from the account_creation page to the dashboard page. I also expect to see debug noise in the logs when dashboard is processed.

What I actually see is no change in the location bar, no noise in the log past the log message above, and an empty page with no content (not even html skeleton). Meanwhile if I open a neighboring tag on my dashboard, it opens as would be hoped, throwing anticipated noise into the logs, and apparently recognizing the session created by the create_account page.

What is it, please, I am missing about this CGI->redirect() method?

Any clues appreciated,

-- Hugh

if( $lal && $lol ) { $life++; }

Replies are listed 'Best First'.
Re: CGI->redirect() won't, it seems.
by ikegami (Patriarch) on May 29, 2009 at 23:06 UTC
    You are missing dashes on the name of the parameters.
Re: CGI->redirect() won't, it seems.
by Anonymous Monk on May 30, 2009 at 01:49 UTC
    use CGI; print CGI->header( qw, uri uri status status , ); __END__ Status: uri Window-Target: status Set-Cookie: status Date: Sat, 30 May 2009 01:49:36 GMT Content-Type: uri
    CGI
      You'll need the dashes if $CGI::VERSION < 3
        unless you want to reference the manual for the order of options, stick to dashes :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://766965]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-19 23:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found