Re: [Catalyst] Ajax
On Sun, 2007-08-05 at 22:27 -0500, Jonathan T. Rockway wrote: I tend to use Catalyst::Controller::REST and let it handle serialization / deserialization for me. Technically not MVC, but since it's not code I have to look at, I don't care. It's a bit smarter than View::JSON in that it will return XML (etc.) automagically if the client requests it. Convenient. This is the approach that I use, along with ExtJS, which is now my favorite yummilicious JS library. It's far from pure REST, but I'm not advertising it as a REST service just using it Ajax - Controller. Plus C::REST abstracts out too many annoyances to not use it. Kudos to those who brought that to us. I did have to hack up my own (de)serializer (C::A::(De)Serialize::ExtXML) to create XML responses that jive with ExtJS's concepts, but it's working pretty well. -- Matthew W. Pitts Software Engineer [EMAIL PROTECTED] 336.202.3913 (mobile) A3 IT Solutions, LLC www.a3its.com ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] People keep using that word. I do not think it means whay they think it means. (was: Ajax)
* Matthew Pitts [EMAIL PROTECTED] [2007-08-06 15:25]: It's far from pure REST None of the things on CPAN that have REST in their name have much to do with REST. Few people have any idea what REST really means. (It's actually very simple, just very abstract.) Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] How to execute controller at startup
Hi, I am new to catalyst. I have developed an application using Catalyst. I need all my controllers to execute at startup and register there method URLs. I am not getting how to execute controller at startup. Please help me. Thanks, Aditya ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] How to execute controller at startup
On 8/6/07, Aditya Verma [EMAIL PROTECTED] wrote: Hi, I am new to catalyst. I have developed an application using Catalyst. I need all my controllers to execute at startup and register there method URLs. I am not getting how to execute controller at startup. I wonder what you mean by register their method URLs, since the Catalyst dispatcher already does that. Anyway, startup logic for any Catalyst component can be run by overriding the COMPONENT method. Just make sure it returns the component instance. ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] How to execute controller at startup
On Mon, Aug 06, 2007 at 08:09:32PM +0530, Aditya Verma wrote: I need all my controllers to execute at startup and register there method URLs. I am not getting how to execute controller at startup. I'm confused ... all of my actions are automagically detected. I don't understand why you'd want to *execute* *ALL* of your controller methods - is that really what you intended? cut here [debug] Loaded Private actions: .--+-+--. | Private | Class | Method | +--+-+--+ | /default | Parley::Controller::... | default | | /end | Parley::Controller::... | end | | /index | Parley::Controller::... | index| | /auto| Parley::Controller::... | auto | | /render | Parley::Controller::... | render | | /my/preferences | Parley::Controller::... | preferences | | /post/view | Parley::Controller::... | view | *snip* cut here -- Chisel Wright e: [EMAIL PROTECTED] w: http://www.herlpacker.co.uk/ I may be a pretty sad person, but I don't make jokes in base 13. ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] People keep using that word. I do not think it means whay they think it means. (was: Ajax)
On Mon, 2007-08-06 at 16:19 +0200, A. Pagaltzis wrote: * Matthew Pitts [EMAIL PROTECTED] [2007-08-06 15:25]: It's far from pure REST None of the things on CPAN that have REST in their name have much to do with REST. Few people have any idea what REST really means. (It's actually very simple, just very abstract.) Agreed. RESTfullness is *all* about the implementation. You can take something like C::C::REST and use it to build a REST service. Or, you can do as I have and use it for something totally non-REST where it serves a good purpose and saves me time. I'm not sure that pure REST is ever achievable in the real world because it's so difficult to abstract the conversion b/t data and the desired content-type. IMHO -- Matthew W. Pitts Software Engineer [EMAIL PROTECTED] 336.202.3913 (mobile) A3 IT Solutions, LLC www.a3its.com ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] How to execute controller at startup
--- Aditya Verma [EMAIL PROTECTED] wrote: Hi, I am new to catalyst. I have developed an application using Catalyst. I need all my controllers to execute at startup and register there method URLs. I am not getting how to execute controller at startup. Please help me. Thanks, Aditya Hi, Catalyst Controllers are subclasses of Catalyst::Component so are automatically located a registered by your primary Catalyst class at startup. If you are finding that you don't see your controllers and/or actions in the debug screen when you start the development server then you must have some typos in the controller package names or something similar. Please give us a little more detail about your trouble and the actually need that you are trying to fill. --john Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=listsid=396545433 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] firing a POST method with Test::WWW::Mechanize
I want to do this by just making the POST request (not telling $mech to click/submit somewhere). I don't see any obvious way of doing it. any ideas? D ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] mod_proxy and https
Hiya list, If I have read the archives correctly, the only way to use http and https to the front end it to have 2 backend servers, once running http, the other forced to https, otherwise uri_for will not return the correct paths to the front end on the https ports. Is this still the case? Will the next version of Catalyst::Runtime help with only having one backend instance (I can see having 2 backend instances may be harder to manage, esp. when sharing session data between them - more hoops to jump through). I have thought about overriding uri_for so all paths are returned to the browser as https. I was surprised I couldn't find a sub similar to uri_for that didn't include the uri type and server name ('http:// server/status' vs '/status') so the original connection type is continued, but not sure what the implications of this might be (just thought of if, not fully thought it through yet). Thoughts? Duncs ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] firing a POST method with Test::WWW::Mechanize
Test::WWW::Mechanize isa LWP::UserAgent, so why not.. # like LWP docs.. my $req = HTTP::Request-new(POST = $uri); $req-content_type('application/x-www-form-urlencoded'); $req-content('foo=baromg=lol'); $mech-request($req); ok($mech-success, 'POST succeeded'); On Aug 6, 2007, at 9:24 AM, Daniel McBrearty wrote: I want to do this by just making the POST request (not telling $mech to click/submit somewhere). I don't see any obvious way of doing it. any ideas? D ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/ catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ --- michael reece :: software engineer :: [EMAIL PROTECTED] ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] mod_proxy and https
On Mon, Aug 06, 2007 at 05:40:29PM +0100, Duncan Ferguson wrote: Hiya list, If I have read the archives correctly, the only way to use http and https to the front end it to have 2 backend servers, once running http, the other forced to https, otherwise uri_for will not return the correct paths to the front end on the https ports. Not two backend servers, but a backend that listen on two ports. Just need a way to tell the difference between http and https in the backend, and using two ports is one way to accomplish that. -- Bill Moseley [EMAIL PROTECTED] ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] mod_proxy and https
On Mon, Aug 06, 2007 at 12:23:43PM -0500, Dave Rolsky wrote: On Mon, 6 Aug 2007, Duncan Ferguson wrote: For SSL you'd send X-Forwarded-Is-SSL with some true value. Hopefully this will be merged into the Catalyst trunk sometime soonish. I think we intend to get this into the next maint release (5.7009). We just need to write some tests to make sure the new Engine stuff works correctly, then we'll release. Regards, Jonathan Rockway ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] overload/override sub? (Session::PerUser)
Hi, I'd like to overload (or would it be override?) the merge_session_to_user sub in Catalyst::Plugin::Session::PerUser to be able to guide the hash merge (i.e. create new hash value keys for conflicting keys). Now, where and how should I do the overriding? Excuse my ignorance ... but I've never done this and searching for 'Perl overload' always gets me to instructions on how to overload built-in operators ... Thanks in advance, Fernan ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] overload/override sub? (Session::PerUser)
Fernan Aguero wrote: Hi, I'd like to overload (or would it be override?) the merge_session_to_user sub in Catalyst::Plugin::Session::PerUser to be able to guide the hash merge (i.e. create new hash value keys for conflicting keys). Now, where and how should I do the overriding? Excuse my ignorance ... but I've never done this and searching for 'Perl overload' always gets me to instructions on how to overload built-in operators ... Thanks in advance, Fernan Redefine is the term in perl-lingua. In MyApp.pm: { no warnings 'redefine'; sub merge_session_to_user { # your new sub # ... # To call the previous implementation if you should want it: # $self-NEXT::merge_session_to_user(@args); } } The key thing to remember here is that all Cat plugins 'pollute' the $c namespace, which isa Myapp. HTH Ash ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/