Blog Post RSS ?

Blogs » Web Tech » Setting up a Catalyst development environment
 

Setting up a Catalyst development environment

by Harry Fuecks

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.)

If you liked this blog, share the love:

  • Save to Del.icio.us

This post has 6 responses so far

  1. Uck. Was this a link farm or an attempt at a tutorial? What was the point again? How to get something installed on Windows, or that we should be all be using Linux anyway?

     
  2. Uck. Was this a link farm or an attempt at a tutorial?

    Or maybe it was simply an interesting multipart post to read?
    O_O

     
  3. Uck. Was this a link farm or an attempt at a tutorial? What was the point again? How to get something installed on Windows, or that we should be all be using Linux anyway?

    Just recording notes on an ongoing experience with Catalyst (see here , here and here) ) and covering issues which don’t show up in the Catalyst docs.

    I’m assuming general technical proficiency but not in-depth knowledge of Perl or Catalyst. Meanwhile avoiding a step-by-step tutorial as it’s not needed - the Catalyst docs are good plus there’s a ton of general material on Perl. And there isn’t time anyway.

    My apologies if it reads like a stream of consciousness. Should get a little more meaty soon.

     
  4. 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.

    OK - checked out with an clean Ubuntu install - forgot Ubuntu doesn’t have gcc - fix with;

    $ sudo apt-get install gcc

     
  5. Sorry to say, but this is a disappointing doc. The title implies that there is going to be some tips on setting up a dev environment and the reality is that it only tells how (or not to) install Catalyst on *nix or windows.
    Where are the build tips? For example how about giving details on setting up a multi user development environment with instructions for configuring apache to allow users to develop and test their apps?
    We run a build environment (and we are EXTREMELY new to catalyst) where all users have a development environment to build their own apps within their home directories. The apps can then run by setting up apache & mod_perl so the url for the app is http://www.somesite.org/~user/perl/MyApp

    I dont know if this is the best way, thats why I was looking for a doc like this.
    Sorry dude.

     
  6. Regarding setting catalyst up on a shared server, the situation may be improving. See recent posts at http://dev.catalyst.perl.org/wiki/Dreamhost . To be truthful, I am still in the information gathering stage and haven’t really started installing this, after my initial attempts went awary. But judging by comments on the mailing list, it may not be as bad as all that.

     

Sponsored Links

Leave a response

You are not logged in, log in with your SitePoint Forum username and password.

-OR- Post Anonymously

* Make sure any code samples are escaped (i.e. ‘<b>’ becomes ‘&lt;b&gt;’).

If not logged in, your comments will be placed in a moderation queue. This means your comment may not appear until one of our moderators approves it.

SitePoint Marketplace

Buy and sell Websites, templates, domain names, hosting, graphics and more.

Logo Design, Web page Design and more!

99designs

  • Custom logo designs created ‘just for you’.
  • Pick the design you like best.
  • Only pay if you’re satisfied with the result.

The Web Site Revenue Maximizer
The Ultimate HTML Reference

Book: The Ultimate HTML Reference

The most complete and up-to-date HTML Encyclopedia money can buy.

Free eBook! Firefox Revealed