Monthly Archives: October 2011

Hosting the AutoCRUD Demo

In my previous entry here (syndicated from, I linked at the end to a demo Catalyst::Plugin::AutoCRUD application running on DotCloud. I’m much happier with this than running something on my own personal server, and here’s the notes on its setup. … Continue reading

Posted in databases, devops, git, perl | Comments Off

AutoCRUD revamped

For a couple of years I’ve been planning to rip apart and put back together the guts of Catalyst::Plugin::AutoCRUD, to address limitations in the initial implementation. After changing job and moving house I’m pleased this finally came to the top of my hacking stack. Nothing was going to happen however before I could work out how to do one thing: achieve independence from DBIx::Class as a “storage engine”. I love DBIx::Class, but it would be much more cool to support any data storage system able to represent a table+column paradigm (even things like CSV, as a test case). So SQL::Translator hit me like a thunderbolt. Of course, that’s exactly what it does – introspect some data storage and provide a neutral, class-based representation of the tables and columns (fields). It’s a little rough around the edges, but certainly good enough. The Translator provides a metadata structure which AutoCRUD’s web front-end can use, independent of any particular storage engine such as DBIx::Class. This also paves the way for development of display engines other than the bundled ExtJS and simple HTML offerings. Right now there’s a developer release of AutoCRUD on CPAN, and I hope shortly to have a production release. Whilst the web side might not look much different, the fact is that it can now support significant features such as tables with composite/compound primary keys, or no primary keys for that matter, database views, relations to self, multiple relations to the same table, and so on. Alongside that, I’ve taken the opportunity to fix a few quirks of the web interface, and chomp my way through the outstanding wishlist. The updated code is now running on a DotCloud instance, so please go and have a play! p.s. a cron job will restore the demo’s databases at the top of every hour… Continue reading

Posted in perl | Comments Off

Releasing trial/dev/beta versions with Dist::Zilla

You might have stumbled across Dist::Zilla’s –trial command line option in the past, and maybe even used it for a developer CPAN release. Its effect is (as I understand it) two-fold: adds -TRIAL to the name of the distribution archive being produced sets release: testing in the META.json file which is parsed by CPAN services It came to my attention that using -TRIAL is actually pretty bad for you and your system, and other users, even though it’s one of the two naming conventions CPAN services use to identify developer releases. The problem is that the actual $VERSION of your code is unaffected. This means once installed, you can’t ask your computer the version of an installed distribution and work out from that whether it’s a developer release, or not. A secondary issue is that in sites such as there’s nothing really obvious about the release which highlights its status as "development", in the list of available versions. An alternative way to signal to CPAN services that a dist is a trial release is to use an underscore and a secondary version number at the end of $VERSION, like _001. This is still a bit crappy but at least humans can really easily see what’s going on. Back to Dist::Zilla. If you use the AutoVersion plugin, a better alternative than using –trial is to set the DEV environment variable when you build or release the distribution. This has the effect of: (sprintf ‘_%03u’, $ENV{DEV}) being added to the end of $VERSION sets release: testing in the META.json file which is parsed by CPAN services Otherwise the best thing to do right now is to set the version manually, for developer releases. I hear from chatter on IRC that there are plans to change the –trial feature of Dist::Zilla to alter $VERSION if necessary (that is, if no underscore exists) – a good compromise, I reckon…. Continue reading

Posted in perl | Comments Off