Re: [catalyst] status 301 changed to 200 only when deployed with fastcgi/lighty
I resolved this by using the more usual $c-res-redirect( $r, 301 ); On 9/24/07, Daniel McBrearty [EMAIL PROTECTED] wrote: Hi I finally deployed engoi.com live last night, after some protracted bug fixing and stuff One of the things I have in the site is a module which takes URL's for the old site and sends back a status 301 with a redirect to the new url for the same page. For example: if the user requests /public/index.cgm?natlang=nl they get a 301 and redirect to /nl/index.html The code to do this looks (in part) like this; my $r = /$natlang/index.html; $c-stash-{redirect} = $r; $c-res-status( 301, $r ); $c-stash-{template} = '/redirect/redirect.tt'; And this works fine on the dev server. WHen deployed with lighty/fastcgi, it also works fine - *except* that the status code now becomes a '200'. My $c-res-status( 301, $r ) is silently ignored. My lighty deployment is basically a variation on this: http://www.dev411.com/wiki/Installing_lighttpd_and_FastCGI_for_Catalyst my lighttpd.conf section is a little different : $HTTP[url] !~ \.(html|css|js|png|gif|ico)$ { fastcgi.server = ( = ( Engoi = ( socket = /tmp/engoi.socket, check-local = disable) ), .cgm = ( Engoi = ( socket = /tmp/engoi.socket, check-local = disable) ) ) } Has anyone any idea why my status code should be silently changed? thanks Daniel -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[catalyst] status 301 changed to 200 only when deployed with fastcgi/lighty
Hi I finally deployed engoi.com live last night, after some protracted bug fixing and stuff One of the things I have in the site is a module which takes URL's for the old site and sends back a status 301 with a redirect to the new url for the same page. For example: if the user requests /public/index.cgm?natlang=nl they get a 301 and redirect to /nl/index.html The code to do this looks (in part) like this; my $r = /$natlang/index.html; $c-stash-{redirect} = $r; $c-res-status( 301, $r ); $c-stash-{template} = '/redirect/redirect.tt'; And this works fine on the dev server. WHen deployed with lighty/fastcgi, it also works fine - *except* that the status code now becomes a '200'. My $c-res-status( 301, $r ) is silently ignored. My lighty deployment is basically a variation on this: http://www.dev411.com/wiki/Installing_lighttpd_and_FastCGI_for_Catalyst my lighttpd.conf section is a little different : $HTTP[url] !~ \.(html|css|js|png|gif|ico)$ { fastcgi.server = ( = ( Engoi = ( socket = /tmp/engoi.socket, check-local = disable) ), .cgm = ( Engoi = ( socket = /tmp/engoi.socket, check-local = disable) ) ) } Has anyone any idea why my status code should be silently changed? thanks Daniel -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] App Deployment - Apache, FastCGI, init.d
also, try daemontools - that shell script will shrink to about 3 lines, and managing it will be a cinch. It's in the cat calendar stuff somewhere. On 9/20/07, Hans Dieter Pearcey [EMAIL PROTECTED] wrote: On Wed, Sep 19, 2007 at 08:57:10PM -0500, Mitchell Jackson wrote: I've seen it mentioned on the list to use daemon tools with PAR ( http://www.catalystframework.org/calendar/2006/4 ) but that uses the built-in myapp_server.pl, running it's own web server, and I much prefer the apache/fastcgi approach, most especially because it leaves the work of serving static content to apache instead of the heavier application process. You misread. It uses myapp_server.pl only to make sure the PAR works properly. Keep reading and you'll see it uses myapp_fastcgi.pl. hdp. ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] TT and UNICODE: Garbled special characters
i don't know if this helps ... i had to dig around my code to find it, but I have this at the top of every template (actually at the top on an included template that they all use ... [% USE encoding 'utf-8' %] IIRC this ensures that the correct headers are sent out before the html. you can check if this is an issue by looking at what the browser things the content encoding is. also I put this in the header meta tags: meta http-equiv=content-type content=application/xhtml+xml; charset=utf-8 / ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] TT and UNICODE: Garbled special characters
what does the browser tell you is the encoding of the page it is getting? ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] make test fails with C:P:Session:State::Cookie
Hi Emanuele thanks for the response. I took a look with the debugger this morning but didn't have too much time ... you are obviously much further with this than me. whatever happens, the code should at least be fixed enough to give some sensible default behaviour, along with a docs patch, and be able to get through tests. For my needs, your fix would be fine. If it is no worse than the previous state of affairs, it should be used IMO the current situation is that CPAN Task::Catalyst DIES because of this. so it ought to be high priority to at least fix that, IMO could you post a patch for the solution that you have? thanks Daniel On 9/7/07, Emanuele Zeppieri [EMAIL PROTECTED] wrote: Daniel McBrearty wrote: ok, i searched the list but stupidly didn't look at cpan bugtracker ... it is a reported bug. in fact there seem to be several issues with the live_app.t in 0.07 what's the implication? sessions will time out even if though the user has revisited? Exactly (because the cookie expire time is not updated, despite the accesses - so you have a fixed-duration session). This is the documented behaviour though: http://search.cpan.org/~nuffin/Catalyst-Plugin-Session-0.18/lib/Catalyst/Plugin/Session.pm#METHODS (see: session_expires $reset) But then we have another problem (or two): first, the session_expires method really does not take any argument (any argument passed to it is simply ignored - have a look at the source). This may seem at first only a documentation bug, but it implies that any time you call session_expires(), even with no arguments (for example only to get the session expire time), you have this undocumented side-effect which extends the session duration. Second, for fixed duration sessions, the session expiration control relies solely on the presence of the cookie sent by the browser: so a user can turn a fixed duration session into an extended session simply by editing the cookie expire time (this is a security bug IMO). I've got a fix for these problems, which basically just restores what the docs have always said (so it should break no existing code) and it also eliminates the security bug, but I'm waiting for the author to see if he approves that approach or if he prefers to get rid of the fixed duration sessions at all and have only extended sessions by default (as the mentioned live_app.t test seems to imply). (Actually, the current code seems to be half-way between this two choices, so to say...) Anyway, if you have time, any further research would be interesting. Cheers, Emanuele. ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] make test fails with C:P:Session:State::Cookie
I just forwarded this to Yuval. On 9/6/07, Daniel McBrearty [EMAIL PROTECTED] wrote: this is all a brand new install on ubuntu 7, so all deps should be most recent off my mirror. any ideas? [EMAIL PROTECTED]:~/.cpan/build/Catalyst-Plugin-Session-State-Cookie-0.07# perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Catalyst::Plugin::Session::State::Cookie [EMAIL PROTECTED]:~/.cpan/build/Catalyst-Plugin-Session-State-Cookie-0.07# make cp lib/Catalyst/Plugin/Session/State/Cookie.pm blib/lib/Catalyst/Plugin/Session/State/Cookie.pm Manifying blib/man3/Catalyst::Plugin::Session::State::Cookie.3pm [EMAIL PROTECTED]:~/.cpan/build/Catalyst-Plugin-Session-State-Cookie-0.07# make test PERL_DL_NONLAZY=1 /usr/bin/perl -MExtUtils::Command::MM -e test_harness(0, 'blib/lib', 'blib/arch') t/*.t t/01useok t/02podskipped all skipped: set TEST_POD to enable this test t/03podcoverageskipped all skipped: Test::Pod::Coverage 1.04 required t/basicok t/live_app.ok 1/0 # Failed test 'cookie expiration was extended' # at t/live_app.t line 72. # '1189038714' # # '1189038714' t/live_app.NOK 9# Looks like you failed 1 test of 11. t/live_app.dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 9 Failed 1/11 tests, 90.91% okay Failed Test Stat Wstat Total Fail Failed List of Failed --- t/live_app.t1 256111 9.09% 9 2 tests skipped. Failed 1/5 test scripts, 80.00% okay. 1/25 subtests failed, 96.00% okay. make: *** [test_dynamic] Error 1 [EMAIL PROTECTED]:~# perl -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=linux, osvers=2.6.15.7, archname=i486-linux-gnu-thread-multi uname='linux rothera 2.6.15.7 #1 smp sat sep 30 10:21:42 utc 2006 i686 gnulinux ' config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=i486-linux-gnu -Dprefix=/usr -Dprivlib=/usr/share/perl/5.8 -Darchlib=/usr/lib/perl/5.8 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.8.8 -Dsitearch=/usr/local/lib/perl/5.8.8 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm -Duseshrplib -Dlibperl=libperl.so.5.8.8 -Dd_dosuid -des' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='4.1.2 (Ubuntu 4.1.2-0ubuntu4)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt perllibs=-ldl -lm -lpthread -lc -lcrypt libc=/lib/libc-2.5.so, so=so, useshrplib=true, libperl=libperl.so.5.8.8 gnulibc_version='2.5' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP THREADS_HAVE_PIDS USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API Built under linux Compiled at Mar 6 2007 01:40:14 @INC: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl . [EMAIL PROTECTED]:~# -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Re: [Catalyst] make test fails with C:P:Session:State::Cookie
ok, i searched the list but stupidly didn't look at cpan bugtracker ... it is a reported bug. in fact there seem to be several issues with the live_app.t in 0.07 what's the implication? sessions will time out even if though the user has revisited? as i have nothing better to do, and need this sorted, i'll have a dig in the source. chance to see how some of this stuff works underneath. if anyone has any pointers or has been here already, that is always interesting. who knows i might actually get someplace :-) On 9/6/07, Daniel McBrearty [EMAIL PROTECTED] wrote: I just forwarded this to Yuval. On 9/6/07, Daniel McBrearty [EMAIL PROTECTED] wrote: this is all a brand new install on ubuntu 7, so all deps should be most recent off my mirror. any ideas? [EMAIL PROTECTED]:~/.cpan/build/Catalyst-Plugin-Session-State-Cookie-0.07# perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Catalyst::Plugin::Session::State::Cookie [EMAIL PROTECTED]:~/.cpan/build/Catalyst-Plugin-Session-State-Cookie-0.07# make cp lib/Catalyst/Plugin/Session/State/Cookie.pm blib/lib/Catalyst/Plugin/Session/State/Cookie.pm Manifying blib/man3/Catalyst::Plugin::Session::State::Cookie.3pm [EMAIL PROTECTED]:~/.cpan/build/Catalyst-Plugin-Session-State-Cookie-0.07# make test PERL_DL_NONLAZY=1 /usr/bin/perl -MExtUtils::Command::MM -e test_harness(0, 'blib/lib', 'blib/arch') t/*.t t/01useok t/02podskipped all skipped: set TEST_POD to enable this test t/03podcoverageskipped all skipped: Test::Pod::Coverage 1.04 required t/basicok t/live_app.ok 1/0 # Failed test 'cookie expiration was extended' # at t/live_app.t line 72. # '1189038714' # # '1189038714' t/live_app.NOK 9# Looks like you failed 1 test of 11. t/live_app.dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 9 Failed 1/11 tests, 90.91% okay Failed Test Stat Wstat Total Fail Failed List of Failed --- t/live_app.t1 256111 9.09% 9 2 tests skipped. Failed 1/5 test scripts, 80.00% okay. 1/25 subtests failed, 96.00% okay. make: *** [test_dynamic] Error 1 [EMAIL PROTECTED]:~# perl -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=linux, osvers=2.6.15.7, archname=i486-linux-gnu-thread-multi uname='linux rothera 2.6.15.7 #1 smp sat sep 30 10:21:42 utc 2006 i686 gnulinux ' config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=i486-linux-gnu -Dprefix=/usr -Dprivlib=/usr/share/perl/5.8 -Darchlib=/usr/lib/perl/5.8 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.8.8 -Dsitearch=/usr/local/lib/perl/5.8.8 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm -Duseshrplib -Dlibperl=libperl.so.5.8.8 -Dd_dosuid -des' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='4.1.2 (Ubuntu 4.1.2-0ubuntu4)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt perllibs=-ldl -lm -lpthread -lc -lcrypt libc=/lib/libc-2.5.so, so=so, useshrplib=true, libperl=libperl.so.5.8.8 gnulibc_version='2.5' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP THREADS_HAVE_PIDS USE_ITHREADS
Re: [Catalyst] TT and UNICODE: Garbled special characters
if you are going to write unicode characters in your source code, don't you need to say use utf8; or something? http://search.cpan.org/~nwclark/perl-5.8.8/lib/utf8.pm I'm not sure what the default is.Source code is ascii by default , AFAIK - if you are going to use something which is in the extended ASCII range, I'm not sure it will be UTF8 encoded unless you use the pragma. On 9/5/07, Tobias Kremer [EMAIL PROTECTED] wrote: Quoting Stefan Kühn [EMAIL PROTECTED]: NEXT TRY: * i saved the controller test.pm in UTF-8 encoding, * adapted the broken character ... What do you mean by adapted ? * called the url * and it worked! So I guess you just had the wrong filetype encoding then? QUESTION: Catalyst generates Perl files in the computer's standard encoding (which is cp1252). For *unicode best practice* it should be in UTF-8 encoded. Do you agree? AFAIK Catalyst itself doesn't generate any Perl files at all. But maybe I'm just misunderstanding your question :) --Tobias ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] TT and UNICODE: Garbled special characters
It seems to me that Template-Toolkit does no UTF-8-encoding of the outputted variables. well, it shouldn't. In perl, strings are already utf8, internally. If TT was to do encoding, they would be double-encoded. so what you have to do is get that u-with-umlaut *into* perl as a utf8 encoded string. which is a combination of whatever your editor is doing, and the utf8 pragma. strange that you still get the problem when you use the \x notation though. have you tried just writing a test script and outputting the string into a utf8-aware terminal? -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] TT and UNICODE: Garbled special characters
Obviously, the string variable reaches the stash correctly. I wrote it's content to a UTF-8 file and i found the result correctly. then I don't know. you could try updating the libs, but I can tell you that I've been using TT since mid last year, and had no problems - i have heaps of utf8 stuff. but I've never directly put utf8 into the perl source as you are doing. -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] TT and UNICODE: Garbled special characters
This talk was great: http://vienna.yapceurope.org/ye2007/talk/552 Check out the slides of his talk. looks interesting - where *are* the slides? no link from the page :-) thanks! ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] make test fails with C:P:Session:State::Cookie
this is all a brand new install on ubuntu 7, so all deps should be most recent off my mirror. any ideas? [EMAIL PROTECTED]:~/.cpan/build/Catalyst-Plugin-Session-State-Cookie-0.07# perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Catalyst::Plugin::Session::State::Cookie [EMAIL PROTECTED]:~/.cpan/build/Catalyst-Plugin-Session-State-Cookie-0.07# make cp lib/Catalyst/Plugin/Session/State/Cookie.pm blib/lib/Catalyst/Plugin/Session/State/Cookie.pm Manifying blib/man3/Catalyst::Plugin::Session::State::Cookie.3pm [EMAIL PROTECTED]:~/.cpan/build/Catalyst-Plugin-Session-State-Cookie-0.07# make test PERL_DL_NONLAZY=1 /usr/bin/perl -MExtUtils::Command::MM -e test_harness(0, 'blib/lib', 'blib/arch') t/*.t t/01useok t/02podskipped all skipped: set TEST_POD to enable this test t/03podcoverageskipped all skipped: Test::Pod::Coverage 1.04 required t/basicok t/live_app.ok 1/0 # Failed test 'cookie expiration was extended' # at t/live_app.t line 72. # '1189038714' # # '1189038714' t/live_app.NOK 9# Looks like you failed 1 test of 11. t/live_app.dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 9 Failed 1/11 tests, 90.91% okay Failed Test Stat Wstat Total Fail Failed List of Failed --- t/live_app.t1 256111 9.09% 9 2 tests skipped. Failed 1/5 test scripts, 80.00% okay. 1/25 subtests failed, 96.00% okay. make: *** [test_dynamic] Error 1 [EMAIL PROTECTED]:~# perl -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=linux, osvers=2.6.15.7, archname=i486-linux-gnu-thread-multi uname='linux rothera 2.6.15.7 #1 smp sat sep 30 10:21:42 utc 2006 i686 gnulinux ' config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=i486-linux-gnu -Dprefix=/usr -Dprivlib=/usr/share/perl/5.8 -Darchlib=/usr/lib/perl/5.8 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.8.8 -Dsitearch=/usr/local/lib/perl/5.8.8 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm -Duseshrplib -Dlibperl=libperl.so.5.8.8 -Dd_dosuid -des' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='4.1.2 (Ubuntu 4.1.2-0ubuntu4)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt perllibs=-ldl -lm -lpthread -lc -lcrypt libc=/lib/libc-2.5.so, so=so, useshrplib=true, libperl=libperl.so.5.8.8 gnulibc_version='2.5' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP THREADS_HAVE_PIDS USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API Built under linux Compiled at Mar 6 2007 01:40:14 @INC: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl . [EMAIL PROTECTED]:~# ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] New website using Catalyst
site looks great! nice job! On 8/22/07, Tobias Kremer [EMAIL PROTECTED] wrote: Evaldas Imbrasas wrote: I would like to annouce the launch of a new website using Catalyst (along with DBIC and Template Toolkit): EVO: eco-friendly products, services, and information http://www.evo.com/ Please feel free to add our website to the growing list of websites using Catalyst at http://dev.catalyst.perl.org/ . Looks like a cool site. I added it to Yeah, I really like it, too! Nice work. http://dev.catalystframework.org/wiki/LiveApplications By the way: Why isn't vox.com included on the list? Would be a cool reference. Or is there an approval by SixApart needed? --Tobias ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] talk at Brussels PM on my catalyst experiences in Oct
I'm far, far from expert on cat or building web sites in gerenal (unless you count making mighty -ups as a sign of expertise), but we're having a perl mongers thing here at the end of October, and there is some curiosity about Catalyst ... so ... I'm proposing to give an overview of Cat, using www.engoi.com (the cat version will be live by then, dear god I hope so ... :) to illustrate how some of the many features have been used and abused. my draft notes are here. http://docs.google.com/Doc?id=dcd6mjpc_16gzrskf all comment and feedback welcome. cheers Daniel ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] assessing memory usage with fcgi
Hi I'm trying to get a grip on this right now. At the moment I am using pmap -d to see what's happening. I see mapped: 49MB writeable/private: 37MB shared: 5.7MB (which seems to be session data) why is mapped != writeable + shared ? which figure do I take per process - mapped or writeable? Is this a preferred way of assessing for fcgi? any better methods that people use? thanks Daniel ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] improving usability / doc
the thing that I have found confusing in the past is the fact that if you go here: http://search.cpan.org/~mramberg/Catalyst-Runtime-5.7008/ which appears to be the root node of things, then scroll down for documentation, you find this: http://search.cpan.org/~mramberg/Catalyst-Runtime-5.7008/lib/Catalyst/Manual.pod which is fine, but then there is also this: http://search.cpan.org/~jrockway/Catalyst-Manual-5.700704/ (which I generally use, as it seems more complete ... ) It's confusing. Which is the canonical manual? Why is there more than one (rhetorical, I know the reasons is mostly historical ...) TIMTOWTDI is a great concept, but it can be taken too far ... If you do one thing only, (sorry, I can't include myself in this at present ... hopefully one day ..) clarify this. Preferably my merging these two docs into one. A second very simple improvement would be a clearly labelled link (The Manual) straight to Jon's manual from the front page of http://www.catalystframework.org/ ? The apples are lovely and all, but compare with http://subversion.tigris.org/ ... as a by no means ideal, but better, example ... ) so yes, the nav does suck a bit IMO. The documentation itself is pretty good - when you find it, and work out which bit to use. D ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] FCGI automatic restart / memory leaks
IIRC you see this under mod_perl because of the way that memory is shared between processes until it is written to, when a seperate copy is created per process. It happens even with no leaks. I have no idea whether FCGI has a similar mechanism, but just something to maybe look at. On 8/16/07, Tobias Kremer [EMAIL PROTECTED] wrote: I just deployed our quite large Catalyst app and I'm seeing a constant increase in memory usage. Here's a current snapshop from top: PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 29342 www 16 0 67156 60m 3180 S1 3.0 0:13.87 perl 29332 www 25 0 41052 34m 1204 S0 1.7 0:00.01 perl 29333 www 25 0 68424 60m 3172 S0 3.0 0:13.42 perl 29334 www 22 0 68944 60m 3308 S0 3.0 0:13.58 perl 29335 www 16 0 67428 60m 3168 S0 3.0 0:13.86 perl 29336 www 16 0 68736 60m 3192 S0 3.0 0:13.88 perl 29337 www 16 0 67392 59m 3172 S0 2.9 0:14.02 perl 29338 www 18 0 66404 59m 3180 S0 2.9 0:13.49 perl 29339 www 17 0 69216 62m 3172 S0 3.1 0:14.12 perl 29340 www 16 0 67992 60m 3188 S0 3.0 0:13.89 perl 29341 www 16 0 68812 60m 3180 S0 3.0 0:14.88 perl We're using lighttpd and handle the starting of the FCGI server manually. Is there a way to have the FCGI children restart once in a while without having to restart the whole FCGI process manager (and bringing down the application for a few seconds)? Something like Apache's MaxRequestsPerChild directive would be cool. Then it's time to go memory leak hunting :( Thanks a lot! --Tobias ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] FCGI automatic restart / memory leaks
daemontools is brilliant. I use it for several services now. it is so easy to set up and use. hot tip : don't forget the -e to myapp_fastcgi.pl option to get multilog writing to your log files. On 8/16/07, Tobias Kremer [EMAIL PROTECTED] wrote: Quoting Bernhard Graf [EMAIL PROTECTED]: You should definitely do that. Not only for this case - daemontools (or similar like runit) are superior for nearly every server service on *ix OSes. Check out http://smarden.org/runit/runscripts.html and compare the scripts with typical System-V run scripts (not mentioning the supervision concept in general). I suppose that the whole fcgi-pm process will be restarted instead of individual fcgi processes, correct? That'd mean a downtime of about 5 seconds which would render it useless to me :( Why two FCGI process managers? To compensate FCGI downtimes? Did you find a way to tell lighttpd not to talk to an FCGI process that is down? I only get a 500 error in that case. I just _hope_ that lighttpd will do the right thing as the error log tells me this when a backend server goes down: connect failed: Connection refused on unix:/srv/webapp.socket backend died; we'll disable it for 5 seconds and send the request to another backend instead: reconnects: 0 load: 1 --Tobias ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Serving server-dependent static content
perlbal looks pretty interesting, but not much online docs. anyone using it with catalyst? at the moment I'm happy with lighty, but might be useful for the future. -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Often used templates as method
well, if you make the structure of your templates mirror that of your controllers and actions, and use the end action that is shown in the tutorial, you don't have to define the template per action - the request gets automatically routed to the one with the same name as the action. On 8/13/07, Sven Eppler [EMAIL PROTECTED] wrote: Hello! I'm using catalyst with TT as my template engine. I made some templates for errors, warnings, messages, redirecting and stuff. But because i'm a quite a lazy boy i don't like to do this: $c-stash-{title} = Some Error Title; $c-stash-{message} = Some error message; $c-stash-{template} = 'box/error'; over and over again. Beside my lazyness, this would even help me out if i deicide to rename the template sometime or stuff like this. So i thought about a better way. Which eventually should be a method which resides in the View itself. Something like: $c-view('TT')-error('Some Error Title', 'Some error message'); But my first shot got me in some trouble: in the view i only get the reference of the view but not the catalyst context variable passed by. So i'm quite helpless how to proceed from there? Maybe even my approach is totaly wrong, but then i would appreciate any suggestions in the right direction. :) Thanks in advance, Sven ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] firing a POST method with Test::WWW::Mechanize
I want to do this by just making the POST request (not telling $mech to click/submit somewhere). I don't see any obvious way of doing it. any ideas? D ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Re: Trimming and Quoting Oh My!
I know I'm not a prominent poster on this list, but from time to time I do have answers and opinions that may actually be relevant. you're doing better than me mate, and it's never stopped me from talking out of my arse. ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Re: Trimming and Quoting Oh My!
i want to adopt side posting as a standard. I like that concept. emacs box-edit mode or some such crap ... ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Re: Trimming and Quoting Oh My!
this thread reminds me of why I sometimes wish I'd gone into marketing. ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[catalyst] conditional loading of Controllers and Models
is there a way to have some C's and M's load into catalyst conditionally? for example, if some config variable is set? cheers D ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [catalyst] conditional loading of Controllers and Models
ok, I'll spill ... ! I'll run one version of the site in translate mode - the members there are actually translators, they login and ... translate. Hence there is a model/controller that has all that stuff Of course I could just leave it in for the prod site, but I'd rather just have those components not load at all ... On 7/16/07, Matt S Trout [EMAIL PROTECTED] wrote: On Mon, Jul 16, 2007 at 02:48:50PM +0200, Daniel McBrearty wrote: is there a way to have some C's and M's load into catalyst conditionally? for example, if some config variable is set? Exclude some of them with setup_components config. Or just do it via @INC manipulation - I use this a fair bit for testing. Depends what you're trying to achieve really, and you haven't told us :) -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical DirectorWant a managed development or deployment platform? Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Using JQuery in Catalyst
i'm using it, but I keep the js completely seperate from the catalyst. been a while since I played with it, but I had to play around with different code releases quite bit to get Tabs working well. -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Proper way to perform cleanups on server shutdown?
http://perldoc.perl.org/perlmod.html says: An END code block is executed as late as possible, that is, after perl has finished running the program and just before the interpreter is being exited, even if it is exiting as a result of a die() function. (But not if it's morphing into another program via exec, or being blown out of the water by a signal--you have to trap that yourself (if you can).) -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] html::prototype syntax in new Cat version
It's been said by others but I really prefer to do all this in my templates. It would be easy to have this in a Template Toolkit plugin if you wanted, but I can't see the value of basically using perl as a code generator for Javascript. I prefer to be closer to my sentiments exactly. Even if your perl is way better than your js, it's harder to debug js wrapped in perl than straight js. You usually have to face the underlying library sooner or later. -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] odd interaction between DBM::Deep::Hash and TT
Hi, I'm posting this to the cat list and the TT list as it seems to be of interest to both groups of users. I have a hash which is made persistent with DBM::Deep. I pass the hash straight through the controller to the template ( $c-stash-{hash} = $h; ), then iterate like this: [%- FOREACH k in hash.keys -%] p [%- k -%] /p [%- END -%] I also dump the hash with $c-log-dumper in the controller, and see this: [debug] $VAR1 = bless( {}, 'DBM::Deep::Hash' ); so I know an empty blessed hash is being passed. But in the html out, I see : p keys /p If I patch the controller so $c-stash-{hash} = {}; the problem goes away. Is this some TT bug that interacts with DBM::Hash ? autovivifying keys as a key not a function? thanks Daniel -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] what do you do when your app hangs without explanation?
in the middle of working on another part of the app altogether, suddenly when I start up, just trying to login causes a hang. The process takes 95% CPU, there is no debug output (not even to show the request is received). break out the debugger? I have no idea even where to put the breakpoint, it looks like my code is not even reached. simple things I can check for? -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] using a persistent hash in a model
Hi I want to use a persistent hash in a model, using (I guess) Storable. The hash would get inititalised in new, and modified in the model. I would use lock_store to save any changes as data is modified in the model class. This would be OK in the test app, but as the app will get used under fast_cgi, is this safe? Given that there can be a number of cat instances running, presumably there will be as many model classes, and therefore they will not be in sync as data is updated? Is there any easy way to keep some ad-hoc persistent data out of the database? cheers Daniel -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] using a persistent hash in a model
For a single machine deployment I'd try DBM::Deep That looks perfect. Thanks! ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Re: sharefiles on /tmp
isn't that the file of all the session keys? persistent hash or something so that sessions which were live will still be after a restart? On 6/21/07, John Goulah [EMAIL PROTECTED] wrote: On 6/21/07, John Goulah [EMAIL PROTECTED] wrote: The Catalyst standalone server seems to create this 5MB sharefile on /tmp every time the server is restarted. This is a bit of a pain when there are many developers on one box, it can potentially fill up /tmp. Is there a way to either prevent this entirely, or when stopping the server have it clear the sharefile? Whats the file for? I suppose I could write a cron job to clear these out dailiy, but should I really have to do that? I just noticed this is happening with the FastMmap plugin, which is another reason why I prefer Memcache- Thanks, John ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com danmcb.vox.com danmcb.blogger.com BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] setup() called twice
I'm not sharing the dunce's cap though, you can get your own made. You want to be careful with those things ... they can have nasty side effects apparently : Well, one of the more mystical things Duns accepted was the wearing of conical hats to increase learning. He noted that wizards supposedly wore such things; an apex was considered a symbol of knowledge and the hats were thought to funnel knowledge to the wearer. Once humanism gained the upper hand, Duns Scotus's teachings were despised and the dunce cap became identified with ignorance rather than learning. http://www.straightdope.com/mailbag/mduncecap.html (yeah, no wonder I don't get any work done this morning ...) D -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com danmcb.vox.com danmcb.blogger.com BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] plat_forms report published on June 20th. 2007. Geneva team on Catalyst wins the Perl track.
hate to admit it, but perl took a hammering in terms of the completeness of solutions thing, maybe the most important metric. see the charts on page 13. You might see it that seperating the code from the html takes a little longer, but gives you a better architecture. I wonder how it would work it if thise apps needed to be maintained and evolved over several years. even so, it's a bit disappointing. On 6/20/07, Alvar Freude [EMAIL PROTECTED] wrote: Hi, -- Dami Laurent (PJ) [EMAIL PROTECTED] wrote: The results and final report of the Plat_forms international programming contest were released yesterday in a press conference in Nuremberg, and will be published today June 20th, 2007 on http://www.plat-forms.org/. the results are now online (until now not linked from the start page): http://www.plat-forms.org/2007/documents/platformsTR.pdf I think we should publish this as wide as possible and always should mention the pros of the Perl teams (smallest code, easy to extend; see summaries beginning on pages 75 and 67). I submitted a story on slashdot (text see below), perhaps they will take it. Others may do the same, or submit something similar on other websites. Ciao Alvar Text of my /. submission: (Hmmm, it would be better if I mentioned the Free University of Berlin as author of the study, sounds better ;-) ) The a href=http://www.plat-forms.org/2007/documents/platformsTR.pdf;results and final report/a of the a href=http://www.plat-forms.org/;Plat_Forms/a international web programming contest were published today. For each of the categories Perl, PHP and Java, three teams of three people each competed to produce a comprehensive social networking application in just 30 hours. strongA short summary of the results:/strong The Perl teams produced the most compact code and their solutions are very easy to extend. One Java team produced by far the most complete solution overall, the other two by far the most incomplete ones. The Java solutions are very hard to extend. The PHP teams used no autogenerated files, resisted SQL injection attempts and created the most similar solutions. There are also some a href=http://alvar.a-blast.org/plat_forms/;pictures of the teams/a and you can guess what language they are using ... -- ** Alvar C.H. Freude, http://alvar.a-blast.org/ **http://www.assoziations-blaster.de/ ** http://www.wen-waehlen.de/ ** http://odem.org/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com danmcb.vox.com danmcb.blogger.com BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] plat_forms report published on June 20th. 2007. Geneva team on Catalyst wins the Perl track.
interesting inside view of the whole thing, Cédric. Thanks. On 6/20/07, Cédric Bouvier [EMAIL PROTECTED] wrote: Le mercredi 20 juin 2007, à 18 heures 28, Matt S Trout écrivait : On Wed, Jun 20, 2007 at 06:35:31PM +0200, Daniel McBrearty wrote: hate to admit it, but perl took a hammering in terms of the completeness of solutions thing, maybe the most important metric. see the charts on page 13. Perl WSDL/SOAP tooling is pants. Film at 11. I do know of a large suite of Cat apps whose primary purpose is to handle such, but I believe the company in question largely built the functionality up from scratch. Volunteers to put together a Catalyst::Plugin::Server::SOAP would be welcome and I believe the ::Server authors would be willing to advise (as would I, I had a little bit of involvement in the design process as well). Before we went to battle, we tried to learn as much as we could about SOAP and how to handle it. And we felt the lack of appropriate modules, but finally said, well, that will have to do, and hoped that the requirement would only be to implement some sort of web service. Unfortunately, the requirements just included a WSDL file, and the words implement that!. So we were doomed. The pressure and lack of sleep must have blinded me, for I didn't give up at once, and wasted valuable time trying to get something working. To me, it seems that the enterprise world take it for granted that SOAP is a synonym for web services, the only way to go, whereas the Perl community generaly considers it as useless and as heavy as a dead donkey. Still, we would definitely benefit from having a decent Catalyst::Plugin to handle that. -- C é d r i c B o u v i e r team1 member -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGeYKDV+dbgD38PGgRAgCgAKC/rZJjnUK+QzfoqSTPUy7AdhzWFQCdFeMj II0FALVuyjcRFJfiDAQzF8Y= =GHby -END PGP SIGNATURE- ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com danmcb.vox.com danmcb.blogger.com BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] test server with -host
Thanks. This is quite odd. The dev m/c is actually a vmware guest running ubuntu on a winxp host. That shouldn't affect anything though, it just looks like a normal m/c to the network. I can prove that by running lighty and seeing the home page from the host. I can't start the test server on port 80 as myself (yes, I stopped lighty) - the daemon is denied permission to be created. I can do it as root. 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 doesn't seem to be cat, but some odd ubuntu/vmware thing. I don't see why cat server would be slow binding to 192.168.1.202 but not localhost though. thanks for the help Daniel On 6/19/07, Jason Kohles [EMAIL PROTECTED] wrote: On Jun 18, 2007, at 6:38 PM, Daniel McBrearty wrote: Hi trying to run the test server and see it on another machine. ./script/myapp_server.pl -help tells me it should bind to all by default, but when I run it with no host option, I can only see it at localhost, not at the ip for the machine (I can see other webservers on this machine). It does bind everything by default, if you can't access it from another host I'd start by looking at things like hostbased-firewalls on your development machine... -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ A witty saying proves nothing. -- Voltaire ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com danmcb.vox.com danmcb.blogger.com BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] test server with -host
Hi trying to run the test server and see it on another machine. ./script/myapp_server.pl -help tells me it should bind to all by default, but when I run it with no host option, I can only see it at localhost, not at the ip for the machine (I can see other webservers on this machine). if I try -host all or -host=all I get: [info] engoi powered by Catalyst 5.7007 Use of uninitialized value in string eq at /usr/local/lib/perl5/site_perl/5.8.8/Catalyst/Engine/HTTP.pm line 197. Use of uninitialized value in gethostbyaddr at /usr/local/lib/perl5/site_perl/5.8.8/Catalyst/Engine/HTTP.pm line 202. Use of uninitialized value in subroutine entry at /usr/local/lib/perl5/site_perl/5.8.8/Catalyst/Engine/HTTP.pm line 202. Bad arg length for Socket::inet_ntoa, length is 0, should be 4 at /usr/local/lib/perl5/site_perl/5.8.8/Catalyst/Engine/HTTP.pm line 202. I guess this is really simple, but it's late ... what am I doing wrong? cheers D -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com danmcb.vox.com danmcb.blogger.com BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Forms generation
i took a look at the Reaction repo yesterday. I see the docs and examples have come a long way. When you first showed me I was quite new to cat and it was young, so I was just baffled. I'm looking forward to having time to play with it again. On 6/15/07, Matt S Trout [EMAIL PROTECTED] wrote: On Thu, Jun 14, 2007 at 08:03:53PM -0700, [EMAIL PROTECTED] wrote: i'll probably realize that as soon as i try to swap DFV for RHTMF or other, and wish i had abstracted or adopted a general API, but until then i'm happy enough with models returning DFV validation closures, et al.. but only if that also supports my goal of not having the authoritative list of fields to be rendered defined in a .pm or .yml file, but in the .html template where it belongs imho. I'm not sure it always does. In fact, I don't think it always belongs anywhere :) Sometimes you'll want to select the fields in the view (not necessarily the template itself, but at least in something that belongs to the view, not anything else). But equally, sometimes you'll want to be able to say just render all applicable fields - for e.g. for uniform CRUD type stuff, so when the model changes you don't have to run round updating all the templates. Getting DRY and clean factoring for this stuff can be ... interesting. I think the Reaction model is a damn good stab at this with the new widget-oriented view layer I've checked in recently; I'll try and post some examples to the list soon so people can see what I'm gibbering about. -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical DirectorWant a managed development or deployment platform? Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com danmcb.vox.com danmcb.blogger.com BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] flexible attributes on db objects
thanks Perrin. The wikipedia article covers it well. On 6/8/07, Perrin Harkins [EMAIL PROTECTED] wrote: On 6/8/07, Daniel McBrearty [EMAIL PROTECTED] wrote: Comments? horrendous hackery? laziness? a landmine? ok in some cases? It's pretty well covered by Wikipedia here: http://en.wikipedia.org/wiki/Entity-Attribute-Value_model I sometimes use this in places where I have to let end users add attributes to objects, but the poor performance and lack of integrity constraints make it a poor choice for anything else in my opinion. - Perrin ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com danmcb.vox.com danmcb.blogger.com BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] debug mode
FWIW I just turn debug off, and do export MYAPP_DEBUG=1; script/myapp_server.pl -r; as I am developing. As that line is always there in the command buffer it's no hassle. If I want I can have BEGIN { $ENV{MYAPP_DEBUG} = 1; } in test scripts. Basically i find just using one mechanism is easier, less to worry about later on. as they say, it works for me ... -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com danmcb.vox.com danmcb.blogger.com BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Re: Shoot out -- Catalyst / RoR / Other MVC apps --
you could probably google for google and it would be on about page 2 ... On 5/11/07, Michael Reece [EMAIL PROTECTED] wrote: now the next time this happens, googling for cpantools.org will find this thread and all will be clear! ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Is it time for a Catalyst Conference yet?
FWIW (an aside really) there will be some kind of perl conference here in Belgium this year, I should be talking something about how we used Catalyst to rebuild our site. We're still not online with the cat version due to delays with translators, but that will get fixed soon. Anyhow, the cat architecture has been a godsend, especially the ability to support anything you can think of as a model, and lots of 'em On 5/9/07, John Napiorkowski [EMAIL PROTECTED] wrote: --- Thomas Klausner [EMAIL PROTECTED] wrote: Hi! On Tue, May 08, 2007 at 05:13:03PM -0500, Dave Rolsky wrote: Just a general question to the list to see if there is interest in getting together a conference dedicated to Catalyst developers. Or is the feeling that the normal Perl conferences cover all our needs? .. One possibility might be to try to piggyback a Catalyst day before/after an existing Perl conference like YAPC or OSCON. That way you don't have to work as hard to get an audience. BTW, this is basically what we try to achieve with the Hackathons at YAPC::Europe: Give certain projects time and place to do a Mini-Conference / Workshop embedded in the YAPC: http://vienna.yapceurope.org/ye2007/cfh.html I was thinking something like this, something with a hackthon feel and maybe one or two lightning talks and some words from the Catalyst main developers about future thoughts, etc. I'll check the list of upcoming YAPCs. Thanks for the idea. I just thought to float the idea on the list and see if there is more than tepid interest. --john __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com www.danmcb.com BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Apache2+fcgid or Lighttpd
no, I'm wrong - I read it *somewhere*, but it was likely an out of date doc ... I just googled and found this: http://blog.lighttpd.net/articles/2006/11/29/faster-fastcgi (scroll down or search romauld to see that it's persistent since 1.5.0) On 3/19/07, Toby Corkindale [EMAIL PROTECTED] wrote: Daniel McBrearty wrote: I thought of using fcgi also, but wondered if the fact that lighty doesn't make the fcgi connection persistent was significant. Are you sure? It looked persistent to me. On 3/15/07, Michele Beltrame [EMAIL PROTECTED] wrote: I'm about to deploy an application, and this time I can choose to use Lightpd instead of Apache+fcgid, which I commonly use. I have no problem with the latter configuration, but I was wondering if someone has comments/experience about Lighttpd for running Catalyst applications, i.e. speed, memory footprint, etc... I swapped over to lighttpd and am currently impressed - it seems to perform better than Apache under high numbers of concurrent connections due to its non-forking architecture. ie. Where apache would spawn more and more processes, chew loads of memory, and then hit MaxClients and stop accepting connections, Lighttpd seems to keep on truckin' and queuing them up. Toby ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Apache2+fcgid or Lighttpd
I thought of using fcgi also, but wondered if the fact that lighty doesn't make the fcgi connection persistent was significant. On 3/15/07, Michele Beltrame [EMAIL PROTECTED] wrote: Hello! I'm about to deploy an application, and this time I can choose to use Lightpd instead of Apache+fcgid, which I commonly use. I have no problem with the latter configuration, but I was wondering if someone has comments/experience about Lighttpd for running Catalyst applications, i.e. speed, memory footprint, etc... I'm on a VPS environment, so speed can be an import factor for choice. Thanks, Michele. ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] putting an object in the stash
On 3/13/07, Kiki [EMAIL PROTECTED] wrote: Simon Wilcox wrote: Not necessarily, you can also bless scalars and arrays. A blessed array, in particular can be a very effective way of improving performance for certain types of data structures. Strictly speaking you can bless any reference, although the most useful are hashes and arrays. true. So it's perhaps more accurate to say you can put a ref to anything ([EMAIL PROTECTED], blessed or not ... ) on the stash. -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] putting an object in the stash
If I do that, the values from $obj hash reference are not put in the template like when $obj is a reference to a common hash. Impossible to know what you mean here without an example of the template, but I commonly put DBIC objects on the stash, and call methods on them with the dot operator in TT. TT is smart enough to work out what needs to be done and do it so whether the underlying code is $obj-element; or $obj-{element}; [%- obj.element -%] works. (Maybe it always uses the second version - as I've never had a problem, I've never looked ... So I don't really get what the problem is here. -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] putting an object in the stash
Hi, The problem appears when I want to use only [% element %] and not [% obj.element %] in templates. And I want to use the first way because there are very many variables and it is more simple. As others have said, I think this is going to bite you in the arse later. K-I-S-S. It seems we have differing definitions of simple though. -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] unicode best practices
hmmm. I got round to this today. Installed e::w, put it at the top of the code ... but it's not saying anything at all (I guess I should be looking for warnings in the debug output?) On 2/15/07, Jonathan Rockway [EMAIL PROTECTED] wrote: Daniel McBrearty wrote: I also found once I started using the above, I needed to install C::V::TT::ForceUTF8 to avoid garbled output. This means you're probably not encoding octets to characters properly. See what encoding::warnings says about your code. Also, read http://www.catalystframework.org/calendar/2006/21 for unicode details. There is also somewhere a module which causes stash to be flagged utf8, but I haven't needed it. Yet ... Shouldn't be necessary if you're writing correct code. -- package JAPH;use Catalyst qw/-Debug/;($;=JAPH)-config(name = do { $,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //, ;$;]-[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;-setup; ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] www.engoi.com nearly migrated to catalyst
Hi, The port of www.engoi.com (currently a collection of cgi's under apache/mod_perl) to cat is nearly there. You can take a look at http://www.sodabean.net Note: 1. some pages are very slow. But they will be served as static pages in production, so no problem for now. (They are served dynamically here so that translators can see what is going on as they make edits.) 2. some CSS problems in IE to fix, as usual ... It doesn't look much different to the existing site, but under the hood it's a whole new app. The biggest thing we now have that was much missing is a way of managing the workflow of translations from dev to production via the translation server. This was a huge issue in the old site that made continuous development and upgrade of the site almost impossible. The flexibility of cat's MVC architecture has made this possible; multiple models to get data from the database, have a specialist api over the db, and to add new English text to the site in development without having the problem of keeping databases in sync. By grepping for text tags in templates feeding that back into the db, translators can now see the text tags for the site grouped by the pages in which they appear. The chained feature has been fantastic both for dividing the namespace by language (both the native language AND the language being learned), and also for providing access control to admin and translator functions by role. All of this has been so that we have a decent platform to add new features to the site in future (there's a lot of new stuff to add). It's been so busy doing this in my spare time that I have not thought much about making any of this available back to the community. I hope that that will change in future, and that one day engoi will have some nicely matured features to put back into cat. (First we have to get this thing off teh ground though ;-) ) lots of thanks to this list for immeasurable help in getting this job (nearly) done, and helping me along that never-ending learning curve. Daniel -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] insecure deps with Module::Pluggable::Fast
bit of a head scratcher ... : trying to boot my app under apache2/mod_perl. 2 boxes, each have the same codebase, exactly, including apache config files. One boots OK, the other says : [Mon Feb 26 20:28:50 2007] [error] Couldn't load Catalyst::Plugin::ConfigLoader::YAML, Insecure dependency in require while running with -T switch at /usr/local/lib/perl5/site_perl/5.8.8/Module/Pluggable/Fast.pm line 82.\n at /usr/local/lib/perl5/site_perl/5.8.8/Module/Pluggable/Fast.pm line 84.\nCompilation failed in require at (eval 4) line 3.\n when I try to start. Both have $Module::Pluggable::Fast::VERSION=0.18 The one that is OK didn't have M::P::F at all and was still running fine - I expected the problem to appear when I installed it. That box has not been used for dev at all, I just use it as a test server. It's possible that some module, somewhere, on the other is slightly older, but if so it's not one of the obvious ones ... any ideas? I can turn off taint for a bit, but it's odd. D -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] insecure deps with Module::Pluggable::Fast
one without a version string - but when I to cpan C::P::C::Y: it says its up to date ... that explains why it didn't even get on the one box. still not sure why the taint error though - guess I can remove M::P::F though, see if that fixes things thanks Brian On 2/26/07, Brian Cassidy [EMAIL PROTECTED] wrote: Daniel McBrearty wrote: [Mon Feb 26 20:28:50 2007] [error] Couldn't load Catalyst::Plugin::ConfigLoader::YAML, Insecure dependency in require while running with -T switch at /usr/local/lib/perl5/site_perl/5.8.8/Module/Pluggable/Fast.pm line 82.\n at /usr/local/lib/perl5/site_perl/5.8.8/Module/Pluggable/Fast.pm line 84.\nCompilation failed in require at (eval 4) line 3.\n when I try to start. Both have $Module::Pluggable::Fast::VERSION=0.18 What version of ConfigLoader do you have? Version 0.1 (from july of last year) removed the dep on M::P::F. -Brian ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] insecure deps with Module::Pluggable::Fast
you're right, sorry, my bad ... It was 0.06 - I just updated to 0.13, and that's fixed. Now I have a similar error in my schema ... anyone know the cpan command to globally update my libraries ... !? thanks again. On 2/26/07, Brian Cassidy [EMAIL PROTECTED] wrote: Daniel McBrearty wrote: one without a version string - but when I to cpan C::P::C::Y: it says its up to date ... that explains why it didn't even get on the one box. still not sure why the taint error though - guess I can remove M::P::F though, see if that fixes things You're looking at the wrong thing. Look at Catalyst::Plugin::ConfigLoader -- not ConfigLoader::YAML. Anyway, i know it's got to be old, because, since August of '06, the loader formats are stored in Config::Any (i.e. Catalyst::Plugin::ConfigLoader::YAML no longer exists). -Brian ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] insecure deps with Module::Pluggable::Fast
sorted. just needed to update DBIx::Class. thanks again. On 2/26/07, Daniel McBrearty [EMAIL PROTECTED] wrote: you're right, sorry, my bad ... It was 0.06 - I just updated to 0.13, and that's fixed. Now I have a similar error in my schema ... anyone know the cpan command to globally update my libraries ... !? thanks again. On 2/26/07, Brian Cassidy [EMAIL PROTECTED] wrote: Daniel McBrearty wrote: one without a version string - but when I to cpan C::P::C::Y: it says its up to date ... that explains why it didn't even get on the one box. still not sure why the taint error though - guess I can remove M::P::F though, see if that fixes things You're looking at the wrong thing. Look at Catalyst::Plugin::ConfigLoader -- not ConfigLoader::YAML. Anyway, i know it's got to be old, because, since August of '06, the loader formats are stored in Config::Any (i.e. Catalyst::Plugin::ConfigLoader::YAML no longer exists). -Brian ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] confused about file locations when running under apache/mod_perl
I have my complete apache/mod_perl install built under a single directory (/usr/local/apache2) and I normally stop/start apache from there using ./bin/apachectl start etc My app runs fine on the machine using the test server. I have various static files under Engoi/root, and templates are in Engoi/templates - Engoi/engoi.yaml tells TT where they are. (I also keep debug off normally, I set an env variable to turn it on, so I often start the test server with export ENGOI_DEBUG=1; ./script/engoi_server.pl -r ... ) So now I try to run it under apache2/mod_perl (which I know runs fine as my old site has used it for more than a year). The problem I get is that the templates directory is not seen. I have tried (as a temp thing while I work out what is happening) to symlink them into /usr/local/apache2, that doesn't help. (I also can't seem to set the env variable to turn on debug for the server process, which I can't currently figure out ... ) So my question is : when I start/stop apache, where will it look for the config file? and when it finds it, if there are relative paths to other stuff like templates, where does it expect them to be relative to? I expected that answer to be where you issue the command to start the server from, but that seems not to be the case. In the end I *might* migrate to fastcgi, so what would the answer be to this in that case? I guess, wherever you start the fastcgi server process from? cheers Daniel -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] unicode best practices
other stuff I've found: http://search.cpan.org/~bricas/DBIx-Class-0.07003/lib/DBIx/Class/UTF8Columns.pm - utf8 text fields in the db are automatically flagged as such when retrieved I also found once I started using the above, I needed to install http://search.cpan.org/~lyokato/Catalyst-View-TT-ForceUTF8-0.06/lib/Catalyst/View/TT/ForceUTF8.pm to avoid garbled output. There is also somewhere a module which causes stash to be flagged utf8, but I haven't needed it. Yet ... On 2/15/07, Richard Jolly [EMAIL PROTECTED] wrote: Hi, The crux of this question is what is best practice for a catalyst/DBIC app to have it fully unicode aware. We've got: MySQL with charset defined as UTF8 DBIC with on connect do SET NAMES and SET CHARSET and UTF8Columns Catalyst::Plugin::Unicode End actions specify content type as including charset utf8 Then, finally, making sure any files (which include log files and fixture files for tests) opened use the utf8 io layer. Should this be enough? Thanks, Richard ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Re: Why I chose Perl and Catalyst
perl : - massive library support via CPAN - very powerful, flexible language, supports many styles of programming - mature UTF8/unicode support - expert developer community - great runtime performance - has stood the test of time catalyst : - open architecture that allows leverage of above factors - dev community is general pretty expert, and very active -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Re: Why I chose Perl and Catalyst
Basically, this is a good list if you want to argue Perl vs. another contemporary dynamic language, but it makes little distinction when you're trying to contrast Perl against Java. fair point, but I don't see the point in that battle. There *is* an element of taste to programming language choice, and so it should be; who will write the code and what they like using *is* a substantial input into the decision process. If we are having this discussion from a how can we get java heads to use perl POV, I think we are wasting our time ... :-) - if not, what is your point? -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Re: Why I chose Perl and Catalyst
ah, sorry. I didn't pick up that bit of $c ... I wish him luck anyway. People are generally so polarised over the issue. On 2/14/07, A. Pagaltzis [EMAIL PROTECTED] wrote: * Daniel McBrearty [EMAIL PROTECTED] [2007-02-14 16:55]: fair point, but I don't see the point in that battle. I dunno about battle, but this subthread started with Leandro asking how to explain to his boss why they should pick Perl (and Catalyst, and DBIC, etc) over a Java stack. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] O’Reilly migh t yet be interested after all
it would be great. I agree, not just DBIx but also TT. The great thing about cat is it's flexibility. But as a beginner it can also be the worst thing. The teaching style needs to be something like look, it's modular, you can bolt just about anything you want to onto this once you understand how that works, but in the beginning, this is a good starting setup, which most people use at least for a while ... cheers On 2/6/07, A. Pagaltzis [EMAIL PROTECTED] wrote: Hi, I just had the following exchange on reddit: * a-p http://programming.reddit.com/info/12u8e/comments/c12vm0: There's a book in the making. Unfortunately, O'Reilly won't be the one publishing it. When the Catalyst devs approached them about a book, O'Reilly basically stated that they want only a single web framework in their lineup, and they've settled on Rails, and that's that. Short-sighted if you ask me (and I'm not just saying that because of Catalyst, there's also Django), but there ya go. To which Tim O'Reilly replied: * timoreilly http://programming.reddit.com/info/12u8e/comments/c131n8: I don't know who was supposed to have made that statement, but it doesn't make any sense to me. I'll look into it. That being said, I can imagine that an editor might have said that he or she thought that Rails had the ruby framework market wrapped up for now, and that there wasn't room for a book on another framework till said framework had proved to have strong adoption. That's a potentially legitimate market assessment – the computer book market is pretty brutal these days, and topics that once would have made for a successful book now don't sell enough copies to recover their costs – but even then, that would be a for now. A lot of publishers still throw stuff at the wall to see what sticks. We tend to publish books that we believe will succeed. And often, that means waiting till a new tool or framework has stood the test of time, and is at the right place on the adoption curve. It doesn't do anyone – the author, readers, bookstores, or the publisher – to publish a book that doesn't sell. Bookstores will give it a few months, and if it doesn't do well, it will be returned, and that's the end of that. Waiting a bit longer may actually increase your chances of success. It's a bit like surfing. Paddling too early is as bad as paddling too late – you have to catch the wave. O'Reilly has a history of publishing books before anyone else – we published the first commercial book on the internet, published about Perl in 1991, Linux in 1993 – but these technologies were actually not new when we published about them. They had proven themselves. They were just under the radar of other publishers. As to publishing too early, Ruby itself is a good example. We published our first Ruby books way too early, they flopped, and then we took our eye off the ball. Sounds good to me. I think where Perl is concerned, Catalyst has definitely shown to be sticky, and it seems to me that it's also stable enough at this point that a book about it has hope of being useful. (Book publishing is a slow process, and if the thing's still evolving rapidly, the book will be obsolete by the time it's on the shelves. Actually, I think a book about Catalyst would have to be a book about DBIx::Class as well, partially anyway, and that too is now at the point of having stabilised enough.) Time is right, I think; the strong response to the advent calendar is probably a good gauge for that. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] O’Reilly migh t yet be interested after all
indeed ... I stand corrected. On 2/6/07, Matt S Trout [EMAIL PROTECTED] wrote: On 6 Feb 2007, at 12:30, Daniel McBrearty wrote: it would be great. I agree, not just DBIx DBIx is the namespace for DBI extensions. I think you meant to say DBIx::Class. -- Matt S Trout, Technical Director, Shadowcat Systems Ltd. Offering custom development, consultancy and support contracts for Catalyst, DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for details. + Help us build a better perl ORM: http://dbix- class.shadowcatsystems.co.uk/ + ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] plat_forms contest started -- user feedback requested
neat. any idea what if any teams are using cat? On 1/25/07, Boris Ćeranić [EMAIL PROTECTED] wrote: Hi, Thank you for giving me a reminder :) I was certainly going to be available for reviews today. Best luck to our teams :) Regards, Boris On 25/01/07, Alvar Freude [EMAIL PROTECTED] wrote: Hi all, as mentioned some time ago, there is the plat_forms contest, see http://www.plat-forms.org/ All teams got their task two hours ago and now have 28 hours left ;-) You can support the teams by user feedback. The teams will post the URLs of their work on the plat_forms blog: http://www.plat-forms.org/2007/blog Perl teams are: Team 1 (Etat de Genève/Optaros) Team 2 (plusW) Team 5 (Revolution Systems) http://www.plat-forms.org/2007/the-teams There are also three PHP and Java teams. No Ruby, Python and .NET teams, because there where not enough teams. From the task description: PbT (People by Temperament) is a simple community portal where members can find others with whom they might like to get in contact: people register to become members, take a personality test, and then search for others based on criteria such as personality types, likes/dislikes etc. Members can then get in contect with one another if both choose to do so. The system has both an interactice user interface via HTML pagesand a WDL/SOAP-based programmatic interface. The intro slides with some information are here: http://www.plat-forms.org/2007/documents/task-intro The community may help the teams by giving user feedback and usual community support. Helping coding is not allowed ;-) Ciao Alvar -- ** Alvar C.H. Freude, http://alvar.a-blast.org/ ** http://www.wen-waehlen.de/ ** http://odem.org/ **http://www.assoziations-blaster.de/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Re: plat_forms contest started -- user feedback requested
well, it's easy to id the cat team :-) http://team1.plat-forms.org/ theirs is up and looks already partly functional. On 1/25/07, Daniel McBrearty [EMAIL PROTECTED] wrote: after about 20 you get this weird sense of actually being really really alert ... and never wrong ... On 1/25/07, A. Pagaltzis [EMAIL PROTECTED] wrote: * Matt S Trout [EMAIL PROTECTED] [2007-01-25 18:20]: On 25 Jan 2007, at 16:50, Boris Ćeranić wrote: It would be interesting to see how are they going to survive 30 hours of work... Are they going to catch some sleep at all, etc... 30hrs isn't really that much for a dev burn - I've pulled shifts that long pretty often during heavy hacking without a problem. It's when you get to around the 3 day mark without having had more than a couple hours sleep that it starts to get painful. The really bad thing is not a single 30-hour day, it's when you're doing a long string of 12- to 18-hour days. Sleep deprivation when well rested is actually documented to have a bunch of psychotropic effects including mild euphoria. Anyone who has stayed up long enough to get a weird sense of humour knows this first hand. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Re: Catalyst vs Rails vs Django Cook off
Like what? And what about those other design options is benchmarkable? 1. the language. For instance, a key factor against RoR for me was the fact that Ruby doesn't know where its going w.r.t. unicode. Perl has mature support for that. There are multiple other reasons why people like/dislike various langauges, and a lot of it, if we are honest, is taste, or factors specific to that project. 2. the library support in the language. Ditto. 3. as a subset of 2, templating systems, ORM's ... It may be that the differences between these things, platform to platform, are insignificant compared to other factors. OK. But if I was setting out to do this exercise (which I'm not, right now ...) I would make some basic measurements anyhow, at least as a start point. snip Because as long as the framework is not improbably slow, its contribution to an app's performance characteristics will just be noise in any realworld scenario. /snip So what are the key factors that influence performance? Why not design a benchmark such that it can show up those differences? I'm not pretending to know in advance what makes the difference. I don't. I just don't think that saying there's no point measuring it ... and expecting the world to just believe is a very realistic combination. Hence the question I was trying to ask in the other thread - what DOES make a realistic benchmark? snip Does that include dynamic content caching wizardry ? It is meaningless if you don't take into account real-life scenarios like reverse proxy cache invalidation policies (and tricks). This is just to say that all this perf talk is meaningless : sometimes the power you get from a well thought out framework allows you to do things that are close to magick, speed-wise among others. Comparing simple setups is ridiculous IMHO. /snip Fair enough. So why not try to design a benchmark in such a way that those techniques can be exploited? What is the simplest set of tests that has some meaning for you? -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] [OT] what would constitute a sensible set of benchmarks?
so a set of benchmarks would give you the chance to show that TIMTOWTDI, and the trade offs that exist between them. That would be pretty interesting to someone trying to compare frameworks. That's where having simple tests that exercise one aspect of the framework in isolation, as far as is possible, might have advantages. You see the differences between techniques, you see the effect they have, you have the opportunity to try to extrapolate what that actually means in terms of your app. At least, that's a technique that has served well in other branches of engineering - you reduce complexity to it's simplest cases, then wotk back maybe this is fundamentally different and that can't work, but at the moment I don't see why. Or any documented attempts to do it that have clearly failed ... On 1/16/07, Robert 'phaylon' Sedlacek [EMAIL PROTECTED] wrote: Perrin Harkins wrote: On Mon, 2007-01-15 at 13:24 +0100, Robert 'phaylon' Sedlacek wrote: Well, templating benchmarks maybe, but for an ORM I just have the feeling the larger factor is how you use it, not which. This is true, but the SQL generated by an ORM can have a big effect on performance. I usually hand-code the parts where I need the most performance, but many people will just rely on their ORM and hope for the best, and that can vary quite a bit between implementations (e.g. deleting multiple rows in one statement vs. thousands). And you can do both in DBIC. That's why benchmarking is so hard, TIMTOWTDI, which one will you benchmark? Same with Catalyst. For my apps, I use uri_for massively, some people don't, which way are we going to benchmark? Same with controller base classes vs action classes vs external modules. IMHO you can only really benchmark developers together with their framework of choice. -- # Robert 'phaylon' Sedlacek # Perl 5/Catalyst Developer in Hamburg, Germany { EMail = ' [EMAIL PROTECTED] ', Web = ' http://474.at ' } ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Catalyst vs Rails vs Django Cook off
I looked for that discussion - didn't find it. Do you have a pointer? In your experience, what is accounting for the other 99.9% fo runtime? Db access? templates? other? On 1/16/07, Matt S Trout [EMAIL PROTECTED] wrote: On 14 Jan 2007, at 15:26, Octavian Rasnita wrote: Hi, Here is ablog I just found. Is it true that Catalyst is so slow comparing with other frameworks? http://letsgetdugg.com/category/rails Is it true that for incredibly trivial applications Catalyst might serve less rps? Yes. Have I ever seen a real-world scenario where the things this benchmarks account for more than 0.1% of runtime? No. We discussed this. Re-read the old discussion. Thread over :) -- Matt S Trout, Technical Director, Shadowcat Systems Ltd. Offering custom development, consultancy and support contracts for Catalyst, DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for details. + Help us build a better perl ORM: http://dbix- class.shadowcatsystems.co.uk/ + ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Catalyst vs Rails vs Django Cook off
forget that ... found it http://www.gossamer-threads.com/lists/catalyst/users/10756?search_string=data%20retrieval;#10756 On 1/16/07, Daniel McBrearty [EMAIL PROTECTED] wrote: I looked for that discussion - didn't find it. Do you have a pointer? In your experience, what is accounting for the other 99.9% fo runtime? Db access? templates? other? On 1/16/07, Matt S Trout [EMAIL PROTECTED] wrote: On 14 Jan 2007, at 15:26, Octavian Rasnita wrote: Hi, Here is ablog I just found. Is it true that Catalyst is so slow comparing with other frameworks? http://letsgetdugg.com/category/rails Is it true that for incredibly trivial applications Catalyst might serve less rps? Yes. Have I ever seen a real-world scenario where the things this benchmarks account for more than 0.1% of runtime? No. We discussed this. Re-read the old discussion. Thread over :) -- Matt S Trout, Technical Director, Shadowcat Systems Ltd. Offering custom development, consultancy and support contracts for Catalyst, DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for details. + Help us build a better perl ORM: http://dbix- class.shadowcatsystems.co.uk/ + ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] [OT] what would constitute a sensible set of benchmarks?
completely academic at the moment, but it would be interesting to see the benchmark comparison thing done properly. If it were, the way would be to specify a set of application functions, let people within the various projects implement them as they wish, then benchmark. I suppose ... so what would be a decent set of tests? I'll have a stab ... 1. no db, no templating. Just have the app respond to a uri for a random number n, and respond with the random number in a plain text doc. so /text_string/abcde would expect to get back the string abcde in a text doc this could measure the ability of the app to parse the uri, and process it. 2. same with templating. Now we could expect the string back in a simple html template ... although that doesn't expect the template system to do much work ... /html_string/xyz ... 3. db access, no templating. The db type, config, schema and dataset should be spec'd as part of the tests, to factor this out as far as possible. Then we could have several tests: - just retrieve a row and display results /db_retrieve - same with one or more joins required /db_join - write/update a row /db_write 4. a random mix of all the above. Could use siege to actually do the tests. Of course, we might just end up proving that the db makes more difference than anything else ... This is just mindblobs at the moment, but the other thread made me think, and I wondered if something like this has been done already. Would be interesting D -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] [OT] what would constitute a sensible set of benchmarks?
e ability of the app to parse the uri, and process it. I think this is a bit too simple. We should probably look at usual kinds of URIs used in applications here. / /foo/bar/baz /foo/1/bar/2/baz/3/4 /foo?bar=baz ...and probably more... Also, there should be more than one action. I would say about 50 might be a good measure, though my current app has a lot more of them... sure. It would certainly be possible to start simple and then get more complicated ... Personally, I don't care about templating and ORM benchmarks, why not? -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Catalyst vs Rails vs Django Cook off
they are not, but when you choose a framework you don't just choose a dispatcher. You choose all the other design options that go with it. On 1/15/07, Perrin Harkins [EMAIL PROTECTED] wrote: On Mon, 2007-01-15 at 11:35 +0100, Robert 'phaylon' Sedlacek wrote: To summarize (again): The benchmark doesn't benchmark Catalyst, only it's dispatcher I think it's a lame benchmark too, but isn't a dispatcher mostly what Catalyst is? DBIx::Class and TT are not Catalyst, as people often mention on the list. - Perrin ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] faking $c-user in tests
in test scripts I am able to (for instance) mess with the config my doing my $config = MyApp-config; $config-{some_val} = 'test value'; given that I am happy that my Authentication code is well tested in some other test script, is there a way to somehow bypass it, forcing calls to $c-user_exists and $c-user in the module I'm testing to return values which I directly control in the test script? thanks Daniel -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] faking $c-user in tests
heh ... cheers ... think I've sussed it : my $ue = 1; my $username = 'NotAnAdmin'; use Test::MockObject; my $user = Test::MockObject-new; $user-mock( 'id', sub {return $username} ); package MyApp; sub user { return $user; } sub user_exists { return $ue; } package main; ... at least it looks sane at the mo ... On 1/13/07, Ash Berlin [EMAIL PROTECTED] wrote: Daniel McBrearty wrote: in test scripts I am able to (for instance) mess with the config my doing my $config = MyApp-config; $config-{some_val} = 'test value'; given that I am happy that my Authentication code is well tested in some other test script, is there a way to somehow bypass it, forcing calls to $c-user_exists and $c-user in the module I'm testing to return values which I directly control in the test script? thanks Daniel Slightly hacky but something like: { no warnings 'redefine'; # Not sure if this will be needed in this case *MyApp::user = sub { return bless {id='foo'}, MyApp::UserClass }; } Might work. Or it might blow up in your face cos you looked at it funny - YMMV. -ash ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Re: Preferred Ajax framework
another + for jquery. just because I got going so quickly and easily, i have to say. On 1/9/07, Kieren Diment [EMAIL PROTECTED] wrote: On 10/01/07, A. Pagaltzis [EMAIL PROTECTED] wrote: * John Napiorkowski [EMAIL PROTECTED] [2007-01-09 22:50]: I prefer Jquery. Another vote for jQuery. The docs for jquery are very good. See http://dev.catalyst.perl.org/repos/Catalyst/trunk/examples/JQChat for a very simple example. There's a few Prototype examples in the example directory as well. Mind you, other people prefer Dojo or YUI. Basically it's up to you ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] sane AJAX strategy
On 1/6/07, Bill Moseley [EMAIL PROTECTED] wrote: On Fri, Jan 05, 2007 at 12:24:37PM +0100, Daniel McBrearty wrote: I just started using AJAX (or AHAH actually ... ) a little. I like the lightness it gives but I've been slow to pick up because I want to be sure that pages work without js, and I haven't figured out a generic method yet. I'm sure others are ahead of me on this ... Typical scenario without AJAX : form button submits to URL, which triggers a single Cat action, which is rendered by a single template, usually of the same name. That's simple, just a one-to-one relationship. When we use AJAX, things look very similar, EXCEPT that only a part of a page is loaded. This implies that for the non-js user of the same page, multiple actions and templates have been combined so that the result is identical, even though the whole page loaded. When you say above only part of a page is loaded are you talking about the content part and not the headers, footers, and menus -- or talking about part of the content such as just a new row in a table or updating a single field in a form? It could be either ... usually some part of the content, but it could be all of it. I am talking here though about scenarios where it's more AHAH than AJAX ... the function that makes the request just sticks it as-is into the page, rather than doing some kind of decode on it. Mostly because that seems simpler, and I like simple ... Not sure exactly what you are asking for, but I'll explain what I do if that helps -- and besides I'm no fan of being warnocked. Ha ... I had to look that up, I'd not heard of Warnock before. I ask silly questions sometimes, but silly questions sometimes turn out to be useful, so I don't take it personally ... (grin) ... though I appreciate the response. I don't use that much AJAX, but I do use it for, say, displaying the next page of a list or sorting a table by a column by clicking on a column heading, or selecting a different tab to limit a table's display to a category of some type. My templates are already split up quite a bit. So, I have templates that know how to display tabs, table column headings, and how to build the table. When I update a table (e.g. next page) the same controller code is called for both AJAX and for non-ajax requests (it's the same request url) and the same template is called (derived from the controller's action name). ok ... so does the the controller know that the req is ajax? how? an added argument like ?ajax=true perhaps ... ? I use the typical TT wrapper method to build my entire page from headers, footers, banners, menus, etc. But, the TT wrapper code can detect it's an AJAX request from the request headers and knows to only build the content (i.e. the table with data I'm sorting), but not the entire page. Then my end action also knows it's an ajax request and then returns using JSON. right. so in this case there is a generic [% IF ajax %] in your template code that suppresses headers, footers and so on? which will be fine if you are getting all the content, but not part of it, I guess ? Since I use common template code for generating tabs and table headers and use the same urls for my ajax requests it's easy for javascript to search the DOM and create the events for the ajax requests. That way my HTML markup doesn't have to do anything specific for the ajax calls. That's the commonly recommended method, of course, keeping the behavior and html separate. For AJAX requests that don't update the entire page content, like an auto-complete search box, I still use the same controller as for the non-ajax request but then the controller has a little extra code to return just the search results not the entire new content -- it's just one extra line of code in most cases. Not always the most efficient method (since I end up returning more columns than is really needed for the ajax update), but so far has not been an problem. so do you typically use the same controller action, and have a flag to tell it to act differently? Of course, for updating a single field in a form (e.g. type in a zip code and city and state are automatically filled in) I use a separate controller that just handles the ajax code. In that case there's no need for an extra template since it's just updating existing markup -- the controller just returns JSON. So, I try to write as much as possible without coding specifics for the ajax calls. It's the standard recommendation to write the code for non-ajax usage, then add that behavior on page load. And, then I divide my templates into small enough parts that can be used for ajax and non-ajax calls based on how the request comes in. Thanks for the feedback. It's been enough to feed my thoughts a bit. I'll go and have a play with the code and see what comes out. Daniel -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131
Re: [Catalyst] IMPORTANT: Catalyst::Plugin::FormBuilder obsoleted by ::Controller::FormBuilder
what happens if you need to deprecate it ... ? (I'm only half joking ... ) On 1/3/07, Robert 'phaylon' Sedlacek [EMAIL PROTECTED] wrote: Matthieu Codron wrote: On 1/2/07, Joe Landman [EMAIL PROTECTED] wrote: Might be a good thing to have an MODULES_CURRENT/MODULES_OBSOLETE list, or ask the module authors to simply note the obsolescence in an updated POD. I think it is a terrific idea. Catalyst is a lot about choice and flexibility, but reading the list makes me really think that there are good choices, bad choices, and even good ones that become bad. I remember an effort for making a DeprecatedPlugins Plugin, but I don't know where that stands. A plugin emmitting warnings based on a list in the module (deprecated modules and replacements, specific versions, etc) sounds easier to manage and keep up-to-date than a wiki page. -- # Robert 'phaylon' Sedlacek # Perl 5/Catalyst Developer in Hamburg, Germany { EMail = ' [EMAIL PROTECTED] ', Web = ' http://474.at ' } ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] IMPORTANT: Catalyst::Plugin::FormBuilder obsoleted by ::Controller::FormBuilder
another thing : doesn't that imply that you have to install the deprecated plugin before the DepPlugins Plugin jumps up an says you shouldn't ha' done that jimmy ... (presumably before breathing alcohol at you and pissing in your flower pots). All that is really needed is that instead of installing something and having the Cat::Plugin::MST say don't use that on this list, there is a master list someplace. At least then, a noob should only make the mistake once ... and I don't see why it's harder, frankly, to maintain such a list on a wiki than in the code of a plugin. I really dislike the idea of allocating memory to code that is just stopping me do something that I ought to know about anyway. On 1/3/07, Daniel McBrearty [EMAIL PROTECTED] wrote: what happens if you need to deprecate it ... ? (I'm only half joking ... ) On 1/3/07, Robert 'phaylon' Sedlacek [EMAIL PROTECTED] wrote: Matthieu Codron wrote: On 1/2/07, Joe Landman [EMAIL PROTECTED] wrote: Might be a good thing to have an MODULES_CURRENT/MODULES_OBSOLETE list, or ask the module authors to simply note the obsolescence in an updated POD. I think it is a terrific idea. Catalyst is a lot about choice and flexibility, but reading the list makes me really think that there are good choices, bad choices, and even good ones that become bad. I remember an effort for making a DeprecatedPlugins Plugin, but I don't know where that stands. A plugin emmitting warnings based on a list in the module (deprecated modules and replacements, specific versions, etc) sounds easier to manage and keep up-to-date than a wiki page. -- # Robert 'phaylon' Sedlacek # Perl 5/Catalyst Developer in Hamburg, Germany { EMail = ' [EMAIL PROTECTED] ', Web = ' http://474.at ' } ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] IMPORTANT: Catalyst::Plugin::FormBuilder obsoleted by ::Controller::FormBuilder
I'd make that optional, per config or environment variable. Just loading stuff off the net by default seems bad to me. Also, devs without internet connection could get in trouble. IMO it also shouldn't update itself, but rather just tell the user if there's a newer version. yup, makes sense. -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Article on web frameworks ommits Catalyst
I tried a few times to figure what continuations are, and why I might want them, and I never succeeded. I usually like things as simple as possible ... but I'd still like to get it. On 1/2/07, John Napiorkowski [EMAIL PROTECTED] wrote: --- Kieren Diment [EMAIL PROTECTED] wrote: Hey, There's an article, Web Framework Manifesto here: http://blog.lostlake.org/index.php?/archives/16-Web-Framework-Manifesto.html I've written a comment in the article suggesting that this is a pretty major ommission and that he might want to evaluate Catalyst and do an update. The author seems coherent and reasonably knowledgable to me, so how bout it guys? Maybe you should let him know his mistake too? This is actually quite an interesting thoughtdump on what we'd like in a web development framework. Some of the things mentioned, such as a great dispatching system, straightforward ORM support and easy to extend APIS (Plugins, customized Controllers, Views or Models) we have. However some of the things mentioned I don't see as current strong points of Catalyst, such as the idea of web pages being highly componentized and capable of managing their own state. This could just be my ignorance though. The article is big on continuations. Catalyst has a plugin for this but I'm not sure many people know what to do with it or what the advantages could be. To be honest I'm not someone that could answer that question. One thing not mentioned as a strong point for a framework is something that is a big plus for perl, which is the size of CPAN. --john ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] questions on Reaction
I took a look, I got it to run, I went ... ah ... now it's silly questions time ... 1. Where does Reaction score over Cat, as a web framework? I get that it is domain/interface more than straight MVC ... 2. For the example code, it seems to do the crud style stuff pretty well - I also get (I think) that this is actually functionality of the framework, not code that has been generated ... to quote the FAQ :: At the moment, Reaction runs on Catalyst for web development. ... so is it possible to use this part of reaction within a cat app? is Reaction running *within* catalyst? If I have an existing cat app but think I might fancy a bit of R in there, am I going to want to shoot myself later ... ;-? cheers. I hope I can get enough of this to make some simple cruddish stuff I need happen, and hope fully take advantage of Reaction as it evolves ... D -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Re: questions on Reaction
ok, answered my own question, partly. Reaction::Controller isa Cat::C::Bindlex, which is a Cat::C so I can use a Reaction::Controller as a souped up Cat::C, I guess ... On 1/2/07, Daniel McBrearty [EMAIL PROTECTED] wrote: I took a look, I got it to run, I went ... ah ... now it's silly questions time ... 1. Where does Reaction score over Cat, as a web framework? I get that it is domain/interface more than straight MVC ... 2. For the example code, it seems to do the crud style stuff pretty well - I also get (I think) that this is actually functionality of the framework, not code that has been generated ... to quote the FAQ :: At the moment, Reaction runs on Catalyst for web development. ... so is it possible to use this part of reaction within a cat app? is Reaction running *within* catalyst? If I have an existing cat app but think I might fancy a bit of R in there, am I going to want to shoot myself later ... ;-? cheers. I hope I can get enough of this to make some simple cruddish stuff I need happen, and hope fully take advantage of Reaction as it evolves ... D -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Re: questions on Reaction
The only thing to remember is that it expects the I18N plugin to be loaded since all text is run through that before display Hmmm. I specifically don't want to use that plugin, as we have our own version which is similar but different. We may be a bit wrongheaded about this at the moment, but I've not yet found any practical reason to change it ... I don't need any transation of text for the crud stuff anyhow - it's all purely admin functions, which are English only. But I guess all it really wants is to see methods with the appropriate names in the $c namespace ... so no problem. cheers D On 1/2/07, Matt S Trout [EMAIL PROTECTED] wrote: On 2 Jan 2007, at 16:12, Daniel McBrearty wrote: ok, answered my own question, partly. Reaction::Controller isa Cat::C::Bindlex, which is a Cat::C so I can use a Reaction::Controller as a souped up Cat::C, I guess ... Precisely. Reaction drops in happily to any existing Cat app, we've done hybrids and gradual ports already. The only thing to remember is that it expects the I18N plugin to be loaded since all text is run through that before display, and you need to have a Reaction::UI::Renderer::XHTML subclass under MyApp::View for it to use. Reaction also pretty much solely uses Chained, so sticking R-based controllers off under a prefix of some sort isn't an issue. -- Matt S Trout, Technical Director, Shadowcat Systems Ltd. Offering custom development, consultancy and support contracts for Catalyst, DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for details. + Help us build a better perl ORM: http://dbix- class.shadowcatsystems.co.uk/ + ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Re: questions on Reaction
OK. It is a good idea to make sure everything in the view goes through the I18N code, for sure. I'd like to merge what we are doing there with the cat plugin, but tat can wait ... next questions, about the Root.pm of the example app ... : 1. use base 'Reaction::UI::RootController'; use Reaction::Class; use aliased 'Reaction::UI::ViewPort'; do these HAVE to be in Root.pm? I just want to use this stuff in my admin code at the moment ... say it all sits in under MyApp::Controller::Admin ... can I just put these there? 2. __PACKAGE__-config( view_name = 'XHTML', window_title = 'Reaction Test App', namespace = '', ); sub base :Chained('/') :PathPart('') :CaptureArgs(0) { my ($self, $c) = @_; $self-push_viewport(ViewPort, layout = 'xhtml'); } I'm just not getting this bit. WHy do I want your XHTML view (it happens that I use xhtml anyway ... ) but what's it all about? 3. the root action is using a viewport, pushing the template name onto it ... what does a viewport actually do over, say, a standard TT template? thanks. I'll prod about with it anyway and see what happens ... On 1/2/07, Matt S Trout [EMAIL PROTECTED] wrote: On 2 Jan 2007, at 18:52, Daniel McBrearty wrote: The only thing to remember is that it expects the I18N plugin to be loaded since all text is run through that before display Hmmm. I specifically don't want to use that plugin, as we have our own version which is similar but different. We may be a bit wrongheaded about this at the moment, but I've not yet found any practical reason to change it ... I don't need any transation of text for the crud stuff anyhow - it's all purely admin functions, which are English only. But I guess all it really wants is to see methods with the appropriate names in the $c namespace ... so no problem. Yep, absolutely. But it was kinda critical to our use to enable L10N from the ground up so we used the standard approach. I explicitly -don't- check to see if the plugin's loaded though and never will - I might need to implement something completely different myself one day too :) -- Matt S Trout, Technical Director, Shadowcat Systems Ltd. Offering custom development, consultancy and support contracts for Catalyst, DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for details. + Help us build a better perl ORM: http://dbix- class.shadowcatsystems.co.uk/ + ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Re: questions on Reaction
to be specific, I'm now getting : Caught exception in Engoi::Controller::Admin-end Can't call method render on an undefined value at /home/daniel/work/engoi/trunk/Engoi/script/../lib/Reaction/UI/Window.pm line 63. which I guess is caused by the fact that I have not put those templates ... somewhere ... On 1/2/07, Daniel McBrearty [EMAIL PROTECTED] wrote: gotcha. The only part I had to put in Root.pm was the __PACKAGE__-config( ... ), which is logical. I found a lot of templates under root/base ... including 'xhtml' which at some point calls [% INCLUDE header; window.render_viewport(self.inner); %] which I guess then runs down the various objects that were added with $self-push_viewport(ViewPort, 'blah') in the controllers. These templates have lots of apparently widget-orientated stuff ... is this library code or app code used to generate the crud stuff? how do I set up where it lives in my app? On 1/2/07, Matt S Trout [EMAIL PROTECTED] wrote: On 2 Jan 2007, at 20:10, Daniel McBrearty wrote: OK. It is a good idea to make sure everything in the view goes through the I18N code, for sure. I'd like to merge what we are doing there with the cat plugin, but tat can wait ... next questions, about the Root.pm of the example app ... : 1. use base 'Reaction::UI::RootController'; use Reaction::Class; use aliased 'Reaction::UI::ViewPort'; do these HAVE to be in Root.pm? I just want to use this stuff in my admin code at the moment ... say it all sits in under MyApp::Controller::Admin ... can I just put these there? They need to be in an appropriate namespace to supply begin and end actions. If all your reaction controllers are under ::Admin:: then that's fine - that's usually where we start when doing conversions (or where we stop when writing hybrids :) 2. __PACKAGE__-config( view_name = 'XHTML', window_title = 'Reaction Test App', namespace = '', ); sub base :Chained('/') :PathPart('') :CaptureArgs(0) { my ($self, $c) = @_; $self-push_viewport(ViewPort, layout = 'xhtml'); } I'm just not getting this bit. WHy do I want your XHTML view (it happens that I use xhtml anyway ... ) but what's it all about? You need to be using a view that inherits from Reaction::UI::Renderer::XHTML; it does a few bits and pieces above and beyond the standard TT view that are required for everything to work, and will likely soon to rather more above and beyond as layout classes get added to help extract even more logic out of the templates. 3. the root action is using a viewport, pushing the template name onto it ... what does a viewport actually do over, say, a standard TT template? A viewport is nothing like a template - a viewport object provides a viewport onto a particularly model display or mutation and encapsulates all the logic required for handling events from the user and altering the data visible to the view/layout stuff appropriately. In this case the viewport doesn't actually provide any data in and of itself - it's there as a placeholder for the xhtml document layout to hang off. The ListView and ActionForm viewports are probably more educational in terms of the point of such objects. -- Matt S Trout, Technical Director, Shadowcat Systems Ltd. Offering custom development, consultancy and support contracts for Catalyst, DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for details. + Help us build a better perl ORM: http://dbix- class.shadowcatsystems.co.uk/ + ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Re: questions on Reaction
ok ... but I have /root as my site base (static files), all my tempates are in /templates ... can I put them in /templates/base somehow? On 1/2/07, Matt S Trout [EMAIL PROTECTED] wrote: On 2 Jan 2007, at 21:20, Daniel McBrearty wrote: gotcha. The only part I had to put in Root.pm was the __PACKAGE__-config( ... ), which is logical. I found a lot of templates under root/base ... including 'xhtml' which at some point calls [% INCLUDE header; window.render_viewport(self.inner); %] which I guess then runs down the various objects that were added with $self-push_viewport(ViewPort, 'blah') in the controllers. Basically, yes. These templates have lots of apparently widget-orientated stuff ... is this library code or app code used to generate the crud stuff? how do I set up where it lives in my app? Currently, using a symlink, because I've not come up with a general solution and wanted something trivial to rip out once I do. To add your own templates, stick 'em in root/ of your app, do an INCLUDE on whichever base template you're subclassing and then define BLOCKS appropriately plus setting the appropriate foo_block var to the name of your own blocks - ISTR listview subclasses listview_base in the default stuff as a reasonably simple example. -- Matt S Trout, Technical Director, Shadowcat Systems Ltd. Offering custom development, consultancy and support contracts for Catalyst, DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for details. + Help us build a better perl ORM: http://dbix- class.shadowcatsystems.co.uk/ + ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Re: questions on Reaction
OK, this is a little odd ... adding MyApp::View::XHTML.pm with contents package Engoi::View::XHTML; use Reaction::Class; extends 'Reaction::UI::Renderer::XHTML'; 1; somehow stamps on the config for my TT view, which is in yaml and looks like this: View::TToolkit: INCLUDE_PATH: 'templates' TEMPLATE_EXTENSION: '.tt' is the template path somehow hardcoded into Reaction::UI::Renderer::XHTML.pm ? I looked at the source, and I didn't see anything that looks like that ... On 1/2/07, Daniel McBrearty [EMAIL PROTECTED] wrote: On 1/2/07, Matt S Trout [EMAIL PROTECTED] wrote: On 2 Jan 2007, at 21:26, Daniel McBrearty wrote: to be specific, I'm now getting : Caught exception in Engoi::Controller::Admin-end Can't call method render on an undefined value at /home/daniel/work/engoi/trunk/Engoi/script/../lib/Reaction/UI/ Window.pm line 63. That's failure to find the view. gottit. Add MyApp::View::XHTML.pm as per the example. now I get file error - component: not found ... -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Re: questions on Reaction
to give the extra info ... if I have just my Admin controller with just: package Engoi::Controller::Admin; use strict; use warnings; #use base 'Catalyst::Controller'; use base 'Reaction::UI::RootController'; use Reaction::Class; use aliased 'Reaction::UI::ViewPort'; 1; (no actions ...) and the Engoi::View::XHTML.pm exists, I get an error that the template is not found. If I rename to Engoi::View::XHTML.pm.blah ... the error goes. (The extra bit of config info in ENgoi.pm is also commented out.) Hence, I'm thinking that the one view is somehow messing with the other. I'll take another look at it tomorrow. thanks for the help. On 1/2/07, Daniel McBrearty [EMAIL PROTECTED] wrote: OK, this is a little odd ... adding MyApp::View::XHTML.pm with contents package Engoi::View::XHTML; use Reaction::Class; extends 'Reaction::UI::Renderer::XHTML'; 1; somehow stamps on the config for my TT view, which is in yaml and looks like this: View::TToolkit: INCLUDE_PATH: 'templates' TEMPLATE_EXTENSION: '.tt' is the template path somehow hardcoded into Reaction::UI::Renderer::XHTML.pm ? I looked at the source, and I didn't see anything that looks like that ... On 1/2/07, Daniel McBrearty [EMAIL PROTECTED] wrote: On 1/2/07, Matt S Trout [EMAIL PROTECTED] wrote: On 2 Jan 2007, at 21:26, Daniel McBrearty wrote: to be specific, I'm now getting : Caught exception in Engoi::Controller::Admin-end Can't call method render on an undefined value at /home/daniel/work/engoi/trunk/Engoi/script/../lib/Reaction/UI/ Window.pm line 63. That's failure to find the view. gottit. Add MyApp::View::XHTML.pm as per the example. now I get file error - component: not found ... -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Re: Accessing $c from Model
FWIW ... : what I've noticed about using models (or not) ... : 1. the advantage of using a model mostly seems to be that it autoloads, and then is accessible everywhere from $c. Otherwise, there doesn't seem to be much difference from just having a normal perl library. 2. so if you just need data/logic for use in one controller, a standard library may be better. 3. usually, I'm finding its better to try to keep the models as pure data sources, and not have them interact, or be context dependent. So I try to make it the controllers job to do anything that involves context, or to connect different models together where necessary. That seems to result in a cleaner API. I have started writing modules that took $c as an argument, but generally took it out later. 4. of course there are exceptions ... which is why a framework that has flexibility and power is worth investing time to learn, even if it takes longer than one that says we do it this way around here ... this is just ideas that I've seen starting to emerge from many learner's mistakes ... others will know different / better ... On 12/28/06, A. Pagaltzis [EMAIL PROTECTED] wrote: * Jonathan Rockway [EMAIL PROTECTED] [2006-12-27 21:25]: No, it's not. Creating an object in Perl amounts to setting a flag (the OBJECT flag in subclasses of SvPVMG, to be exact). See illguts: http://gisle.aas.no/perl/illguts/ Are you being too literal on purpose? Yeah blessing a ref is just setting a flag but you need a referee for that ref and people don't consider its creation a separate step in general. * Mark Zealey [EMAIL PROTECTED] [2006-12-27 17:20]: On Wednesday 27 December 2006 1:01 pm, Ash Berlin wrote: Very very *VERY* bad idea. __PACKAGE__-mk_accessors(context); sub ACCEPT_CONTEXT { my ($self, $c, @args) = @_; my $new = bless({ %$self }, ref $self); $new-context($c); return $new; } Isn't that really really slow though? Constructing a new object for each call? Well, it depends. If you call `$c-Model('Log')` a ton of times, then it will indeed be slow. If you don't, you won't notice. If you've *determined* from profiling that `$c-Model('Log')` is called enough to be a bottleneck, you have two options. The trivial one is that to store the object returned in a variable and then make your logging calls on that variable, so you don't go through `ACCEPT_CONTEXT` constantly. The other is to memoise `ACCEPT_CONTEXT` so when it's passed the same `$c`, it always returns the same copy. You'll have to be very careful about your cache though; it's easy to introduce leaks. If Catalyst depends critically on object destruction timing, you might even break the whole thing alltogether. In summary: avoid caring too much without specific reason to. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] creating a model
that's pretty interesting Octavian. What do you use to read the screen as a blind user? On 12/22/06, Octavian Rasnita [EMAIL PROTECTED] wrote: Just learn and use Linux :) (Oops did I say that out loud?) I use Linux for running the created application, but not for developing it. I need to develop it under Windows, because Linux is a very poor operating system, good for running servers, but not very good as a desktop. I am blind, and the accessibility of Linux GUIS are very poor, the screen readers that work under Linux cannot compare with those that run under Windows. I think the fact that the perl programs need to be ported to other operating system sometimes with a pretty big effort, make it a less and less popular language. Maybe perl6 will solve this, but I hope to live until then. :-) Happy Holidays everyone! Thank you and I wish you the same. Happy holidays! Octavian ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] VMware Image
the clone I made last night was pretty big --- 5GB or so. When I get some time I'll take a look to see where that is coming from. On 12/21/06, Thomas Hartman [EMAIL PROTECTED] wrote: There's also pimpmycat. Takes a while to install, but more or less all you have to is keep hitting the return key until it's done. Puts everything (including local perl) under whatever directory you specify. http://code.google.com/p/pimpmycat/ 2006/12/21, Daniel McBrearty [EMAIL PROTECTED]: Not sure. I've never tried before. I'm just cloning my m/c now. All I have to do then would be to remove all my working source and so on from my home, and change the password. That should leave you with a working cat install plus all the DBIx, TT, as well as apache, postgres and mysql. It might be a bit chunky though ... we'll see what happens ... On 12/21/06, Brian [EMAIL PROTECTED] wrote: Do you know what the approximate filesize would be (zipped or RAR'd)? Ubuntu would be great. Thanks, Brian Daniel McBrearty wrote: does anyone have workable hosting for such a thing? I do my dev on an Ubuntu VM running on an XP host. It wouldn't be *that* much hassle for me to clone what I have, clean up a bit, and put a basic cat install on there. might have to wait a few weeks though, all the spare time I have goes into doing dev work at the mo. But I'd be glad to do it. On 12/21/06, Brian [EMAIL PROTECTED] wrote: If that is so you can download the image and have a working development system, I'd love it. I want to look into Catalyst (currently use PHP / Smarty), but don't have a lot of spare time right now to research it. A ready to run image would make it way easier to get started, especially if it had some sample applications already in place. I learn really fast from seeing complete sample applications. Thanks, Brian ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] VMware Image
it's all yours ;-) if you have time to sort this from a clean system, it likely makes more sense than me messing around with a copy of my working system which has all manner of stuff on it. cheers D I think as long as it has cat, TT, DBIX and mysqlite, that's enough. On 12/21/06, Rhett Creighton [EMAIL PROTECTED] wrote: I'm probably going to make a few vmware images for myself to use that will be on the larger side (more than 300 MB compressed). To give people an idea of the minimum possible filesize, here is a standard install of ubuntu 6.10-server in a 63 MB package: http://www.jcinacio.com/stuff/VMware-UbuntuServer-6.10/ The actual extracted size is 365MB. I just took his image, installed cat-in-a-box, made a sample catalyst app, ran the server, and used the app from another machine on the local network. Without doing anything tricky, I simply zipped up that image and it came out to be 96 MB. If I used strong compression, it came out to 76 MB. However, I think stronger compression defeats the point of this being a susposedly easy package to deploy. I'll see if I can put together a nice ~150MB package. I don't know if the catalyst site can host that, or wants to, but I'll send it to whoever wants it. Rhett On Thu, 21 Dec 2006, Daniel McBrearty wrote: the clone I made last night was pretty big --- 5GB or so. When I get some time I'll take a look to see where that is coming from. On 12/21/06, Thomas Hartman [EMAIL PROTECTED] wrote: There's also pimpmycat. Takes a while to install, but more or less all you have to is keep hitting the return key until it's done. Puts everything (including local perl) under whatever directory you specify. http://code.google.com/p/pimpmycat/ 2006/12/21, Daniel McBrearty [EMAIL PROTECTED]: Not sure. I've never tried before. I'm just cloning my m/c now. All I have to do then would be to remove all my working source and so on from my home, and change the password. That should leave you with a working cat install plus all the DBIx, TT, as well as apache, postgres and mysql. It might be a bit chunky though ... we'll see what happens ... On 12/21/06, Brian [EMAIL PROTECTED] wrote: Do you know what the approximate filesize would be (zipped or RAR'd)? Ubuntu would be great. Thanks, Brian Daniel McBrearty wrote: does anyone have workable hosting for such a thing? I do my dev on an Ubuntu VM running on an XP host. It wouldn't be *that* much hassle for me to clone what I have, clean up a bit, and put a basic cat install on there. might have to wait a few weeks though, all the spare time I have goes into doing dev work at the mo. But I'd be glad to do it. On 12/21/06, Brian [EMAIL PROTECTED] wrote: If that is so you can download the image and have a working development system, I'd love it. I want to look into Catalyst (currently use PHP / Smarty), but don't have a lot of spare time right now to research it. A ready to run image would make it way easier to get started, especially if it had some sample applications already in place. I learn really fast from seeing complete sample applications. Thanks, Brian ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] templates
I have my templates at the same level as root as you mention, I've not come across any problems. On 12/20/06, John Napiorkowski [EMAIL PROTECTED] wrote: --- Octavian Rasnita [EMAIL PROTECTED] wrote: Hi, Could you please tell me why the templates should be put under the /root directory? Well, the only good reason I can think of is that since it's the default all other Catalyst developers will look for them there first. Otherwise I know the whole directory structure best practices thing is an ongoing debate. I don't think we've really figured it out yet :) Personally I don't like /root either but just grew used to it. Wouldn't be more appropriate to have a templates directory on the same directory where /root is? You can do that if you want; I can't judge what is more appropriate. Can I create a separate directory with templates which are not under /root (for not allowing accessing the templates from the web)? Sure, you can create a directory called /templates at the same level as root, and if you are using template toolkit for your view you can set the search path to find your new directory. Here's what I did (assuming you have a TT view called TT.pm) in my myapp.yml file. 'View::TT': INCLUDE_PATH: - __path_to(templates)__ You might need to check the docs, I grabbed this from a project I played with almost a year ago when I started with Catalyst. Although you can also configure static simple or apache to not serve your template extensions, if you'd rather keep it all in root. static: no_logs: 0 #I like to see logs ignore_extensions: - tmpl - tt - tt2 # or whatever extension you use Thanks. Octavian ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] VMware Image
does anyone have workable hosting for such a thing? I do my dev on an Ubuntu VM running on an XP host. It wouldn't be *that* much hassle for me to clone what I have, clean up a bit, and put a basic cat install on there. might have to wait a few weeks though, all the spare time I have goes into doing dev work at the mo. But I'd be glad to do it. On 12/21/06, Brian [EMAIL PROTECTED] wrote: If that is so you can download the image and have a working development system, I'd love it. I want to look into Catalyst (currently use PHP / Smarty), but don't have a lot of spare time right now to research it. A ready to run image would make it way easier to get started, especially if it had some sample applications already in place. I learn really fast from seeing complete sample applications. Thanks, Brian Rhett Creighton wrote: Is anyone working on a vmware image for Catalyst like the docs say? I'm starting to make one for myself, maybe with damn small linux. Though, I've never done this before. Let me know if anyone has suggestion, or wants to help, or already did this. Rhett ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] VMware Image
Not sure. I've never tried before. I'm just cloning my m/c now. All I have to do then would be to remove all my working source and so on from my home, and change the password. That should leave you with a working cat install plus all the DBIx, TT, as well as apache, postgres and mysql. It might be a bit chunky though ... we'll see what happens ... On 12/21/06, Brian [EMAIL PROTECTED] wrote: Do you know what the approximate filesize would be (zipped or RAR'd)? Ubuntu would be great. Thanks, Brian Daniel McBrearty wrote: does anyone have workable hosting for such a thing? I do my dev on an Ubuntu VM running on an XP host. It wouldn't be *that* much hassle for me to clone what I have, clean up a bit, and put a basic cat install on there. might have to wait a few weeks though, all the spare time I have goes into doing dev work at the mo. But I'd be glad to do it. On 12/21/06, Brian [EMAIL PROTECTED] wrote: If that is so you can download the image and have a working development system, I'd love it. I want to look into Catalyst (currently use PHP / Smarty), but don't have a lot of spare time right now to research it. A ready to run image would make it way easier to get started, especially if it had some sample applications already in place. I learn really fast from seeing complete sample applications. Thanks, Brian ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] C::P::Email and testing
I'm not completely following the action class thing, but the way that seems most logical to me is to write a plugin C::P::EmailTestable that subclasses C::P::Email sub email { if (my $location = $c-config-{test_email}) { # write a temporary file into $location, and put the filename on the stash # so the view can link to it . . } else { # just defer to C::P::Email $self-super(@_); } } ... but I'm thinking, how can one plugin inherit from another? $self isn't passed ... not that it's a problem. There are bunch of other ways to do it. Maybe just a simple helper method somewhere that does the same. D On 12/16/06, Jonathan Rockway [EMAIL PROTECTED] wrote: On Saturday 16 December 2006 03:08, Sébastien Wagener wrote: On Sat, 2006-12-16 at 07:45 +0100, Daniel McBrearty wrote: if you have an action that sends an email, how do you write tests for it? perhaps print the email to a temp file in test mode? what do you guys do? I am currently considering writing tests for my e-mails too. You could set __PACKAGE__-config-{email} to Test if some env variable is set, and dump Email::Send::Test-emails to a file in an end action. Or you could provide a testing action to display (and clear) the sent e-mails. I have a similar problem with the values of my captchas. Btw.: Are there any best practices to hide an action unless in testing mode? Protect it by an ACL rule if an environment variable is set? I'm not aware of anything that does this now (but I don't look at the ACL stuff very often), but you could implement this as an ActionClass: package MyApp::Action::Testing; use base 'Catalyst::Action'; sub execute { my $self = shift; die You can't use this action! unless $ENV{MYAPP_TESTING}; return $self-NEXT::execute( @_ ); } 1; then package MyApp::Controller::Whatever; # ... sub foo : Local : ActionClass('Testing') { $c-response-body('All tests successful.'); } Completely untested, but it should work. Assuming this is useful, I'll CPAN it. -- package JAPH;use Catalyst qw/-Debug/;($;=JAPH)-config(name = do { $,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //, ;$;]-[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;-setup; ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] C::P::Email and testing
OK. That does work if I use : $c-SUPER::email($c, @_); to call the superclass. Interestingly, if I use SUPER.pm ... : package Catalyst::Plugin::EmailTestable; use strict; use warnings; use base qw ( Catalyst::Plugin::Email ); use SUPER; sub email { my $c = shift; my $super = $c-super('email'); $c-log-dumper($super); } 1; and I get ... : [debug] $VAR1 = sub { DUMMY }; and if I try $super-($c, @_); the app hangs. Is this a known problem? cheers D On 12/18/06, Jonathan Rockway [EMAIL PROTECTED] wrote: Daniel McBrearty wrote: ... but I'm thinking, how can one plugin inherit from another? $self isn't passed ... Your plugin ISA Catalyst, so instead of $self, you get a $c. Subclassing should work. $c-next::method(@_) or whatever; -- package JAPH;use Catalyst qw/-Debug/;($;=JAPH)-config(name = do { $,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //, ;$;]-[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;-setup; ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] C::P::Email and testing
that's a nice idea. thanks Perrin. On 12/18/06, Perrin Harkins [EMAIL PROTECTED] wrote: Daniel McBrearty wrote: if you have an action that sends an email, how do you write tests for it? We do it by subclassing Net::SMTP::Server to write all mail to files in a temp directory. Then we send the mail to it and check the contents in the temp file. That way the whole code path gets executed and we don't depend on the local machine having working SMTP and IMAP servers. - Perrin ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] C::P::Email and testing
you just want to see the text that you are generating the for the email, make some kind of sanity check on it, just before it hits the email module. I'll check it out. On 12/16/06, Ash Berlin [EMAIL PROTECTED] wrote: Daniel McBrearty wrote: if you have an action that sends an email, how do you write tests for it? perhaps print the email to a temp file in test mode? what do you guys do? Send it to a locally delivered address and check the mbox? use Net::IMAP module. It depends what you want to check - but I'd avoid testing other ppls code - assume they are right unless you have a good reason not to. Ash ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] C::P::Email and testing
if you have an action that sends an email, how do you write tests for it? perhaps print the email to a temp file in test mode? what do you guys do? -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/