Re: [Catalyst] Changing format of date field

2014-01-07 Thread Ian Docherty
my lib/ directory and build into the DateTime formatter option? On 6. 1. 2014 15:42, Ian Docherty wrote: DateTime has an option to change the default stringification with a 'formatter' option. Also DBIx::Class::InflateColumn::DateTime is a convenience method, you could choose to use

Re: [Catalyst] Changing format of date field

2014-01-06 Thread Ian Docherty
DateTime has an option to change the default stringification with a 'formatter' option. Also DBIx::Class::InflateColumn::DateTime is a convenience method, you could choose to use the DBIx::Class::InflateColumn yourself and combine this with the DateTime formatter option to give you the result you

Re: [Catalyst] Access Catalyst context object from script

2012-10-31 Thread Ian Docherty
On 31 October 2012 10:41, Anthony Gladdish anthony.gladd...@newcastle.ac.uk wrote: Hi, Got a lot of code in a controller that should be moved out and into an external script (that's called by a cronjob) which calls stuff from the Model and then emails it. The script can access the model

Re: [Catalyst] Why is $c undefined?

2012-10-30 Thread Ian Docherty
On 30 October 2012 11:09, Craig Chant cr...@homeloanpartnership.com wrote: Thanks Ian, The hierarchy is something that I am finding mind-blowing at the moment, $self-jqgrid-render($self, , you are calling methods jqgrid-render on $self, passing in $self, I'm sure it makes sense to you

Re: [Catalyst] DBIx::HA

2012-08-26 Thread Ian Docherty
On 26 August 2012 09:49, Theo Bot theo@proxy.nl wrote: Tom You are right. It's an DBIC issue. Do you happen to know where I csn address this issue? Regards Theo Theo The approach I always take in these circumstances is to use CPAN search to find the module in question and then look

Re: [Catalyst] Catalyst::Model::RabbitMQ

2012-08-18 Thread Ian Docherty
On 18 August 2012 20:36, Gianni Ceccarelli dak...@thenautilus.net wrote: I'm using a combination of CatalystX::ComponentsFromConfig and Net::Stomp::Producer. The first (t0m's code, even if released by me) allows you to avoid writing essentially empty model classes (and to apply roles via

Re: [Catalyst] Using external URLs?

2012-04-11 Thread Ian Docherty
On 11 April 2012 09:38, Johannes Kilian jo.kil...@gmx.de wrote: Hi there, I've got a probably simple question, but cannot figure it out yet. I'm using Template::Toolkit and Catalyst - and I'm having problems with absolute URLs ... Within my Template I have the following absolute URL: a

Re: [Catalyst] Catalyst::View::JSON jqGrid

2010-06-28 Thread Ian Docherty
I suspect you have not configured your View::JSON correctly. Ensure you have it configured in your equivalent to MyApp.pm as follows. __PACKAGE__-config-{'View::JSON'} = { expose_stash= 'json_data', }; and it should then do what you want. Regards Ian On 28/06/2010 05:17, Xiao

Re: [Catalyst] Catalyst::View::JSON jqGrid

2010-06-28 Thread Ian Docherty
If you think that either the code or documentation of Catalyst::TraitFor::Controller::jQuery::jqGrid is wrong then drop me an email please. Regards Ian On 28/06/2010 05:17, Xiao Yafeng wrote: Hi, I'm using Catalyst::View::JSON and Catalyst::TraitFor::Controller::jQuery::jqGrid to

Re: [Catalyst] Format last modified date field ...

2009-12-28 Thread Ian Docherty
Kiffin It looks to me like when you print the date field it is doing stringification of the DateTime object. Try doing user.last_modified.ymd In your template and see what you get. If you get something like '2009-12-28' then you can output any of the formats that DateTime supports.

Re: [Catalyst] Organize tests in sub-directories

2009-11-26 Thread Ian Docherty
Tomas Doran wrote: On 24 Nov 2009, at 20:31, Octavian Râşniţă wrote: I would like to structure the t directory as lib/MyApp is structured. Is it possible to be able to configure the app somehow so `make test` checks all the test files even if they are in sub-directories? Yes, you just say

[Catalyst] Advice on namespace for a potential Catalyst cpan module

2009-07-15 Thread Ian Docherty
WRT my previous post I now have a module for a Moose Role useable in a Catalyst Controller to manage breadcrumb trail navigation. The module automatically builds up a breadcrumb trail as you navigate through the web application and can then be used to produce an ordered list of the pages you

[Catalyst] Just a hint on using Roles

2009-07-14 Thread Ian Docherty
Hi I am looking at creating a generic Breadcrumb module to use with Catalyst. The basic idea being that some controllers will 'reset' a breadcrumb path back to the start (for example when clicking on a main menu) and some controllers will append to the existing breadcrumb. e.g. Main menu

[Catalyst] offset the URI of an existing Cat App

2009-07-07 Thread Ian Docherty
Hi I have always written Cat Apps so they start at the '/' URI but now I have been asked to 'offset' one so that:- /becomes /foo /userbecomes /foo/user /admin/1 becames /foo/admin/1 etc. I saw the __PACKAGE__-config-{namespace} that could be used but this would still require an

Re: [Catalyst] offset the URI of an existing Cat App

2009-07-07 Thread Ian Docherty
Octavian Râsnita wrote: From: Ian Docherty catal...@iandocherty.com Hi I have always written Cat Apps so they start at the '/' URI but now I have been asked to 'offset' one so that:- /becomes /foo /userbecomes /foo/user /admin/1 becames /foo/admin/1 Hi, If using mod_perl

Re: [Catalyst] Passing connection info to an custom model/external lib

2009-04-11 Thread Ian Docherty
Eric Wright wrote: I have what I hope is not a dumb question. I'm trying to follow best practices here and am writing a piece of business logic that I feel should be Catalyst agnostic and therefore am creating a custom model. (However, at the moment Catalyst is the primary consumer of this lib.)

Re: [Catalyst] Re: Including a submenu

2009-04-07 Thread Ian Docherty
Matthew Topper wrote: On Tue, 7 Apr 2009 21:20:26 +1000 Kieren Diment kie...@diment.org wrote: Argh. That begs the question as to why you are doing development under apache, and not just using the built in test server for the purpose that it's intended. If the answer is that the dev

Re: [Catalyst] testing catalyst app - need context

2009-03-02 Thread Ian Docherty
Kate Yoak wrote: Hi there, Here is a newbie question: I like to test my functionality in bits and pieces as I write it. How do I go about getting myself the context object in a test script? For example, one of the tests catalyst installs is t/model_App.t where it loads the model. I'd love

Re: [Catalyst] Authorization header and fastcgi

2009-02-20 Thread Ian Docherty
the 'standard' is badly named anyway!) Thanks everyone for help with this matter. Regards Ian Mark Trostler wrote: are you looking in $c-engine-env? Mark Ian Docherty wrote: Matt Pitts wrote: -Original Message- From: Ian Docherty [mailto:catal...@iandocherty.com] Sent: Tuesday, February 17

Re: [Catalyst] Authorization header and fastcgi

2009-02-19 Thread Ian Docherty
Matt Pitts wrote: -Original Message- From: Ian Docherty [mailto:catal...@iandocherty.com] Sent: Tuesday, February 17, 2009 9:51 AM To: The elegant MVC web framework Subject: [Catalyst] Authorization header and fastcgi Hi The 'Authorization' header is not being passed to my Catalyst

Re: [Catalyst] Testing RESTful web services

2008-10-06 Thread Ian Docherty
David Wright wrote: Ian Docherty wrote: Moritz Onken wrote: Am 05.10.2008 um 10:47 schrieb Ian Docherty: Hi I am writing a simple test to test a POST method in a web service but my controller does not see any content in the POSTed request. In the controller both the $c

[Catalyst] Testing RESTful web services

2008-10-05 Thread Ian Docherty
Hi I am writing a simple test to test a POST method in a web service but my controller does not see any content in the POSTed request. In the controller both the $c-request-body and $c-request-content_length are undefined. Any ideas? -- test.t --- use strict; use warnings; use

Re: [Catalyst] Testing RESTful web services

2008-10-05 Thread Ian Docherty
Moritz Onken wrote: Am 05.10.2008 um 10:47 schrieb Ian Docherty: Hi I am writing a simple test to test a POST method in a web service but my controller does not see any content in the POSTed request. In the controller both the $c-request-body and $c-request-content_length are undefined

Re: [Catalyst] How much chain?

2008-07-11 Thread Ian Docherty
Thomas Klausner wrote: ... do I need to hang myself? I'm (finally) playing around with chained, and like it very much. But now I have some sort of design question, on which I'd like to collect some feedback: Say, you want to edit things. The general way of editing is the same for most

Re: [Catalyst] FYI: Contracting possibilities

2008-05-13 Thread Ian Docherty
Ian Docherty always feels people who refer to themselves in the third person are being pretentious, as in http://zenshadow.vox.com/profile/ ;-) Brian Cassidy wrote: Hey All, I was notified via private message that a start-up in Silicon Valley is looking for some Catalyst help. I figured I'd

[Catalyst] Multi-language and REST

2008-04-25 Thread Ian Docherty
I have been pondering how to take an existing Catalyst application and make it multi-lingual. I would prefer to use a RESTful method, so this would translate /foo/bar to /en/foo/bar or /fr/foo/bar (for English and French respectively). The problem as I see it is how to do this. I don't want

Re: [Catalyst] Multi-language and REST

2008-04-25 Thread Ian Docherty
Christopher H. Laco wrote: Ian Docherty wrote: I have been pondering how to take an existing Catalyst application and make it multi-lingual. I would prefer to use a RESTful method, so this would translate /foo/bar to /en/foo/bar or /fr/foo/bar (for English and French respectively

Re: [Catalyst] Multi-language and REST

2008-04-25 Thread Ian Docherty
Dave Rolsky wrote: On Fri, 25 Apr 2008, Ian Docherty wrote: http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#z12 Yes, I have done this previously, it is elegant, but not RESTful and does not make it easy for users to change their settings on a site-by-site basis dynamically, as you could

Re: [Catalyst] Multi-language and REST

2008-04-25 Thread Ian Docherty
Christopher H. Laco wrote: Ian Docherty wrote: Christopher H. Laco wrote: Ian Docherty wrote: I have been pondering how to take an existing Catalyst application and make it multi-lingual. I would prefer to use a RESTful method, so this would translate /foo/bar to /en/foo/bar or /fr/foo/bar

Re: [Catalyst] Re: Catalyst-Manual-FAQ Addition

2008-04-02 Thread Ian Docherty
Jess Robinson wrote: On Wed, 2 Apr 2008, Paul Makepeace wrote: On Mon, Mar 31, 2008 at 7:09 PM, Aristotle Pagaltzis [EMAIL PROTECTED] wrote: * Russell Jurney [EMAIL PROTECTED] [2008-03-31 14:30]: I discovered that 'call' is a reserved word for Catalyst controllers, and any subroutines

Re: [Catalyst] Catalyst test server response times.

2008-01-31 Thread Ian Docherty
Ash Berlin wrote: On 30 Jan 2008, at 09:51, Andrew Payne wrote: On Jan 30, 2008 9:14 AM, Ian Docherty [EMAIL PROTECTED] wrote: It is frequently (but not always) taking 20 seconds or so to display a page in my browser The only times I've had this happen, it's been DNS issues -- in my case

Re: [Catalyst] Catalyst test server response times.

2008-01-30 Thread Ian Docherty
Jason Kohles wrote: On Jan 30, 2008, at 10:23 AM, Roderick A. Anderson wrote: Ian Docherty wrote: I have moved (back) to using the built in Catalyst server for testing purposes. It is frequently (but not always) taking 20 seconds or so to display a page in my browser even though the timings

Re: [Catalyst] Re: REST - like uri design for CRUD

2008-01-29 Thread Ian Docherty
Aristotle Pagaltzis wrote: * Ian Docherty [EMAIL PROTECTED] [2008-01-28 13:45]: OK, so I put the item into the request body, but this does not tell the remote client the ID of the created item. Why does it need it? Is the URI not enough? If not, is the URI *really* not enough (ie

Re: [Catalyst] How to return a 401 from Catalyst

2008-01-27 Thread Ian Docherty
Ian Docherty wrote: Related to my earlier thread about basic authentication, what do I have to do to return a 401 error from within Catalyst? I have tried to understand the documentation at http://www.ietf.org/rfc/rfc2617.txt but it does not help me in a practical manner. My understanding

[Catalyst] $c-req-body oddity

2008-01-26 Thread Ian Docherty
I am sending a POST to a Catalyst app and according to the documention I expected the request body to contain the data I sent. Instead it holds a filename in the tmp directory which contains the document. Is this an expected behaviour? e.g. in my test script my $request =

Re: [Catalyst] Authentication for web services (slightly off topic)

2008-01-24 Thread Ian Docherty
. Regards Ian Ian Docherty wrote: Now this should work, but I can't make it do so. I can't read the authorization username/password In my test I have -- use strict; use warnings; use lib 't/lib'; use Test::More tests = 1; my $mech = WWW::Test::Mechanize-new; $mech-credentials('admin

Re: [Catalyst] Authentication for web services (slightly off topic)

2008-01-24 Thread Ian Docherty
Ian Docherty wrote: Now this should work, but I can't make it do so. I can't read the authorization username/password In my test I have -- use strict; use warnings; use lib 't/lib'; use Test::More tests = 1; my $mech = WWW::Test::Mechanize-new; $mech-credentials('admin','s3cr3t

Re: [Catalyst] Authentication for web services (slightly off topic)

2008-01-24 Thread Ian Docherty
Problem solved with an upgrade to Test::WWW::Mechanize::Catalyst 0.41 and Test::WWW::Mechanize 1.18 Ian Docherty wrote: Now this should work, but I can't make it do so. I can't read the authorization username/password In my test I have -- use strict; use warnings; use lib 't/lib

[Catalyst] Authentication for web services (slightly off topic)

2008-01-23 Thread Ian Docherty
This might seem like a stupid question, and one that probably has a simple solution. If I am serving XML over HTML (a simple web service), how do I authenticate the client? I would not expect cookies to be a sensible solution. I could use Apache Basic Authentication, but I would prefer to

Re: [Catalyst] Authentication for web services (slightly off topic)

2008-01-23 Thread Ian Docherty
Andrew Payne wrote: On Jan 23, 2008 2:30 PM, Ian Docherty [EMAIL PROTECTED] wrote: This might seem like a stupid question, and one that probably has a I could use Apache Basic Authentication, but I would prefer to hold usernames passwords in a database rather than a htpasswd file

Re: [Catalyst] Authentication for web services (slightly off topic)

2008-01-23 Thread Ian Docherty
Andrew Payne wrote: On Jan 23, 2008 2:30 PM, Ian Docherty [EMAIL PROTECTED] wrote: This might seem like a stupid question, and one that probably has a I could use Apache Basic Authentication, but I would prefer to hold usernames passwords in a database rather than a htpasswd file

[Catalyst] Catalyst::View::JSON parameters

2007-12-03 Thread Ian Docherty
parameters (probably because there is no standard parameter mappings for the different JSON modules). I am at a loss as to how to do this without writing my own C::V::JSON Any suggestions? Regards Ian Docherty ___ List: Catalyst@lists.scsys.co.uk Listinfo

Re: [Catalyst] BBC's Perl on Rails nuttiness

2007-12-02 Thread Ian Docherty
Zbigniew Lukasiak wrote: On Dec 2, 2007 12:38 PM, Ian Docherty [EMAIL PROTECTED] wrote: Zbyszek You have to remember that Siemens are responsible for ensuring the stability of the public facing infrastructure. This makes it important not to introduce new modules, or upgrade existing modules

Re: [Catalyst] email confirmation widget?

2007-10-11 Thread Ian Docherty
Dave Rolsky wrote: On Wed, 10 Oct 2007, Dustin Suchter wrote: Has anyone put together a nice email-validation-link-generator widget for Catalyst (or Perl, for that matter)? All I can find on CPAN is something that is part of Jifty (whatever that is).