Re: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-07 Thread Matt Lawrence
Stefan Kühn wrote: GERMAN UMLAUT HERE: ___\xFC\xFC\xFC___ AFAIK, single-byte-width \xxx escapes are always treated as bytes, not as characters. Even if they are outside the 7-bit range, and even in the presence of the utf8 pragma. Try inserting real Unicode characters into the string,

Re: [Catalyst] TT and UNICODE: Garbled special characters

2007-09-07 Thread Matt Lawrence
Matt Lawrence wrote: Stefan Kühn wrote: GERMAN UMLAUT HERE: ___\xFC\xFC\xFC___ AFAIK, single-byte-width \xxx escapes are always treated as bytes, not as characters. Even if they are outside the 7-bit range, and even in the presence of the utf8 pragma. Try inserting real

Re: [Catalyst] DBIx question

2007-08-24 Thread Matt Lawrence
Will Smith wrote: Hi, I know this is not the room for DBIx, I tried to post in DBIx, but did not go through, so, if you don't mind, please do not bounce me out. my question is: I have a multiple join, and trying to sort the dataset using oder_by, and get either error, or do not sort. my code

[Catalyst] Broken ebuild in catalyst overlay

2007-08-15 Thread Matt Lawrence
The ebuild for Data::FormValidator version 4.51 is missing a dependency on Perl6::Junction I've attached an ebuild. Matt # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # This ebuild generated by g-cpan 0.15.0 inherit perl-module

Re: [Catalyst] Catalyst Unicode woes ...

2007-08-09 Thread Matt Lawrence
Pedro Melo wrote: Hi, On Aug 9, 2007, at 9:27 AM, Tobias Kremer wrote: Following up on a conversion I started on the DateTime mailing-list I'd like to ask if it is really neccessary to use C::P::Unicode if a site uses utf8-encoding? Also if you use open(), make sure you use the three

Re: [Catalyst] TT2 + CP::Authentication + DBIC gotcha

2007-07-13 Thread Matt Lawrence
Perrin Harkins wrote: On 7/13/07, apv [EMAIL PROTECTED] wrote: [% vote = Catalyst.user.votes({word = w.id}) IF Catalyst.user_exists %] Just FYI, you should never do this type of construct in perl. It will break in bizarre ways. I doubt that's the issue with TT, but don't get in the habit.

Re: [Catalyst] TT2 + CP::Authentication + DBIC gotcha

2007-07-13 Thread Matt Lawrence
stephen joseph butler wrote: On 7/13/07, Matt Lawrence [EMAIL PROTECTED] wrote: Perrin Harkins wrote: my $vote = $foo if ($bar); # --- bad! What's wrong with that? I find it a lot more readable than my $vote; if ($bar) { $vote = $foo; } It doesn't work this way, but suppose you wrote

Re: [Catalyst] TT2 + CP::Authentication + DBIC gotcha

2007-07-13 Thread Matt Lawrence
Matt S Trout wrote: On Fri, Jul 13, 2007 at 05:31:53PM +0100, Matt Lawrence wrote: stephen joseph butler wrote: On 7/13/07, Matt Lawrence [EMAIL PROTECTED] wrote: I can't replicate this behaviour. As far as I can tell, the postfix if is identical to the block if I wrote above

Re: [Catalyst] test server with -host

2007-06-19 Thread Matt Lawrence
Daniel McBrearty wrote: Then I can see the page on the linux guest (the dev m/c), on the host it appears but is VERY slow if I ask for it by ip address, but no problem when I just ask for localhost on the dev m/c. (WIth lighty there is noticeable delay.) Anyhow, whatever the problem is it

Re: [Catalyst] setup() called twice

2007-06-19 Thread Matt Lawrence
Quinn Weaver wrote: On Mon Jun 18 20:04:09 GMT 2007, Matt Trout wrote: No it isn't. The redefine means it -isn't- called a second time. Yes it is. You can verify this by running myapp_server.pl under the debugger, or by putting lines like this in MyApp::setup: warn setup called

