Re: [Catalyst] Alternatives to Catalyst ?

2010-04-26 Thread Ben van Staveren
If using ->params->{name} (i.e. the direct hash approach) is like juggling grenades - then what is like using the ->param( 'name' ) way of doing it? Actually ->params->{name} is the juggling teddybears one (the "proper" way to do it). If you do $c->{request}->{params}->{name} - that's the

Re: [Catalyst] Alternatives to Catalyst ?

2010-04-26 Thread Ben van Staveren
Hi Paul, Don't get me wrong, but my opinion is pretty much opposite from yours, if people come and ask a good question (which Dermot did), and seem to be -not- total noobs, then they get a free CompSci lesson to go with the answer they've gotten :) Maybe that's just me, but I always like kno

Re: [Catalyst] Suggestions for iPhone version of app

2010-04-26 Thread Chris
On Tue, Apr 27, 2010 at 12:22 AM, Steve Nolte wrote: > We have a Catalyst app that we are looking to also make available through an > iPhone interface. I had good results with iUI to get iPhone native look-and-feel in a Catalyst web app. It's fairly basic, but I only needed basic.. - Chris ___

[Catalyst] Re: Alternatives to Catalyst ?

2010-04-26 Thread Aristotle Pagaltzis
* Zbigniew Lukasiak [2010-04-26 12:25]: > This is a fine advice - but unfortunately the ->param method > call suffers from additional problem - which is described in > much detail in the documentation (go to the NOTE at: > http://search.cpan.org/~bobtfish/Catalyst-Runtime-5.80022/lib/Catalyst/Requ

Re: [Catalyst] Alternatives to Catalyst ?

2010-04-26 Thread Stuart Watt
Part of the point, surely, is that we don't (want to) know what is inside $c/$c->request (or any other Catalyst structure). The "direct hash" could easily be a tied something-or-other inside, as is the case with CGI when you use the Vars accessor. So just because it looks like a direct hash, yo

Re: [Catalyst] Alternatives to Catalyst ?

2010-04-26 Thread J. Shirley
On Mon, Apr 26, 2010 at 1:51 PM, Zbigniew Lukasiak wrote: > On Mon, Apr 26, 2010 at 1:26 PM, Ben van Staveren > wrote: >> >> Because if you are working with, say, 10 people on a team, and you will have >> everyone merrily doing direct hash accesses, sooner or later, someone's >> going to fuck it

Re: [Catalyst] Alternatives to Catalyst ?

2010-04-26 Thread Zbigniew Lukasiak
On Mon, Apr 26, 2010 at 1:26 PM, Ben van Staveren wrote: > > Because if you are working with, say, 10 people on a team, and you will have > everyone merrily doing direct hash accesses, sooner or later, someone's > going to fuck it up and something will break in a spectacular > fashion. > > > I tak

Re: [Catalyst] Alternatives to Catalyst ?

2010-04-26 Thread Lyle
Paul Makepeace wrote: Except that he gave context & obvious (to me at least) understanding. I agree in some situations it's clear the poster is asking something where they need some steering and/or "XY Problem" but my call is that we give posters some credit, esp where it's clearly due. Hav

Re: [Catalyst] Alternatives to Catalyst ?

2010-04-26 Thread Paul Makepeace
On Mon, Apr 26, 2010 at 12:48, Wade Stuart wrote: > (Replying in general, to the sense of this email which others have related > too) >> >> Dermot, to my reading at least, has been clear twice now that he was >> asking specifically about how to retrieve parameters -- presumably not >> coming to a

[Catalyst] Pre-Moose version of Catalyst and all plugins?

2010-04-26 Thread Kee Hinckley
I'm trying to get some old code running in a hurry. Unfortunately Moose has completely fouled things up.First it broke my use of Error.pm (conflict with "with"). Fortunately I didn't use "with", and could just comment it out. But what I did have was my own Error subclass that was the Catalyst Ex

Re: [Catalyst] Alternatives to Catalyst ?

2010-04-26 Thread kevin montuori
On Mon, Apr 26, 2010 at 3:48 PM, Wade Stuart wrote: > Sorry,  it is akin to someone driving up to you while you are in a gas > station in a unleaded ford asking very nicely "Do you know where the diesel > pumps are"?  The question is literate and well formed but in context implies > lack of under

Re: [Catalyst] Alternatives to Catalyst ?

2010-04-26 Thread Wade Stuart
(Replying in general, to the sense of this email which others have related too) > > Dermot, to my reading at least, has been clear twice now that he was > asking specifically about how to retrieve parameters -- presumably not > coming to a web framework list for an unsolicited computer science > l

Re: [Catalyst] Alternatives to Catalyst ?

2010-04-26 Thread Paul Makepeace
> Even if you're not, direct hash accessing is basically akin to juggling > grenades. It might go right for a long time, but eventually the pin's going > to come out and there will be a very messy BLAM. > > Even if it is code you just write for yourself, still doesn't hurt to make > sure you avoid

Re: [Catalyst] Using Jquery UI Autocomplete widget with Catalyst::View::JSON

2010-04-26 Thread Alexander Hartmaier
HRI will return prefetched rels too, get_columns won't. -- Best regards, Alex Am Montag, den 26.04.2010, 17:23 +0200 schrieb Ben van Staveren: > Used it but at the same time, doing my $hashref = > { $row->get_columns } got me more or less the same effect for a lot > less hassle :) > > I actually

Re: [Catalyst] Using Jquery UI Autocomplete widget with Catalyst::View::JSON

2010-04-26 Thread Ben van Staveren
Used it but at the same time, doing my $hashref = { $row->get_columns } got me more or less the same effect for a lot less hassle :) I actually do this for most my DB objects that get serialised to JSON, quite simple case of $c->stash->{json} = [ map { $_->get_columns } $rs->all ]; In a simi

