Re: [Catalyst] Re: question for mst : using $c-config-{blah} ...

2008-08-04 Thread Daniel McBrearty
On Mon, Aug 4, 2008 at 11:14 AM, Matt S Trout [EMAIL PROTECTED] wrote: On Sun, Aug 03, 2008 at 06:30:02PM +0200, Daniel McBrearty wrote: wait, it is on $self not $c, so my reservations don't really apply. but what about reall config stuff that can change from one installation to another

[Catalyst] question for mst : using $c-config-{blah} ...

2008-08-03 Thread Daniel McBrearty
(snip from another thread ...) You should never, ever EVER access $self-config in a model, view or controller object. Your config value will be in $self-{key}. It's considered normal to do package My::Controller::Foo; use strict; use warnings; use parent qw(Catalyst::Controller);

[Catalyst] Re: question for mst : using $c-config-{blah} ...

2008-08-03 Thread Daniel McBrearty
wait, it is on $self not $c, so my reservations don't really apply. but what about reall config stuff that can change from one installation to another? then you have to do $c-config-{my_var}, right? On Sun, Aug 3, 2008 at 6:16 PM, Daniel McBrearty [EMAIL PROTECTED] wrote: (snip from another

Re: [Catalyst] Squatting::On::Catalyst

2008-07-30 Thread Daniel McBrearty
The usual way to make things like this work is by having a standardised api. In the case of membership for a website, it might look something like: get_unique_user_id # of logged in user get_username_for_id( id ) Then if a forum has tables such as: thread - references username post - ditto and

Re: [Catalyst] Squatting::On::Catalyst

2008-07-29 Thread Daniel McBrearty
my 0.05 (possibly a bit OT) : I looked previously at a few ways of adding forums etc to the site using 3rd party code, indeed there are many possibilites (some perl, some not) The thing that was always a sticker for me was getting some kind of logical integration, ie: 1. letting users keep

Re: [Catalyst] Squatting::On::Catalyst

2008-07-29 Thread Daniel McBrearty
. Doesn't claco have a project that addresses that? On Tue, Jul 29, 2008 at 3:08 PM, Chisel Wright [EMAIL PROTECTED] wrote: On Tue, Jul 29, 2008 at 02:21:10PM +0200, Daniel McBrearty wrote: 1. letting users keep existing member and login creds 2. being able to cross ref to other parts of the site

Re: [Catalyst] Preventing simultaneous logins

2008-07-26 Thread Daniel McBrearty
Thanks Matt, I'll definitely try this when I get round to trying to solve this issue. Where does MyApp::set_athenticated get called from? when the user logs in? no, that can't be it ... you're way ahead of me here :-) ... 1. checking whether there is an existing session associated this

Re: [Catalyst] Preventing simultaneous logins

2008-07-25 Thread Daniel McBrearty
1. checking whether there is an existing session associated this username Session::PerUser ? I looked briefly at this, but I'm a bit wary because C::P::Session::Store::Fastmmap warns against being used with it. What is PerUser doing that is special in that respect, and what is a good backend

[Catalyst] Preventing simultaneous logins

2008-07-23 Thread Daniel McBrearty
I'm using Cat with a pretty standard configuration of : Catalyst::Plugin::Authentication Catalyst::Plugin::Session Catalyst::Plugin::Session::State::Cookie Catalyst::Plugin::Session::Store::FastMmap to handle login and session management. My login code looks like this: my $u =

Re: [Catalyst] Preventing simultaneous logins

2008-07-23 Thread Daniel McBrearty
indeed, it is use case dependent. The use case here is a common one, free content, paid content, you don't want users giving their creds to all their friends and using it simultaneously. (It is at best a first order solution, obviously if it becomes obvious that a fair percentage are using the

Re: [Dbix-class] Re: [Catalyst] untainting utf8 text for db

2008-06-08 Thread Daniel McBrearty
thanks! I've wondered about that. I'd like to see a formal definition of what does get through that filter. Hard to test it on, say, Mandarin CHinese when you don't know the language yourself. But I've a decent database of existing content, I could see if any of that fails this test. Thanks!

Re: [Dbix-class] Re: [Catalyst] untainting utf8 text for db

2008-06-07 Thread Daniel McBrearty
://www.WebsenseSecurityLabs.com -- -Original Message- From: Daniel McBrearty [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2008 11:07 PM To: The elegant MVC web framework Cc: DBIx::Class user and developer list Subject: [Dbix-class] Re: [Catalyst] untainting utf8

Re: [Catalyst] untainting utf8 text for db

2008-06-06 Thread Daniel McBrearty
Thanks for the suggestions. Indeed, specifying a list of chars which is clean (e.g. [a-zA-Z0-9_] for a username in English) is optimum, and I prefer that. But when you are working with fully multilingual material, this becomes pretty much impossible. As the site in question is all about language

