Re: [Catalyst] Re: BBC's "Perl on Rails" nuttiness
Another data point, was looking at that neat ExtJS in catalyst advent calendar. Siemens uses it. They need someone who gets it on top to plow away resistance or put high profile public interfaces in a different data center maybe where they can both put eye candy and get reliable support. Anyone know of one in England? But I heard some other part of BBC uses Catalyst. So maybe those guys already found a champion. Incidentally I saw ExtJS seems to be used in a financial graphing program that resembles what another person on this list asked about recently. P.P.S. Just wanted to mention that I still haven't gotten around to setting up a new server but when I do will be putting on some administration portal code and templates as promised earlier. Though it might get pushed onto that great sinkhole called Christmas vacation! Matt R. ___ 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 PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] utf8 in mysql
>> On Sun, 2007-12-02 at 16:41 +0200, Angel Kolev wrote: >>> Hi again :) I found a solution i think. With Encode::Detect i can do: >>> use Encode; >>> require Encode::Detect; >>> my $utf8 = decode("Detect", $data); >> >> Looks like this module uses Mozilla's encoding detector, which does a >> pretty good job in my experience. If you're trying to guess the >> encoding of small pieces of text, though, this method probably won't >> work. The best thing to do is to ask the user what encoding he's using, >> or mandate UTF-8. Angel, Where are you getting the input from? Is it just form submissions on web pages, or are you accepting file uploads or emails or I dunno, CDs sent by post, or files-on-flash-sticks or something? I just ask because there are standard ways to deal with encodings for some of those methods - for websites it's mostly a solved problem, although there are always caveats for people using antique browsers. Toby ___ 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 PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] utf8 in mysql
Having suffered too many wasted hours on encoding detection, I can sum up the best practice in a few sentences: 1) Know your encoding input 2) Know your encoding output requirements 3) If you're guessing ("detecting"), you're going to have some pretty (un)funny results, especially if you can only narrow down your source to "anything from anywhere." If you have an app of mishmashed encodings, I'd highly recommend putting a lot of effort into moving input and output to UTF-8 and not into encoding detection. -Micah On Dec 2, 2007, at 8:11 AM, Jonathan Rockway wrote: On Sun, 2007-12-02 at 16:41 +0200, Angel Kolev wrote: Hi again :) I found a solution i think. With Encode::Detect i can do: use Encode; require Encode::Detect; my $utf8 = decode("Detect", $data); Looks like this module uses Mozilla's encoding detector, which does a pretty good job in my experience. If you're trying to guess the encoding of small pieces of text, though, this method probably won't work. The best thing to do is to ask the user what encoding he's using, or mandate UTF-8. Regards, Jonathan Rockway ___ 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 PROTECTED]/ Dev site: http://dev.catalyst.perl.org/ ___ 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 PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Catalyst::View::JSON parameters
On 12/3/07, Ian Docherty <[EMAIL PROTECTED]> wrote: > I did not fully understand this but I think you are suggesting using this to > create a new JSON > encoder. This is not what I want to do, I just want to pass parameters to an > existing encoder. I didn't mean you want to build an entire new JSON encoder from scratch but there's a way to pass a new encoder object (not necessarily what you build your own) to json_dumper, like $obj->json_dumper(sub { JSON::Any->new(%param)->objToJson($_[0]) }) and you can probably do that in YourApp::View::JSON. -- Tatsuhiko Miyagawa ___ 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 PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Help needed on DBIx::Class::Schema::RestrictWithObject
Hi, I'm trying to realize a resultset filtering with DBIx::Class::Schema::RestrictWithObject but have troubles in understanding how to set things up correctly. What I would like to achieve: Filter resultsets based on data in the Catalyst Session storage. Currently I have: package glueDB; use base qw/DBIx::Class::Schema/; __PACKAGE__->load_components(qw/Schema::RestrictWithObject/); __PACKAGE__->load_classes( { glueDB => [ qw/ Contact::Company ... / ] } ); package glue::Model::glueDB; use base 'Catalyst::Model::DBIC::Schema'; __PACKAGE__->config( schema_class => 'glueDB', connect_info => [ ... ], ); My question: 1. Where do I have to create the restricting object. Do I have to rewrite Catalyst::Model::DBIx::Class? Thanks for your help. Greets, Mario Minati ___ 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 PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Catalyst::View::JSON parameters
A quick patch that works for me, please see if it is compatible with the way you want the code to work. (Apologies if the patch is not correct, I am not too familiar with creating patch files). Tatsuhiko Miyagawa wrote: On 12/3/07, Ian Docherty <[EMAIL PROTECTED]> wrote: On looking at the code for C::V::JSON it creates a new JSON::Any object but does not pass on any 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 Can you s/writing my own/submtiting a patch for/? @@ -9,7 +9,7 @@ use Catalyst::Exception; require JSON::Any; -__PACKAGE__->mk_accessors(qw( allow_callback callback_param expose_stash encoding json_dumper no_x_json_header )); +__PACKAGE__->mk_accessors(qw( params allow_callback callback_param expose_stash encoding json_dumper no_x_json_header )); sub new { my($class, $c, $arguments) = @_; @@ -29,7 +29,7 @@ eval { JSON::Any->import($driver); -my $json = JSON::Any->new; # create the copy of JSON handler +my $json = JSON::Any->new(%{$self->params}); # create the copy of JSON handler $self->json_dumper(sub { $json->objToJson($_[0]) }); }; @@ -134,6 +134,7 @@ MyApp->config({ ... 'View::JSON' => { + params => {pretty => 1, indent => 2}, # pass params to the JSON module allow_callback => 1,# defaults to 0 callback_param => 'cb', # defaults to 'callback' expose_stash=> [ qw(foo bar) ], # defaults to everything ___ 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 PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Catalyst::View::JSON parameters
Tatsuhiko Miyagawa wrote: Catalyst::Views are pure perl classes and objects and in the case of View::JSON, you can set your own JSON encoder to $obj->json_dumper(sub { encode_json() }) without updating the code. I did not fully understand this but I think you are suggesting using this to create a new JSON encoder. This is not what I want to do, I just want to pass parameters to an existing encoder. See my patch. On 12/3/07, Kevin Old <[EMAIL PROTECTED]> wrote: I'd recommend overriding the C::V::JSON in your application (create a Catalyst directory beside the 'lib' directory in your project, make a View directory, then copy JSON.pm into that directory and customize it to your needs. ___ 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 PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
RE: [Catalyst] Re: BBC's "Perl on Rails" nuttiness
From: A. Pagaltzis [mailto:[EMAIL PROTECTED] >http://iamseb.com/seb/2007/12/perl-on-rails-why-the-bbc-fails-at-the-intern et/ OMG. Solaris and Perl 5.6? Dust off and nuke it from orbit. It's the only way to be sure. -Peter ___ 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 PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Catalyst::View::JSON parameters
Catalyst::Views are pure perl classes and objects and in the case of View::JSON, you can set your own JSON encoder to $obj->json_dumper(sub { encode_json() }) without updating the code. On 12/3/07, Kevin Old <[EMAIL PROTECTED]> wrote: > > I'd recommend overriding the C::V::JSON in your application (create a > Catalyst directory beside the 'lib' directory in your project, make a > View directory, then copy JSON.pm into that directory and customize it > to your needs. -- Tatsuhiko Miyagawa ___ 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 PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Catalyst::View::JSON parameters
On 12/3/07, Ian Docherty <[EMAIL PROTECTED]> wrote: > On looking at the code for C::V::JSON it creates a new JSON::Any object > but does not pass on any 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 Can you s/writing my own/submtiting a patch for/? -- Tatsuhiko Miyagawa ___ 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 PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Catalyst::View::JSON parameters
Hi Ian, I've run into this using the XMLSimple module in Catalyst::Action::REST and overwrote that module local to my application. I'd recommend overriding the C::V::JSON in your application (create a Catalyst directory beside the 'lib' directory in your project, make a View directory, then copy JSON.pm into that directory and customize it to your needs. You could then send that version to the modules author and see if they'll incorporate the changes. If they don't at least you have a working version for your app and can continue developing. Hope this helps, Kevin On Dec 3, 2007 2:48 PM, Ian Docherty <[EMAIL PROTECTED]> wrote: > I am trying to set the 'autoconv' flag for JSON so that numbers are > quoted (it seems that Ext JS API requires it) > > I can't see any way to pass options to JSON through Catalyst::View::JSON > > On looking at the code for C::V::JSON it creates a new JSON::Any object > but does not pass on any 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: 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/ > -- Kevin Old [EMAIL PROTECTED] ___ 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 PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Catalyst::View::JSON parameters
I am trying to set the 'autoconv' flag for JSON so that numbers are quoted (it seems that Ext JS API requires it) I can't see any way to pass options to JSON through Catalyst::View::JSON On looking at the code for C::V::JSON it creates a new JSON::Any object but does not pass on any 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: 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/
[Catalyst] Re: BBC's "Perl on Rails" nuttiness
http://iamseb.com/seb/2007/12/perl-on-rails-why-the-bbc-fails-at-the-internet/ ___ 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 PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] BBC's "Perl on Rails" nuttiness
Dave Howorth <[EMAIL PROTECTED]> wrote on 12/03/2007 05:44:06 AM: > >>> 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, without an extensive > >>> testing period to make sure it works with all existing > applications. The > >>> trouble with this is that it is easier to > >>> keep stable (or work around existing known problems) by not installing > >>> anything new. > >>> > >> Sure - but as I understand BBC is their client and this policy makes > >> the life of BBC programmers pretty miserable. > >> > > Yes, it does make for a pretty frustrating work environment > > sometimes and although Siemens should > > be working for the BBC it often feels like the other way around. > > > > Seems poorly thought out. > > There's one point that hasn't been stressed that I think is very > important. The problem isn't technical, it's commercial. > > The BBC have outsourced some work to Siemens. It's certainly the case > that to maintain stability Siemens would need to do testing but I > imagine the main factor from their point of view is that *it provides > extra revenue*. I don't know about this contract but on another I'm > aware of they like nothing better than having the client request a new > feature :) > > Without knowing the reasons why the BBC chose to outsource and the > contract details, it really isn't possible to say whether it's a > sensible arrangement. Sure it makes developers' lives more difficult, > but that's not the main goal to be optimized. > > Cheers, Dave Last time I dealt with a Siemans "managed" system it was using a very old and outdated (never patched) SCO openserver install. Mind you this was 2001 and the openserver software version was from 1994 (unpatched, still had the -f root remote login hole). I hope they are being better to the BBC's bits. -Wade ___ 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 PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Stacked bar graphs
On Dec 3, 2007 2:10 PM, Terence Monteiro <[EMAIL PROTECTED]> wrote: > Hi, > > I'm looking for a Perl library that I can use to show multiple values in a > stacked bar > graph in my Catalyst application. I tried SVG::TT::Graph and like it's style. > However, > it does not look so nice for stacked values as the colours of the bars for > the second, > third.. sets of data merge with the first. Anyone with an alternative? never used it, looks nice tho (and AFAIR was advertised here on the list) http://search.cpan.org/~gphat/Chart-Clicker-1.4.1/ http://www.onemogin.com/clicker/examples -- siggen.pl: Segmentation Fault ___ 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 PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Stacked bar graphs
On Dec 3, 2007 9:33 AM, Matthias Zeichmann <[EMAIL PROTECTED]> wrote: > > never used it, looks nice tho (and AFAIR was advertised here on the list) > http://search.cpan.org/~gphat/Chart-Clicker-1.4.1/ > http://www.onemogin.com/clicker/examples And it quite happily handles stacked bar charts. Outputs png or svg. -- Cory 'G' Watson http://www.onemogin.com ___ 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 PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Stacked bar graphs
>> On Mon, 3 Dec 2007 18:40:02 +0530, Terence Monteiro <[EMAIL PROTECTED]> said: > I'm looking for a Perl library that I can use to show multiple values in a > stacked bar > graph in my Catalyst application. I tried SVG::TT::Graph and like it's style. > However, > it does not look so nice for stacked values as the colours of the bars for > the second, > third.. sets of data merge with the first. Anyone with an alternative? If you don't like the colors svg::tt::graph generates, then change them by using a different stylesheet; there are suggestions about that in the TT:Graph docs. If you don't know what colors to use, then try the Color Brewer www.colorbrewer.org I use the qualitative ones for my stacked graphs http://docs.osg.ufl.edu/tsm/graphs/ALL.html - Allen S. Rout ___ 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 PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Stacked bar graphs
Hi, I'm looking for a Perl library that I can use to show multiple values in a stacked bar graph in my Catalyst application. I tried SVG::TT::Graph and like it's style. However, it does not look so nice for stacked values as the colours of the bars for the second, third.. sets of data merge with the first. Anyone with an alternative? -- Thanks and Regards, Terence Monteiro. DeepRoot Linux, Ph: +91 (80) 4112 4784 / 85. ___ 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 PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] BBC's "Perl on Rails" nuttiness
>>> 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, without an extensive >>> testing period to make sure it works with all existing applications. The >>> trouble with this is that it is easier to >>> keep stable (or work around existing known problems) by not installing >>> anything new. >>> >> Sure - but as I understand BBC is their client and this policy makes >> the life of BBC programmers pretty miserable. >> > Yes, it does make for a pretty frustrating work environment > sometimes and although Siemens should > be working for the BBC it often feels like the other way around. > > Seems poorly thought out. There's one point that hasn't been stressed that I think is very important. The problem isn't technical, it's commercial. The BBC have outsourced some work to Siemens. It's certainly the case that to maintain stability Siemens would need to do testing but I imagine the main factor from their point of view is that *it provides extra revenue*. I don't know about this contract but on another I'm aware of they like nothing better than having the client request a new feature :) Without knowing the reasons why the BBC chose to outsource and the contract details, it really isn't possible to say whether it's a sensible arrangement. Sure it makes developers' lives more difficult, but that's not the main goal to be optimized. Cheers, Dave ___ 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 PROTECTED]/ Dev site: http://dev.catalyst.perl.org/