FAQ
Hi,

I am finding a strange situation.

If i restart my catalyst application,i find in debug messages, all of my
actions are marked as Private.

Also if i execute the code, then it will execute the auto and end functions
and bypasses the called action.



Ie. If i call /search . It will run auto, end and will ignore search action.



Dont know why,

What info will you guys need from me to help me?



Thanks,

abhi





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20120402/39ec2c89/attachment.htm

Search Discussions

  • Kieren Diment at Apr 2, 2012 at 6:24 am

    On 02/04/2012, at 4:18 PM, abhishek jain wrote:

    Hi,

    I am finding a strange situation.

    If i restart my catalyst application,i find in debug messages, all of my
    actions are marked as Private.

    Also if i execute the code, then it will execute the auto and end functions
    and bypasses the called action.



    Ie. If i call /search . It will run auto, end and will ignore search action.



    Dont know why,

    What info will you guys need from me to help me?

    Why don't you try to write a minimal test case demonstrating your problem? Is this with the dev server? Is it with some front end deployment?
  • Tomas Doran at Apr 2, 2012 at 9:34 am

    On 2 Apr 2012, at 07:24, Kieren Diment wrote:
    Also if i execute the code, then it will execute the auto and end functions
    and bypasses the called action.
    The return value of the auto action is significant!

    It's a specific feature of auto that if you return false, then normal dispatch will be avoided.

    Cheers
    t0m
  • Abhishek jain at Apr 2, 2012 at 9:43 am
    Hi Kieren,

    I just found if in auto action I add
    1;
    Add end of code, the code works fine and the requested action is executed
    If i don't return a value , the code ignores the requested action and end
    action is called.

    Don't know why, any suggestions,
    So
    sub auto : Private {
    #.......
    ........
    1;
    }
    Works fine

    And

    sub auto : Private {
    ...
    }
    Fails.

    Thanks
    Abhi


    -----Original Message-----
    From: Kieren Diment
    Sent: 02 April 2012 11:55
    To: The elegant MVC web framework
    Subject: Re: [Catalyst] All actions marked as Private and are being ignored


    On 02/04/2012, at 4:18 PM, abhishek jain wrote:

    Hi,

    I am finding a strange situation.

    If i restart my catalyst application,i find in debug messages, all of
    my actions are marked as Private.

    Also if i execute the code, then it will execute the auto and end
    functions and bypasses the called action.



    Ie. If i call /search . It will run auto, end and will ignore search action.


    Dont know why,

    What info will you guys need from me to help me?

    Why don't you try to write a minimal test case demonstrating your problem?
    Is this with the dev server? Is it with some front end deployment?
    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/
  • Kieren Diment at Apr 2, 2012 at 9:48 am
    As Tom says, that's expected behaviour. Auto is for bailing (e.g. if auth fails).
    On 02/04/2012, at 7:43 PM, abhishek jain wrote:

    Hi Kieren,

    I just found if in auto action I add
    1;
    Add end of code, the code works fine and the requested action is executed
    If i don't return a value , the code ignores the requested action and end
    action is called.

    Don't know why, any suggestions,
    So
    sub auto : Private {
    #.......
    ........
    1;
    }
    Works fine

    And

    sub auto : Private {
    ...
    }
    Fails.

    Thanks
    Abhi


    -----Original Message-----
    From: Kieren Diment
    Sent: 02 April 2012 11:55
    To: The elegant MVC web framework
    Subject: Re: [Catalyst] All actions marked as Private and are being ignored


    On 02/04/2012, at 4:18 PM, abhishek jain wrote:

    Hi,

    I am finding a strange situation.

    If i restart my catalyst application,i find in debug messages, all of
    my actions are marked as Private.

    Also if i execute the code, then it will execute the auto and end
    functions and bypasses the called action.



    Ie. If i call /search . It will run auto, end and will ignore search action.


    Dont know why,

    What info will you guys need from me to help me?

    Why don't you try to write a minimal test case demonstrating your problem?
    Is this with the dev server? Is it with some front end deployment?
    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/


    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/
  • Mark Blackman at Apr 2, 2012 at 9:52 am

    On 2 Apr 2012, at 10:43, abhishek jain wrote:

    Hi Kieren,

    I just found if in auto action I add
    1;
    Add end of code, the code works fine and the requested action is executed
    If i don't return a value , the code ignores the requested action and end
    action is called.

    Don't know why, any suggestions,
    Although Tomas has pointed this out, I feel compelled to point to the
    manual as well.

    http://search.cpan.org/~bobtfish/Catalyst-Manual-5.9003/lib/Catalyst/Manual/Intro.pod#Built-in_special_actions

    "The auto action is also distinguished by the fact that you can break out of the processing chain by returning 0. If an auto action returns 0, any remaining actions will be skipped, except for end."

    - Mark

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedApr 2, '12 at 6:18a
activeApr 2, '12 at 9:52a
posts6
users4
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2021 Grokbase