[Catalyst] Kudos and thanks
I haven't installed Catalyst from scratch since… I don't know, 2006, I think. I have reinstalled or installed parts of it many times on many platforms and that first full installation was the only one that didn't cause me some kind of problem, sometimes the kind that takes a couple hours to work out. I wrote an early review of Cat back then, still on the frameworks homepage, that raved in part about how easy it was to install. A couple months, and a couple of arguments on the list about growing installation issues, later I was starting to wish I could take back some of the review. I just installed Catalyst::Runtime and Catalyst::Devel from scratch on a brand new MacBook/Leopard without any modifications to the environment (well, Xcode but that's required for development) or the CPAN or anything and they both went in (while following prereqs) without a single hitch. I really don't enjoy sysadmin stuff and I begrudge every lost weekend I've spent trying to recompile Apache with modperl, etc, etc. This was just completely fantastic. Made me fall in love with Perl and Cat and recapture the same feeling I had when I first reviewed Catalyst more than two years ago. Thanks again to everyone who has worked on making the various pieces and making the various piece go. -Ashley ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] utf8 in regexes in Catalyst
* On Sun, Mar 02 2008, Jonathan Rockway wrote: > > Correctly decoded data: > > perl -MDevel::Peek -e 'my $data = "ほげ"; utf8::decode($data); Dump($data)' > > > SV = PV(0x72b098) at 0x72e3e0 > REFCNT = 1 > FLAGS = (PADMY,POK,pPOK,UTF8) > PV = 0x73aa40 "\343\201\273\343\201\222"\0 [UTF8 "\x{307b}\x{3052}"] > CUR = 6 > LEN = 8 I forgot to mention that Devel::StringInfo is much nicer than this. Devel::Peek will tell you if the "character flag" is on, but it won't do much else. Devel::StringInfo will tell you lots of stuff about the string under test. Example: $ perl -MDevel::StringInfo my $string = "ほげ"; Devel::StringInfo->new->dump_info($string) string: ã\201»ã\201\222 is_utf8: 0 octet_length: 6 valid_utf8: 1 decoded_is_same: 0 decoded: octet_length: 6 downgradable: 0 char_length: 2 string: ほげ is_utf8: 1 raw = <<ã\201»ã\201\222>> Note than my string isn't correctly utf8 (I didn't "use utf8" to decode the literal), but Devel::StringInfo noticed that the string is valid utf8, and showed me what would happen if i decoded it correctly. Very helpful. It also knows about encodings other than utf8 or latin-1, in case those accidentally get into your application. Generally a good tool. 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/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Re: utf8 in regexes in Catalyst
* On Mon, Mar 03 2008, Matt Lawrence wrote: > See also the PERL_UNICODE environment variable, documented in man perlrun. No, don't do that. 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/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Re: utf8 in regexes in Catalyst
Aristotle Pagaltzis wrote: So for that one-liner, you do this: echo 'é' | perl -MEncode -e '$_ = decode 'UTF-8', scalar <>; print /\w/' Yes, this is tedious. So what you do is you find ways to get the parts of your program that speak to the outside world to decode input on receipt and encode output on emission. Then inside your program, you don’t need to think about it at all. F.ex., for the one-liner, you would declare that your STDIN and STDOUT are in UTF-8 and then reading from and writing to them automatically does what it should. Handily, perl has a switch for that when it comes to UTF-8: echo 'é' | perl -CS -e 'print <> =~ /\w/' See also the PERL_UNICODE environment variable, documented in man perlrun. Matt ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Re: utf8 in regexes in Catalyst
Hello Aristotle, Aristotle Pagaltzis a écrit : [Losta useful things deleted...] For Catalyst, that means things like Catalyst::Plugin::Unicode Great! I did not see this one :-( Thank you! and configuring your database and template engine correctly. This is already the case :-) Many thanks to you and also to Jonathan Rockway for your very interesting infos. -- -- \^/-- ---/ O \----- -- | |/ \| Alexandre (Midnite) Jousset | -- ---|___|----- ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/