Re: [Catalyst] Alternatives to DBIx?

2010-04-19 Thread Carl Johnstone
kevin montuori wrote: > In my experience (two or so years with DBIC/Catalyst and many, many > more with sundry DBI hacks) DBIC code has proven trivial to maintain > and augment. Furthermore, it's relatively easy to find programmers > who are familiar with it and can be brought up to speed quickly.

Re: [Catalyst] Alternatives to Catalyst ?

2010-04-27 Thread Carl Johnstone
Merlyn Kline wrote: > I propose that all references > to the req->param() interface should be replaced by references to the > $c->req->parameters->{} interface except where explicit discussions > of CGI.pm compatability are appropriate, which would only be very > briefly in the case of the Intro.

Re: [Catalyst] Alternatives to Catalyst ?

2010-04-27 Thread Carl Johnstone
Dermot wrote: > Why wouldn't you, as you write, use the the fastest access methods > available? Surely you'd want to develop habits that will a) provide > better performance and b) as mentioned below avoid the thorny > side-effects of req->params(). This isn't a matter of premature > optimisation b

Re: [Catalyst] Alternatives to Catalyst ?

2010-04-29 Thread Carl Johnstone
Oleg Pronin wrote: > Maybe it is not the bottleneck, but how many places do we have > like this that are "not a bottleneck" ? maybe the sum of all these > "mini" mistakes is the bottleneck ? NYTProf profile or it didn't happen :-) Carl ___ List: C

Re: [Catalyst] CatalystSites.org

2008-04-03 Thread Carl Johnstone
I'm not sure what the 50%/51% good bit means - this isn't clear. Maybe replace this with "X users marked this as a favourite" - no point in allowing people to vote down ;) Would probably work better displayed Digg style (plus_votes - minus_votes) rather than having 50% as the default. If

Re: [Catalyst] CatalystSites.org

2008-04-07 Thread Carl Johnstone
The site looks nice, but I find it a little "bloatware" to talk of 40+ sites, when it's obvious that a good part of them share the same layout and codebase and only differ in the content. That would actually be my "fault", as I added those sites. The aim is to create a list of public facing we

Re: [Catalyst] CatalystSites.org

2008-04-08 Thread Carl Johnstone
Is the Guardian run on Catalyst? No, not exactly sure what they're using but I believe they've gone down the Java route. Carl ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable arch

Re: [Catalyst] Running java inside Catalyst

2008-06-24 Thread Carl Johnstone
Not sure which specific engine you asked, but I'll just put all of them. He meant Catalyst engine... Catalyst::Engine::? Were you using the server script that comes with Catalyst? FastCGI? mod_perl? Carl ___ List: Catalyst@lists.scsys.co.uk

Re: [Catalyst] Production session issue - commercial support inquiry?

2009-01-08 Thread Carl Johnstone
Just a quick thought - are you setting appropiate no-cache headers in your responses? Are the problems due to transparent caching at ISPs? Carl ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst

Re: [Catalyst] Production session issue - commercial support inquiry?

2009-01-08 Thread Carl Johnstone
As for down-stream proxies, I am not explicitly setting no-cache headers from the app, should I be? < You might want to look into it. I've had problems with aggressive ISP caches before where they cached pages and sent them to other users - every page has "welcome username" at the top. Th

Re: [Catalyst] Re: how to confirm before deleteing

2009-01-22 Thread Carl Johnstone
Aristotle Pagaltzis wrote: > http://yourapp.example.org/addressbook/delete/all";> > > into a page they control and then send a link to that page to > your users. If you allow destructive actions on GET, you have > just allowed for your users to be screwed over through no fault > of their own.

Re: [Catalyst] Catalyst needing LOTS of RAM

2009-02-17 Thread Carl Johnstone
Neo [GC] wrote: > Currently, our project allocates 330MB RAM right after startup (with > myproject_server.pl or fastcgi). What OS? Where do you get the 330MB figure from? > Over the time this is getting worse; > some month after the projects start it used about 80MB and we think > with some addi

Re: [Catalyst] User timezones