Re: [Catalyst] untainting utf8 text for db

2008-06-05 Thread Daniel McBrearty
yes, that's what I meant. but does using the DBIx::Class construct sanitise, provide safety and prevent unwanted babies though? IIRC it does for creating records. On Thu, Jun 5, 2008 at 8:10 PM, Ash Berlin [EMAIL PROTECTED] wrote: On 5 Jun 2008, at 19:05, Daniel McBrearty wrote: database

Re: [Catalyst] Anybody who fancies some LWP poking ...

2008-05-10 Thread Daniel McBrearty
I think there was some discussion over the same error in the POE HTTP client over on perlmonks that included a this is the line of code that is wrong. I can't find the link offhand though. well, I see really three places to look at this: 1. in HTTP::Message - IMO the check on the content is

Re: [Catalyst] Anybody who fancies some LWP poking ...

2008-05-07 Thread Daniel McBrearty
Not sure who that's pointed at Matt, but if you mean me, sorry for that. In all honesty, if I could've worked out *what* needed fixing and where, I would have done so. What I did was at least try to indicate to people where the error was coming from and why, and what they might do temporarily in

Re: [Catalyst] Anybody who fancies some LWP poking ...

2008-05-05 Thread Daniel McBrearty
If you don't want new versions of modules, then *don't upgrade them*. and when you (or a total newcomer to the language/framework) do a *new* install? and the latest greatest is broken right out of the box? looks great, hey? The code may have been broken - but not so broken that it couldn't work

Re: [Catalyst] Multi-language and REST

2008-05-04 Thread Daniel McBrearty
Haven't been looking in here for a while, just saw this thread. I have a multilingual app at http://www.engoi.com which uses Chained to do this. It works really well, and makes Do Not Repeat Yourself quite easy to achieve. In fact, for many actions, *two* languages are selected - the native and

Re: [Catalyst] Anybody who fancies some LWP poking ...

