Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
The controller basically looks like this

Please don't show us what the code basically looks like in pseudo code. Show the actual broken code.

So I moved back up to the update method and tried to log what was happening inside that if(method is POST) block and got nothing logged there either.

Did you ensure that whatever you're calling when you refer to method is POST is actually returning something? Are you actually calling the proper method to check if it's 'POST'? We don't know, because all you've got is pseudo code.

Did you actually check whether the update() function is being called?

A 404 is page not found. Do you have a route set up to handle the request? It sounds like that may be your problem. In Dancer2, you can specify a route type when defining a route:

any ['get', 'post'] => '/' => sub { ... post '/garage_update' => sub {

...etc. If a 'get' request comes in for /garage_update, it'll fail. The / route accepts both GET and POST. I don't know if Catalyst does things like this though.


In reply to Re: Catalyst Debugging questions, specific and general by stevieb
in thread Catalyst Debugging questions, specific and general by Cody Fendant

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (10)
As of 2024-04-18 08:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found