2009-06-25 Thread Carl Johnstone
Devin Austin wrote: > you could simply create a column and add the GMT offset. NO! If you only use GMT offsets you'll just annoy your users anywhere in the world that has DST. If that's the only solution don't bother - just use a relevant fixed timezone. Much better to use the Olsen DB timezon

Re: [Catalyst] Scalable Catalyst

2009-07-01 Thread Carl Johnstone
I think that the mod_perl mailing list would also be interested in this - there are very few people on that list with practical examples of multi-thread. As far as I'm aware pre-fork is still pretty much the only model recommended. Alejandro Imass wrote: > Ok. What would you have done? - not me

Re: [Catalyst] Configuration based on hostname

2009-07-13 Thread Carl Johnstone
> One of the limitations of mod_perl is that you can't run the same app > more than once on the same server. Sorry. Not true. We run multiple versions of the same app in the same apache process. Look at the +Parent option, which will create additional separate perl interpreters within the same

Re: [Catalyst] Configuration based on hostname

2009-07-13 Thread Carl Johnstone
Mihai Bazon wrote: > Let me clarify that. I don't want to run the app more than once. I > just want the application to switch configuration file and database > depending on the hostname that each particular request targets. > > I've done this a zillion times with plain mod_perl, I just don't know

Re: [Catalyst] Catalyst benchmark 5.7 VS 5.8

2009-09-29 Thread Carl Johnstone
Toby Corkindale wrote: > (CentOS 5 was one of the operating systems that came with the > badly-patched Perl with the slow bless performance.. > although I'm sure it's been patched by now? > ie. http://blog.vipul.net/2008/08/24/redhat-perl-what-a-tragedy/ > ) Was patched last year - stop spreading

Re: [Catalyst] Catalyst benchmark 5.7 VS 5.8

2009-09-29 Thread Carl Johnstone
Tobias Kremer wrote: > So, what's a better way to find out how much memory is shared? On our > production servers "top" shows > > VIRT: 70116, RES: 64m, SHR: 3480 > > and I hope that 3480 is really not the amount of memory that is shared > because that'd be quite low. It's a different type of sha

Re: [Catalyst] Re: Avoiding UTF8 in Catalyst

2009-11-23 Thread Carl Johnstone
Aristotle Pagaltzis wrote: > # everything should be bytes at this point, but just in case > $response->content_length( bytes::length( $response->body ) ); > > I was shocked to discover this! Any code that uses bytes::length > is automatically broken. Not in this case, the HTTP spec says th

Re: [Catalyst] Re: Avoiding UTF8 in Catalyst

2009-11-23 Thread Carl Johnstone
Aristotle Pagaltzis wrote: > But there’s no room for “likelies” here: that’s programming by > coincidence. The "likely" was correct. When using UTF-8 whether the length of the string is different in bytes and characters depends entirely on what the contents of the string are. Given a particular

Re: [Catalyst] determine MIME type of binary Webservice result?

2010-01-19 Thread Carl Johnstone
Jens Schwarz wrote: > in my Catalyst application I use Webservices to connect to SAP. One > of these returns "binary" data (right now base64-encoded XML, later > also PDF). > > Is it possible to determine the MIME type of those returned > (sub)strings? If so, how? It doesn't matter that you're usi

Re: [Catalyst] uri_for

2010-01-20 Thread Carl Johnstone
Tomohiro Hosaka wrote: > Is this correct result? Yes, the previous situation was a bug. Given sub foo : Args(1) { my ($c, $arg) = @_; }; The URL http://127.0.0.1/foo/bar%2Fbaz would match and set $arg to 'bar/baz' correctly. However reversing that using uri_for then returns the incorrect UR

Re: [Catalyst] Page fragment caching

2010-01-20 Thread Carl Johnstone
Tobias Kremer wrote: > c) somebody smarter than me has a better idea how to solve this > problem? :) Use Varnish as a caching-proxy in front-of your app. Use ESI to include the fragments and set appropiate cache-control headers in those reponses so Varnish can cache appropiately. Carl ___

Re: [Catalyst] Using Catalyst with mod_per or FastCGI on heavytraffic web application

