Setting up a Catalyst development environment

Share this article

More notes / opinions and tips on setting up Catalyst development environment to play in, in addition to stuff you’ll find here.

Even if you don’t know Perl, you’ve probably heard of CPAN, which was inspiration for PHP’s PEAR. In contrast to PEAR, CPAN is the worlds largest collection of programming libraries and utilities – practically anything “foundation level” you might need to do in Perl will have a CPAN library available that makes it easier. As Perl coders probably get tired of saying, CPAN is the biggest reason to use Perl these days – other languages have slicker syntax than Perl but for getting real work done, it’s very hard to argue with CPAN (and it’s basically why I’m interested in Catalyst).

The easiest way to get Catalyst is via CPAN, like $ cpan install Bundle::Catalyst. Catalyst has a lot of dependencies so if you have a relatively fresh Perl install, expect to spend some time here.

Windows Joys

That assumes of course you have Perl in the first place and if you’re on Windows, this may be a problem. IMO Perl has always regarded Unix as it’s primary platform and Windows as “Well if we must…”. Here may also lie the real key to languages like PHP and Ruby biting into Perl’s share – despite the fact that neither has real support for Unicode or anything which really compares to CPAN, if it’s easier to get to “Hello World!” on the platform which most web developers are using, that probably determines uptake. Meanwhile compare the prices of this to this. Specific to Catalyst, think a big step forward would be CPAN::Mini snapshots built for Windows – the “enemy” is already there

Anyway Perl for Windows means ActivePerl (download). With ActivePerl it’s common to use their package manager (PPM) instead of the cpan shell. My own experience, if you have Visual C++ installed, is it’s possible to use the cpan shell on Windows although some modules won’t build without intervention.

Where Catalyst is concerned, there are PPM-built versions for Windows available here – one further instruction – if ppm finds multiple versions of a package, you have to execute the install command again with the number (as ppm reported to you) of the package you want to install – using these was able to get a base Catalyst running on Windows. That was after first trying the cpan path – failed when it came installing the pre-requisite Data::FormValidator and wasn’t interested in finding out why.

What’s more of a problem on Windows if once you have a base Catalyst install, not all of the Catalyst plugins are available in PPM form for Windows (as far as I could see). That means using the cpan to build them. Similar applies to running some of the examples here, most of which introduce further CPAN dependencies like Plucene.

The bottom line is Catalyst feels shaky on Windows and you’ll have to be prepared to know what you’re doing.

The solution is simple – use Ubuntu where it just works. Actually there’s a little more to it than that – e.g. whether to use the Ubuntu package repositories or CPAN? Also can’t remember right now if there’s other Ubuntu packages needing installation for CPAN “to work”, e.g. build tools. Will fill in some other time.

Anyway – next time prereq know-how and choices (i.e. which template engine, dependencies and docs etc.)

Harry FuecksHarry Fuecks
View Author

Harry Fuecks is the Engineering Project Lead at Tamedia and formerly the Head of Engineering at Squirro. He is a data-driven facilitator, leader, coach and specializes in line management, hiring software engineers, analytics, mobile, and marketing. Harry also enjoys writing and you can read his articles on SitePoint and Medium.

Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week