Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: A question regarding cookies

by barrycarlyon (Beadle)
on Sep 22, 2006 at 18:22 UTC ( #574421=note: print w/replies, xml ) Need Help??


in reply to A question regarding cookies

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^2: A question regarding cookies
by bart (Canon) on Sep 22, 2006 at 18:43 UTC
    This can't work:
    my $html_template = $self->param('html_template'); ... $html_template->process('home', ... );
    So, where is the object supposed to come from? $html_template is, if set by the form, a string, so you're actually doing a class method call, most likely of a nonexistent package, and even if it exists, it most probably doesn't have a process method.

    So there is where it goes wrong.

    I think you still have to create a new html_template object from the parameter.

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re^2: A question regarding cookies
by gellyfish (Monsignor) on Sep 22, 2006 at 18:45 UTC

    You appear to be expecting the param('html_template'); to return an object but it is returning the literal string 'html_template' which is why you are getting the error that you are. The other problem with your code is that you are printing a header with the cookie straightaway whereas you actually need to be adding the the cookies to the headers you output before your main output. I really don't want to see the rest of your code, but you will need to add the cookie to a header elsewhere in your code,

    /J\

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2023-03-30 02:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (73 votes). Check out past polls.

    Notices?