2008-05-04 Thread Daniel McBrearty
yeah, I started setting up cat on a new system yesterday and hit this :-( The salient line seems to be : HTTP::Message content not bytes at lib/Test/WWW/Mechanize/Catalyst.pm line 88 I will spend an hour or two on it now, as I hate force installing, but am starting almost from scratch and don't

Re: [Catalyst] Anybody who fancies some LWP poking ...

2008-05-04 Thread Daniel McBrearty
://rt.cpan.org/Public/Bug/Display.html?id=34802 I forwarded this to Leon also. HTH D On Sun, May 4, 2008 at 9:30 PM, Daniel McBrearty [EMAIL PROTECTED] wrote: yeah, I started setting up cat on a new system yesterday and hit this :-( The salient line seems to be : HTTP::Message content not bytes at lib

Re: [Catalyst] Re: [Dbix-class] Re: utf8 / pg double encoding problem

2008-01-09 Thread Daniel McBrearty
and JSON::Any. JSON::XS is one of, if not the, fastest serializers in all data classes and its utf8 handling is better. JSON now, IIRC, calls it if it's present instead of its older Perl version. -Ashley On Jan 7, 2008, at 7:57 AM, Daniel McBrearty wrote: Data is actually sent in URI encoded

[Catalyst] Re: [Dbix-class] Re: utf8 / pg double encoding problem

2008-01-07 Thread Daniel McBrearty
well, the moral is probably never work on your code when recovering from flu. It was pretty much a self-induced problem. I have a system where the user submits a value, and the value is copied back to them. If there is a network problem with corruption of the data, they will see it, as the

Re: [Catalyst] utf8 / pg double encoding problem

2008-01-06 Thread Daniel McBrearty
, Andrew Rodland [EMAIL PROTECTED] wrote: On Saturday 05 January 2008 04:54:59 pm Daniel McBrearty wrote: well I'm damned, I thought I had this stuff working squeaky clean. But I was wrong. I actually had two bugs cancelling each other out - usually. [snip] --' [debug] abçöeü [debug] $VAR1 = ab

[Catalyst] Re: [Dbix-class] Re: utf8 / pg double encoding problem

2008-01-06 Thread Daniel McBrearty
because it is utf8? shouldn't it be? On Jan 6, 2008 1:29 AM, Aristotle Pagaltzis [EMAIL PROTECTED] wrote: * Daniel McBrearty [EMAIL PROTECTED] [2008-01-06 00:00]: [debug] abçöeü [debug] $VAR1 = ab\x{c3}\x{a7}\x{c3}\x{b6}e\x{c3}\x{bc}; [debug] it's UTF8! Err, why doesn't Dumper say ab\x

[Catalyst] Re: [Dbix-class] Re: utf8 / pg double encoding problem

2008-01-06 Thread Daniel McBrearty
so do you mean that Dumper should be seeing and outputting this as a char sequence? (what it actually shows is a mix of chars and hex bytes, in fact ...) On Jan 6, 2008 2:08 PM, Aristotle Pagaltzis [EMAIL PROTECTED] wrote: * Daniel McBrearty [EMAIL PROTECTED] [2008-01-06 13:30]: On Jan 6, 2008

[Catalyst] Re: [Dbix-class] Re: utf8 / pg double encoding problem

2008-01-06 Thread Daniel McBrearty
In any case the raw HTTP request that leads to all this would be interesting. I can tell you that the data in the raw request is just the 9 bytes of UTF8, exactly as shown by Dumper. I looked at it with wireshark to be sure. To give some background, this is getting pulled out of a form by

Re: [Catalyst] javascript in Catalyst using Template Toolkit

2007-12-21 Thread Daniel McBrearty
My experience is that every time I think I -can- make that assumption, later I end up really wishing I could deploy my app to a sub-URL for testing or similar. You may not have such bad luck, but I don't like to take that chance these days :) If I hit that one (needing to test code on the

[Catalyst] [OT] stupid Universal:CAN warnings in make test

2007-12-21 Thread Daniel McBrearty
this is really bugging me. It happens almost every time I update some modules or install cat ... Called UNIVERSAL::CAN as a function, not a method ... at Template::Iterator blah blah about 1000 times in a typical make test. I did once look for what causes it, it seems to be a rather

Re: [Catalyst] [OT] ASP.NET MVC#

2007-12-21 Thread Daniel McBrearty
@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com

Re: [Catalyst] [OT] stupid Universal:CAN warnings in make test

2007-12-21 Thread Daniel McBrearty
please excuse my muttering to myself here. the issue seems to be that they did the bugfix with ref not blessed ... aargh. chromatic's doc does say quite clearly though. seems to be in two places in TT. the main reason i'm twittering about it is that if anyone can see that i am about to make an

Re: [Catalyst] [OT] stupid Universal:CAN warnings in make test

2007-12-21 Thread Daniel McBrearty
in fact, it's done since some time ... http://rt.cpan.org/Public/Bug/Display.html?id=25468 ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL

Re: [Catalyst] Re: javascript in Catalyst using Template Toolkit

2007-12-21 Thread Daniel McBrearty
heh. i'm picturing how that request would have gone over with the firewall group at the last fortune 500 i worked for. yes kevin, under those circumstances you likely wouldn't do it that way. on the other hand, if you are running your app on a server that you own and do admin for, and don't

Re: [Catalyst] [OT] ASP.NET MVC

2007-12-17 Thread Daniel McBrearty
The chained thing is probably the single most useful thing in cat IMO (if it's possible to even make such a dumb call ;) The way I have come to see it (it took a while, reading discussions here helped me grasp this) is that the way you design your URI space is very very fundamental to design of a

Re: [Catalyst] [OT] ASP.NET MVC

2007-12-17 Thread Daniel McBrearty
I'd love to *get* reaction, but last time I tried (admittedly a long time back) I had to scrape my brains off the ceiling ... (and I don't really have enough to go round for that kind of thing) ... ___ List: Catalyst@lists.scsys.co.uk Listinfo:

Re: [Catalyst] Web hosting?

2007-12-16 Thread Daniel McBrearty
, also very impressive. The web interface is also neat and hadny for quick checks. These virtual servers are so good and cheap that you'd be nuts to do it any other way, unless you are very budget constrained indeed. -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http

Re: [Catalyst] Web hosting?

2007-12-16 Thread Daniel McBrearty
On Dec 16, 2007 7:15 PM, Matt Rosin [EMAIL PROTECTED] wrote: What distro are you using I'm curious. I use a Debian 4.0 image that they had. It's been very good so far. I always use Deb/Ubuntu pretty much. ___ List: Catalyst@lists.scsys.co.uk Listinfo:

[Catalyst] backward compatibility problem with new C::P::Authentication (for info only)

2007-12-13 Thread Daniel McBrearty
Hi, I don't consider this a bug, it's just by way of feedback to the list and module authors. I just updated to the latest C::P::Authentication and now get errors in my login code in some places. My code looks basically like this (simplified a bit) : sub login Chained('/') Args(0) : { # first

Re: [Catalyst] backward compatibility problem with new C::P::Authentication (for info only)

2007-12-13 Thread Daniel McBrearty
I still had -Authentication::Credential::Password -Authentication::Store::DBIC in the modules list, from the old setup. Removing these seems to have fixed the problem. ___ List: Catalyst@lists.scsys.co.uk Listinfo: