Grokbase
Topics Posts Groups | in
x
[ help ]

Josef Chladek (josef.ch...@gmail.com)

Profile | Posts (34)

User Information

Display Name:Josef Chladek
Partial Email Address:josef.ch...@gmail.com
Posts:
34 total
8 in Catalyst Framework
1 in catalyst@lists.scsys.co.uk
2 in dbix-class@lists.scsys.co.uk
1 in HTML::FormFu
22 in HTML::FormFu

5 Most Recent

All Posts
1) Josef Chladek [Catalyst] Perl Catalyst : lexical error not displayed
| +1 vote
you have to patch and compile perl 5.10 yourself, the patch is described here...
catalyst@lists.scsys.co.uk
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Am 08.09.2008 um 16:24 schrieb tirveni yadav:

> Hi,
>
> I am facing some issues in catalyst since upgrade to perl 5.10 from
> 5.8 in Debian 4.1 .
>
> Item 1)
> I am finding it hard to locate errors because of this :
>        When a variable is not declared lexically:
>        my  $title =  "Temp" ; #works fine whereas
>        $title = "Temp" ; #Unknown Error
>
> These Messages are Displayed with different options for the
> error above :
> i)
> Running 'script/testapp_server.pl' with results in this error ::
>
> Unknown error
> Compilation failed in require at /usr/share/perl5/Catalyst/Utils.pm
> line 270.
> Compilation failed in require at script/testapp_server.pl line 55.

you have to patch and compile perl 5.10 yourself, the patch is  
described here

http://www.nntp.perl.org/group/perl.perl5.changes/2008/02/msg21106.html

download perl5.10 (http://www.cpan.org/src/perl-5.10.0.tar.gz),
before ./Configure patch file toke.c (toplevel) line 692

#else
     parser->nexttoke = 0;
#endif
+    parser->error_count = oparser ? oparser->error_count : 0;
     parser->copline = NOLINE;
     parser->lex_state = LEX_NORMAL;
     parser->expect = XSTATE;

that's it, ./Confiure;make . I don't know if there's a deb-file of a  
patched perl around...

josef
2) Josef Chladek Re: [html-formfu] catalyst, formfu and unicode
| +1 vote
meanwhile I've a clean running app, please ignore my post above, the reason everything was screwed...
HTML::FormFu
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Am 27.09.2007 um 16:58 schrieb Josef Chladek:

> hello list,
>
> after endless hours of debugging, here are my recommendations for
> correct use of utf8 with Catalyst and HTML::FormFu
>
> 1) don't use Catalyst::Plugin::Unicode
> 2) don't use "use utf8" in the controller, that has formfu stuff in it
> 3) don't use .yml configs, use Config::General instead (maybe
> others working as well)
> 4) in I18/de.pm remove "use utf8", otherwise error-messages corrupt
> the rest of the page
>
> at least for me now everything is encoded correctly (and my other
> controllers work as well correctly with utf8)
>
> C:P:Compress:Gzip is ok to use (contrary to what I said yesterday)

meanwhile I've a clean running app, please ignore my post above, the  
reason everything was screwed up was a mix of switching between perl  
5.8 and 5.9, using DBIC without uf8_columns and TT caching templates:

1) USE Catalyst::Plugin::Unicode
2) use utf8 whenever you have utf8 chars in your source
3) yml configs don't have todo anything with this at all
4) leave I18/de.pm as is
5) whenever using DBIC with utf8 cols in the DB use  
DBIx::Class::UTF8Columns - this was my major problem, data looked  
like utf8 but was not internally
6) DON'T use C:P:Compress:Gzip in perl 5.9 - it will screw up the  
utf8 output
7) use ENCODING => 'UTF-8' in your View::TT

all my problems had nothing todo with formfu!
it cost a lot of debugging time but now we don't have encoding  
problems anymore.

on more tip: when changing something in your cat-controller (or the  
DBIC classes) while debugging, it helps to touch your .tt file(s), so  
it/they will be regenerated with the data from controller/db and not  
the cached/compiled version will be taken!
there is only a small problem: if you "insert" a tt-file with utf8 in  
another tt file, utf8 is broken, if you "include" it, it works - see  
the following thread

http://lists.scsys.co.uk/pipermail/catalyst/2007-October/015484.html

but once you know that, you can live with it...
josef



_______________________________________________
HTML-FormFu mailing list
[email protected: HTML-F...@lists.rawmode.org]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
3) Josef Chladek [Catalyst] Any chance there is an arbitrary limit to how many classes you can load this way...?
| +1 vote
hmm, I had the exact same situation (although the number of classes was somewhat higher, aprox. 25)...
catalyst@lists.scsys.co.uk
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Am 09.10.2007 um 11:51 schrieb Dustin Suchter:

