Tuesday, May 27, 2008

Installing Test::WWW::Mechanize::Catalyst


It seems that there is some incompatibility between the latest LWP version (5.812) and Test::WWW::Mechanize::Catalyst. The tests die with an:

HTTP::Message content must be bytes at lib/Test/WWW/Mechanize/Catalyst.pm line 88

error message. After downgrading LWP to 5.808 Test::WWW::Mechanize::Catalyst (version 41 - which looks better than 42 at CPAN Testers: Reports for Test-WWW-Mechanize-Catalyst) worked. Looks like this change is the culprit: "Don't allow HTTP::Message content to be set to Unicode strings".


confound - thanks for the hint.

Sunday, May 25, 2008

Interesting articles from the Ruby community

Why coupling is always bad / Cohesion vs. coupling and Why Rails is total overkill and why I love Rack - looks like the Catalyst philosophy is quite close to that of the Rack project (but maybe less articulated).


As a side-note - I cannot comment there (even though I have javascript turned on) - do you get the same problem?

Monday, April 21, 2008

Rose::HTML::Form and DBIx::Class

Has anyone tried that combination?

Tuesday, March 04, 2008

Writing Facebook apps in Catalyst

A few weeks ago I've started a howto page for writing Facebook applications in Catalyst at the Catalyst wiki. Now I have accumulated there a few tips. Everyone using Catalyst for Facebook apps is invited to add their problems and solutions.

Wednesday, January 30, 2008

Refreshing a row from the DB - another note to myself

This is another thing that I keep forgetting - how to refresh a row with values from the database.
So here it is:

$row->discard_changes;

It comes from DBIx::Class::PK (and not from DBIx::Class::Row where I usually start the serach).

Update: The core devs say that the new version of documentation will mention discard_changes in DBIx::Class::Row POD. Thanks.

Tuesday, January 29, 2008

Automatic DBIC schema creation from a database

This is something that I keep forgetting and then I have to wade through the docs again. And there are traps in the docs - for example SQLT can do the schema creation - but it does not build the relationships.

So here is the magic invocation for DBIx::Class::Schema::Loader which do create the relationships (if you use the right switch):

perl -MDBIx::Class::Schema::Loader=make_schema_at,dump_to_dir:./lib -e make_schema_at("New::Schema::Name", { relationships => 1 }, [ "dbi:Pg:dbname=foo","postgres" ])’

Saturday, January 12, 2008

A free implementation of Amazon SimpleDB

Here is a tip to Amazon - there should be a free implementation of SimpleDB. I am now considering using SimpleDB for a web application - but I would like to develop it on my desktop computer - without paying Amazon, without even connecting to Amazon. This might be a minor issue - the fee you would pay for developing the application on Amazon web services seem to be very small. But it would be so much more convenient: no fiddling with credit cards, no problems for developers with shaky internet connection and more compatibility with Free Software/Open Source development models where money is always a difficult subject.

For Amazon it would not mean much less income - since as I've said the fee for the development use of the services is rather small - but it would mean many more customers. Perhaps it would also mean some competition - but this would only validate the whole model and make it more suitable for big business which does not like so much dependence on one provider.