2010-02-01 Thread Carl Johnstone
Adam Mackler wrote: > Finally, a wonderful benefit of using fastcgi is that each one of my > fastcgi applications runs as a separate user, and none of those > fastcgi users is the user that the web server runs as. I sleep that > much better at night knowing that the web server cannot read the file

Re: [Catalyst] Using Catalyst with mod_per or FastCGI on heavy traffic web application

2010-02-01 Thread Carl Johnstone
Another mod_perl user here! I've looked at FastCGI, but ongoing management has always looked to be more complecated than just altering the apache config. We have a multi-server setup with hardware load-balancers. They balance between two threaded apache servers which serve all static files and

[Catalyst] merging DB data with XML data

2007-10-05 Thread Carl Johnstone
Hi, This may be more of a DBIx::Class question than Catalyst, but anyway. I have a system where the bulk of the content is generated elsewhere in XML format, I've implemented a Catalyst Model that reads the XML, and returns a blessed perl data structure (with appropriate caching etc.) Where

Re: [Catalyst] New Catalyst site

2007-10-30 Thread Carl Johnstone
I would like to announce that www.manchestereveningnews.co.uk has just been relaunched using Catalyst and mod_perl. Further to my original email, we've now finished rolling out our Manchester newspaper sites onto Catalyst. a.. Accrington Observer www.accringtonobserver.co.uk b.. The Asian N

Re: [Catalyst] DProf

2007-11-05 Thread Carl Johnstone
It's probably useful to tell you what these various commands are actually doing, rather than just saying check-this and check-that... lsof = LiSt Open Files basically it lists every file that a process has open, that includes the executable file itself and any libraries or shared code. The b

Re: [Catalyst] difficulty in assigning an array to a stash

2007-11-12 Thread Carl Johnstone
jagdish eashwar wrote: I am getting only the last value in the tt2 template. You're actually getting the number of items in the list, because that's what you get when you turn a list into a single value. Carl ___ List: Catalyst@lists.scsys.co.uk Li

Re: [Catalyst] Catalyst::Plugin::Authentication::Store::LDAP problems

2007-11-28 Thread Carl Johnstone
I've got LDAP authentication working with Apache. Is there an authentication method that simply takes over the username and password that Apache got from the user? I believe Apache stores the user name from its auth in the REMOTE_USER env var. Or if you're using mod_perl you should be able to

Re: [Catalyst] configurable base url?

2007-12-10 Thread Carl Johnstone
So if I want to run multiple versions of the same app it looks like I'll have to do it on Apache with cgi/fcgi because mod-perl won't let you have competing stuff in the same namespace. We run 17 versions of the same app for 17 different sites on different domains. The only thing we do do is

Re: [Catalyst] hostname

2008-01-10 Thread Carl Johnstone
from the context object, but is unavailable to MyApp.pm. cookie_domain Both the context object and the hostname should be available to code within MyApp.pm, but only if the code is running during a request. In any case I wouldn't point multiple domains at the same site, you're always best o

Re: [Catalyst] hostname

2008-01-10 Thread Carl Johnstone
From: <[EMAIL PROTECTED]> How would you propose handling an ASP like service that is branded (both host whatever.companya.com ... othersuch.company9.com, and templates) for 1 companies? You should've a bit further down to where I wrote: That said, there's a case for needing to know t

Re: [Catalyst] hostname

2008-01-11 Thread Carl Johnstone
cookie_domain => the_host() in the MyApp config, but when I try to start the server it gives an error telling that I can't use the method "req" because $c is undefined. I'd be curious about why you wanted the cookie domain in the config anyway! I presume you've got a bit of code like: $c->res

Re: [Catalyst] PostgreSQL quoting issues

2008-01-16 Thread Carl Johnstone
my $rsts = $c->model ('MintAppDB::TransSum')->find ({ category => $c->req->param ('category'), sentto => $c->req->param ('sentto'), iso => $c->req->param ('iso') }); This is broken! Simply try requesting a

Re: [Catalyst] Debugging Catalyst with Eclipse

