Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

All actions marked as Private and are being ignored

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


abhishek.netjain at gmail

Apr 1, 2012, 11:18 PM

Post #1 of 6 (435 views)
Permalink
All actions marked as Private and are being ignored

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


diment at gmail

Apr 1, 2012, 11:24 PM

Post #2 of 6 (412 views)
Permalink
Re: All actions marked as Private and are being ignored [In reply to]

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 [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


bobtfish at bobtfish

Apr 2, 2012, 2:34 AM

Post #3 of 6 (413 views)
Permalink
Re: All actions marked as Private and are being ignored [In reply to]

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



_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


abhishek.netjain at gmail

Apr 2, 2012, 2:43 AM

Post #4 of 6 (412 views)
Permalink
RE: All actions marked as Private and are being ignored [In reply to]

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 [mailto:diment [at] gmail]
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 [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


diment at gmail

Apr 2, 2012, 2:48 AM

Post #5 of 6 (411 views)
Permalink
Re: All actions marked as Private and are being ignored [In reply to]

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 [mailto:diment [at] gmail]
> 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 [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/
>
>
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/


_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


m.blackman at fairfx

Apr 2, 2012, 2:52 AM

Post #6 of 6 (413 views)
Permalink
Re: All actions marked as Private and are being ignored [In reply to]

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
_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.