Re: [Catalyst] setup() called twice

2007-06-19 Thread Matt Lawrence
Matt S Trout wrote: On Tue, Jun 19, 2007 at 09:50:30AM +0100, Matt Lawrence wrote: What's wrong with: $_-setup for keys %{$self-_plugins}; Setup order matters. Fine, the order is known in setup(), but gets discarded. $class-setup_plugins($flags-{plugins}); ... # Call plugins

Re: [Catalyst] setup() called twice

2007-06-19 Thread Matt Lawrence
Matt S Trout wrote: On Tue, Jun 19, 2007 at 04:52:08PM +0100, Matt Lawrence wrote: Matt S Trout wrote: On Tue, Jun 19, 2007 at 09:50:30AM +0100, Matt Lawrence wrote: What's wrong with: $_-setup for keys %{$self-_plugins}; Setup order matters. Fine

Re: [Catalyst] getting $c in model unit test

2007-05-18 Thread Matt Lawrence
Matt S Trout wrote: Erm. I was more thinking returning it after a prepare but with -req populated. The idea for me would be for unit testing controllers/views (and any model code that uses ACCEPT_CONTEXT). Of course, if you wanted you could then call -dispatch and then -finalize

Re: [Catalyst] getting $c in model unit test

2007-05-17 Thread Matt Lawrence
Matt S Trout wrote: On Wed, May 16, 2007 at 10:11:56AM +0100, Matt Lawrence wrote: Ah yes. You don't normally forward to a Model. If you're testing a controller (or, I suppose, a view), it's best to forward, otherwise you get a similar error if the controller method you're calling forwards

Re: [Catalyst] getting $c in model unit test

2007-05-16 Thread Matt Lawrence
Nathan Gray wrote: On Tue, May 15, 2007 at 03:32:31PM +0100, Matt Lawrence wrote: Nathan Gray wrote: I would like to test a model with a unit test. Catalyst kindly generates stub unit tests for models, but it does not include a stub showing how to instantiate the context object

Re: [Catalyst] unit testing Chuck Norris style

2007-04-17 Thread Matt Lawrence
Andrew Strader wrote: I have a question about writing unit tests for a Catalyst app. I've found it's extremely useful to have internal controller tests, as described on http://www.catalystframework.org/calendar/2006/17 (Chuck Norris tests his Catalyst controllers with Test::More). The basic

Re: [Catalyst] unit testing Chuck Norris style

2007-04-17 Thread Matt Lawrence
Ash Berlin wrote: Andrew Strader wrote: [snip] I see no round house kicks .. until it's too late! ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive:

Re: [Catalyst] putting an object in the stash

2007-03-13 Thread Matt Lawrence
Bogdan Lucaciu wrote: On Tuesday 13 March 2007 15:06, Octavian Rasnita wrote: my $model = $c-model(Database::Table); foreach my $column (@{$model-columns}) { $column =~ s{me\.}{}; # strip the prefix DBIC adds $c-stash-{$column} = $obj-$column; } I have tried that, but it gave

Re: [Catalyst] assigning vars to $c-stash

2007-03-12 Thread Matt Lawrence
Carl Franks wrote: On 12/03/07, Octavian Rasnita [EMAIL PROTECTED] wrote: I have a $hash hash reference and I want to add all its elements to the stash. How can I do this? Do I need to use a loop and assign each element one by one? I have seen that it is not possible to use $c-stash = $hash;

Re: [Catalyst] Chained, slashes, and escaping

2007-03-06 Thread Matt Lawrence
Jim Spath wrote: I'm implementing tagging under Catalyst and want to be as unrestrictive as possible on the tag text. As such, I allow slashes in the tag text. To view information on a given tag, you hit the following path: /tag/URI_ESCAPED_TAG Which uses the following action in the Tag