> So let's assume I have the below code. Each of the 13 classes
> represent 1 table in the same MySQL db. All class definitions are
> essentially identical in structure and have nothing more complex
> than foreign keys in them.
>
> Here's the weird thing, if I run my code with all 13 classes, my
> default view stops working - it seems to be replaced with the only
> other view I've defined! I only use the other one by manually
> calling 'forward' to it in 1 function - ultra weird!
>
> If I remove any of the classes the load_classes line the behavior
> goes back to expected. I've tried lots of reordering, renaming,
> removing, etc etc. I actually have far more than 13 classes I want
> to load, so I've even tried interchanging which 13 I test with. As
> far as I can tell, loading more than 12 classes at a time here
> causes some sort of buffer overflow that ends up messing with my
> views. That really doesn't make any sense to me, but it is what I'm
> observing.
>
> Also, I notice that in the debug output when starting my server,
> both my views are present at all times, so it's not like the
> secondary view is getting used because the default one is missing.
>
> However, if I delete the class defining my secondary view then my
> default view starts working again. This seems to imply that having
> more than 12 classes loaded in my Model somehow changes my default
> view order...?!
>
> umm... help? =]
>
> ###############
> package MyAppDB;
>
> use base qw/DBIx::Class::Schema/;
> __PACKAGE__->load_classes({
> MyAppDB => [qw/One Two Three Four Five Six Seven Eight Nine Ten
> Eleven Twelve Thirteen/]
> });
>
> ###############

hmm, I had the exact same situation (although the number of classes  
was somewhat higher, aprox. 25) when I used

Catalyst::Action::RenderView::ErrorHandler

I removed it and my app worked again. maybe this helps...

josef
4) Josef Chladek Re: [Catalyst] Any chance there is an arbitrary limit to how many classes you can load this way...?
| +1 vote
hmm, I had the exact same situation (although the number of classes was somewhat higher, aprox. 25)...
catalyst@lists.scsys.co.uk
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Am 09.10.2007 um 11:51 schrieb Dustin Suchter:

> So let's assume I have the below code. Each of the 13 classes
> represent 1 table in the same MySQL db. All class definitions are
> essentially identical in structure and have nothing more complex
> than foreign keys in them.
>
> Here's the weird thing, if I run my code with all 13 classes, my
> default view stops working - it seems to be replaced with the only
> other view I've defined! I only use the other one by manually
> calling 'forward' to it in 1 function - ultra weird!
>
> If I remove any of the classes the load_classes line the behavior
> goes back to expected. I've tried lots of reordering, renaming,
> removing, etc etc. I actually have far more than 13 classes I want
> to load, so I've even tried interchanging which 13 I test with. As
> far as I can tell, loading more than 12 classes at a time here
> causes some sort of buffer overflow that ends up messing with my
> views. That really doesn't make any sense to me, but it is what I'm
> observing.
>
> Also, I notice that in the debug output when starting my server,
> both my views are present at all times, so it's not like the
> secondary view is getting used because the default one is missing.
>
> However, if I delete the class defining my secondary view then my
> default view starts working again. This seems to imply that having
> more than 12 classes loaded in my Model somehow changes my default
> view order...?!
>
> umm... help? =]
>
> ###############
> package MyAppDB;
>
> use base qw/DBIx::Class::Schema/;
> __PACKAGE__->load_classes({
> MyAppDB => [qw/One Two Three Four Five Six Seven Eight Nine Ten
> Eleven Twelve Thirteen/]
> });
>
> ###############

hmm, I had the exact same situation (although the number of classes  
was somewhat higher, aprox. 25) when I used

Catalyst::Action::RenderView::ErrorHandler

I removed it and my app worked again. maybe this helps...

josef



_______________________________________________
List: [email protected: Cat...@lists.scsys.co.uk]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/
5) Josef Chladek [html-formfu] catalyst, formfu and unicode
| +1 vote
hello list, after endless hours of debugging, here are my recommendations for correct use of utf8...
HTML::FormFu
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
hello list,

after endless hours of debugging, here are my recommendations for  
correct use of utf8 with Catalyst and HTML::FormFu

1) don't use Catalyst::Plugin::Unicode
2) don't use "use utf8" in the controller, that has formfu stuff in it
3) don't use .yml configs, use Config::General instead (maybe others  
working as well)
4) in I18/de.pm remove "use utf8", otherwise error-messages corrupt  
the rest of the page

at least for me now everything is encoded correctly (and my other  
controllers work as well correctly with utf8)

C:P:Compress:Gzip is ok to use (contrary to what I said yesterday)

thanks for all the help
josef

_______________________________________________
HTML-FormFu mailing list
[email protected: HTML-F...@lists.scsys.co.uk]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

spacer
Profile | Posts (34)
Home > People > Josef Chladek