2008-01-22 Thread Carl Johnstone
I'd love to help write more docs. What format do I use POD and who do I submit them to? I'd suggest starting on the catalyst-dev list. Carl ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst

Re: [Catalyst] warning

2008-01-23 Thread Carl Johnstone
My site is accessed with 2 different domain names, and the app must send a cookie that specify a domain, because otherwise Firefox doesn't send the cookie back to the server. I've given you an answer to that problem once. Redirect domain2.com to domain1.com and only serve your site through dom

[Catalyst] index and default actions (was: Why no extra attributes on Private actions?)

2008-01-23 Thread Carl Johnstone
I foresee index and default going the fuck away for 5.80 unless you're in compat mode. I'm curious about these two. I've made plenty of use of index, and off the top of my head can't see another way of doing the home page of site. As far as default, I'd currently use that to do my 404 handli

Re: white-labelling [Catalyst] (Was: warning)

2008-01-23 Thread Carl Johnstone
You may want to deliver somewhat different content depending on which URL they use; is that what you mean by 'white-labelled'? By white labelling I mean the same functionality and data wrapped up in different branding like: http://www.stockportexpress.co.uk/news/s/1033042_wii_posing_injury_ri

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

2008-01-23 Thread Carl Johnstone
I could use Apache Basic Authentication, but I would prefer to hold usernames passwords in a database rather than a htpasswd file. I realise that you've been given an all-Cat solution for this however I just want to point out that just because you're using Basic Auth in Apache, doesn't mean th

Re: [Catalyst] warning

2008-01-23 Thread Carl Johnstone
Our sysadmin told me that this way is better because we won't make traffic (and slow down) on the public network interface. Marginal, you'd need to be doing *a lot* of data transfer. I think our data transfer at our ISP maxes out at around 12Mbps on an average lunch time - well below the 100Mp

Re: white-labelling [Catalyst]

2008-01-24 Thread Carl Johnstone
Interesting term, 'white labelling'; where do you get it from. It's a fairly standard term for the process. One origin I've come across is it comes from manufacturers selling products with plain white labels to supermarkets, who would then brand them as own-brand products. However these day

[Catalyst] LDAP

2008-01-24 Thread Carl Johnstone
Hi, I've been playing around with the LDAP stuff in Catalyst, we have a need to share user data externally for authentication reasons and currently believe LDAP is a good solution for this. To this end I've got C:P:Auth:Store:LDAP correctly authenticating users against a LDAP database. I've

LDAP Injection [Catalyst]

2008-01-24 Thread Carl Johnstone
Oh another LDAP subject that I meant to mention - LDAP Injection. It's something that's been mentioned regarding our use of LDAP. For example C:P:Auth:Store:LDAP suggests using a filter like: (&(objectClass=posixAccount)(uid=%s)) Then does: $filter =~ s/\%s/$replace/g; Which on a casual gla

Re: [Catalyst] LDAP

2008-01-25 Thread Carl Johnstone
Externally in your organisation? No to an external organisation that has been contracted by us to provide and host a web application. This application needs to share a single sign-on with applications built in-house using Catalyst. For configuration, why don't you have one set and reference

Re: [Catalyst] LDAP

2008-01-28 Thread Carl Johnstone
From: "Gavin Henry" <[EMAIL PROTECTED]> Ah, ok. What Directory server are you using btw? openldap Carl ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-arc

Re: [Catalyst] Development environments and performance

2008-01-28 Thread Carl Johnstone
From: "Jonathan Rockway" <[EMAIL PROTECTED]> If you are using the same Apache process for more than one web app, You're Doing It Wrong (tm). For development or production? In production as long as you're using the same versions of Cat for your apps, I would've thought the memory gains would m

Re: [Catalyst] Distributed session storage problems/questions

2008-02-21 Thread Carl Johnstone
4. Is it just crazy to run a load balanced setup without some type of sticky session setup on the proxy? If so, any implementations of this using Apache 2.x mod_proxy(_balancer) as the frontend would be greatly appreciated. < You should only use "sticky sessions" as a performance enhancer (