Saturday, November 29, 2008

Catalyst Action REST - ExtJS TreeLoader

Catalyst doesn't play with ExtJS TreeLoader by default as the View::JSON returns hashes of JSON data, ExtJS TreeLoader requires an array. However you can setup View::JSON to expose a set hash key only, therefore only the array is returned.

Note that on existing stashes you will need to pre-pend the existing key with an addition key 'json' to ensure existing functionality works.

Catalyst Controller

$c->stash->{json} = \@nodes; #array of treeloader data


Catalyst Application lib/app.pm


__PACKAGE__->config(
'View::JSON' => {
expose_stash => 'json', #extjs TreeLoader requires an array of data
}
);

Friday, November 28, 2008

Catlyst use PDF::Table v0.93 doesn't generate PDF

PDF::Table - doesn't produce PDF files while running inside Catalyst unless you correct a known bug by using the following bug fix, see this link

Sunday, November 23, 2008

ModPerl Apache2 FasMmap no support threads

Cache::FastMmap does not support threads sorry at /usr/lib/perl5/Cache/FastMmap.pm line 1048.

This is a really annoying error and occured for me as I'd installed the wrong module

try running the following

apt-get install apache2-mpm-prefork
apt-get install libapache2-mod-perl2

Apache on a Flash Drive

If you're attempting to run Apache from a Flash drive this is EnableSendfile is well worth disabling, otherwise your web browser will just load zero byte files.....


EnableSendfile Off

http://httpd.apache.org/docs/2.0/mod/core.html#enablesendfile

Apache error message

[info] [client 127.0.0.1] (22)Invalid argument: core_output_filter: writing data to the network

Even by doing this I've found that Apache on a flash drive with bootable Linux doesn't really work......