RE: [Catalyst] Suggestions for iPhone version of app

2010-04-26 Thread Steve Nolte
> HTTP::BrowserDetect gives you the detection, and you could setup a > separate view for those templates with a fallback to the previous > templates. > > You configure the secondary view with multiple paths (INCLUDE_PATH), > so you can override any template (just by it existing in the first > dir)

Re: [Catalyst] Using Jquery UI Autocomplete widget with Catalyst::View::JSON

2010-04-26 Thread Lee Aylward
On Mon, 26 Apr 2010 16:33:31 +0700 Ben van Staveren wrote: > Probably not the most pretty one but: > > Given you have a resultset obtained with, say, > > my $result_set = $c->model('DB::Somedata')->search_rs({...}, {...}); > > $c->stash->{json} = [ > map { id => $_->id, label => $_->name } (

Re: [Catalyst] Suggestions for iPhone version of app

2010-04-26 Thread J. Shirley
On Mon, Apr 26, 2010 at 7:47 AM, Steve Nolte wrote: >> On 4/26/2010 10:22 AM, Steve Nolte wrote: >> > And any frameworks, such as jQTouch, to recommend or stay away from? >> >> I've heard good things about http://www.phonegap.com/ > > Thanks for the PhoneGap suggestions, but to clarify I'm looking

RE: [Catalyst] Suggestions for iPhone version of app

2010-04-26 Thread Steve Nolte
> On 4/26/2010 10:22 AM, Steve Nolte wrote: > > And any frameworks, such as jQTouch, to recommend or stay away from? > > I've heard good things about http://www.phonegap.com/ Thanks for the PhoneGap suggestions, but to clarify I'm looking for something to first help me build the iPhone version o

Re: [Catalyst] Suggestions for iPhone version of app

2010-04-26 Thread Jacob Helwig
On Mon, Apr 26, 2010 at 07:40, Peter Edwards wrote: > > On 26 April 2010 15:35, Jim Spath wrote: >> >> On 4/26/2010 10:22 AM, Steve Nolte wrote: >>> >>> And any frameworks, such as jQTouch, to recommend or stay away from? >> >> I've heard good things about http://www.phonegap.com/ > > Watch out f

Re: [Catalyst] Suggestions for iPhone version of app

2010-04-26 Thread Peter Edwards
On 26 April 2010 15:35, Jim Spath wrote: > On 4/26/2010 10:22 AM, Steve Nolte wrote: > >> And any frameworks, such as jQTouch, to recommend or stay away from? >> > > I've heard good things about http://www.phonegap.com/ > > Watch out for Apple's restrictive policy http://blogs.zdnet.com/Burnette

Re: [Catalyst] Suggestions for iPhone version of app

2010-04-26 Thread Jim Spath
On 4/26/2010 10:22 AM, Steve Nolte wrote: And any frameworks, such as jQTouch, to recommend or stay away from? I've heard good things about http://www.phonegap.com/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailm

[Catalyst] Suggestions for iPhone version of app

2010-04-26 Thread Steve Nolte
We have a Catalyst app that we are looking to also make available through an iPhone interface. Does anyone have any suggestions or experiences to share on how to implement this? For example, since we're using TT, would a duplicate set of templates that are updated for a mobile version be smart

Re: [Catalyst] Alternatives to Catalyst ?

2010-04-26 Thread Ben van Staveren
Because if you are working with, say, 10 people on a team, and you will have everyone merrily doing direct hash accesses, sooner or later, someone's going to fuck it up and something will break in a spectacular > fashion. I take your point even though I am not in a team. Even if you

Re: [Catalyst] Alternatives to Catalyst ?

2010-04-26 Thread Dermot
On 26 April 2010 12:02, Ovid wrote: > - Original Message >> From: Dermot > > >> 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 >> si

Re: [Catalyst] Alternatives to Catalyst ?

2010-04-26 Thread Ovid
- Original Message > From: Dermot > 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 mat

Re: [Catalyst] Alternatives to Catalyst ?

2010-04-26 Thread Ben van Staveren
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 but simply establishin

Re: [Catalyst] Alternatives to Catalyst ?

2010-04-26 Thread Dermot
On 26 April 2010 11:22, Zbigniew Lukasiak wrote: > On Mon, Apr 26, 2010 at 10:57 AM, Ævar Arnfjörð Bjarmason > wrote: >> On Mon, Apr 26, 2010 at 09:36, Dermot wrote: >>> On 21 April 2010 18:01, J. Shirley wrote: __END__ Benchmark: running all, low, sep for at least 1 CPU seconds... >>

Re: [Catalyst] Alternatives to Catalyst ?

2010-04-26 Thread Zbigniew Lukasiak
On Mon, Apr 26, 2010 at 10:57 AM, Ævar Arnfjörð Bjarmason wrote: > On Mon, Apr 26, 2010 at 09:36, Dermot wrote: >> On 21 April 2010 18:01, J. Shirley wrote: >>> __END__ >>> Benchmark: running all, low, sep for at least 1 CPU seconds... >>>       all:  1 wallclock secs ( 1.11 usr +  0.00 sys =  1

Re: [Catalyst] Alternatives to Catalyst ?

2010-04-26 Thread Octavian Rasnita
scalar value, but it could also return an array if it is called in list context. So it might break the code if multiple values were sent for the same variable. Octavian __ Information from ESET NOD32 Antivirus, version of virus signature database 5061 (20100426) __ The m

Re: [Catalyst] Dist::Zilla + Catalyst?

2010-04-26 Thread John SJ Anderson
On Apr 25, 2010, at 12:10 , Ævar Arnfjörð Bjarmason wrote: > On Sun, Apr 25, 2010 at 15:39, John SJ Anderson wrote: >> Is anybody using Dist::Zilla in combination with Catalyst? If so, are you >> just not using it to generate your Makefile.PL or are you working around the >> issues that presen

Re: [Catalyst] Alternatives to Catalyst ?

2010-04-26 Thread Ævar Arnfjörð Bjarmason
On Mon, Apr 26, 2010 at 09:36, Dermot wrote: > On 21 April 2010 18:01, J. Shirley wrote: >> __END__ >> Benchmark: running all, low, sep for at least 1 CPU seconds... >>       all:  1 wallclock secs ( 1.11 usr +  0.00 sys =  1.11 CPU) @ >> 2917341.44/s (n=3238249) >>       low:  0 wallclock secs (

Re: [Catalyst] Alternatives to Catalyst ?

2010-04-26 Thread Tobias Kremer
> Now that it's quietened down, I can ask a question. Does this I mean> it's > preferable to use > $c->req->{parameters}->{foo} > rather than > $c->req->param('foo') AFAIK, the preferred way is: $c->req->params->{ 'foo' } --Toby ___ List: Catalyst@li

Re: [Catalyst] Alternatives to Catalyst ?

2010-04-26 Thread Dermot
On 21 April 2010 18:01, J. Shirley wrote: > > __END__ > Benchmark: running all, low, sep for at least 1 CPU seconds... >       all:  1 wallclock secs ( 1.11 usr +  0.00 sys =  1.11 CPU) @ > 2917341.44/s (n=3238249) >       low:  0 wallclock secs ( 1.27 usr +  0.04 sys =  1.31 CPU) @ > 12930179.39

Re: [Catalyst] Using Jquery UI Autocomplete widget with Catalyst::View::JSON

2010-04-26 Thread Ben van Staveren
Probably not the most pretty one but: Given you have a resultset obtained with, say, my $result_set = $c->model('DB::Somedata')->search_rs({...}, {...}); $c->stash->{json} = [ map { id => $_->id, label => $_->name } ($result_set->all) ]; Or a bit more verbose: foreach my $result ($result_se

Re: [Catalyst] Using Jquery UI Autocomplete widget with Catalyst::View::JSON

2010-04-26 Thread Hetényi Csaba
Ahh! That was the trick :))) (expose_stash => 'json') Now it is correctly translate the perl arrayref datastructure to JSON array ( [ ... ] ) my @aoh = ( { value => "1", label => "betty", }, { value => "2", label=> "jane", }, {

Re: [Catalyst] Using Jquery UI Autocomplete widget with Catalyst::View::JSON

2010-04-26 Thread Hetényi Csaba
Dear Ben van Staveren Thank You, now it is working, but in this case, i don't know why to use Catalyst::View::JSON, it is just a text formatting. Later I'd like to use DBIx datasource to feed autocomplete plugin, in this case i must manually build a special JSON formatted string. Is there exist a

Re: [Catalyst] Using Jquery UI Autocomplete widget with Catalyst::View::JSON

2010-04-26 Thread Ben van Staveren
You can do that with View::JSON :) Just read the docs though, the reason it didn't work is that you put your data in $c->stash->{json} = [ ... ] And View::JSON will attempt to turn your entire stash into JSON data :) And it does that bit correctly, but the thing you end up with is { json: [