I decided to take a look at Catalyst on Solaris. Having done a bit of work with it on Mac OSX, I discovered it wasn't that easy to get going on Solaris with the stock Perl. Even using cat-install from ShadowCat didn't render the easy result I'd experienced using MacPorts. After a few hours battling with CPAN, I've managed to come up with this list of modules to get Catalyst up and running.

The reader should note this was done on Solaris 10 update 6, on x86 hardware (well, in VMware actually).

If you haven't already got it installed, download the Sun Studio compiler and install with "./batch-installer --accept-sla".

Make sure your PATH has at least /usr/sfw/bin, /opt/SUNWspro/bin, /usr/ccs/bin and /usr/perl5/bin on it. You'll also want to make sure you have SUNWopenssl-libraries, SUNWopenssl-include, SUNWopenssl-commands, SUNWwgetr and SUNWwgetu packages installed.

If you've not already got a working CPAN setup, as the user you're installing as, then run 'cpan' (or perl -MCPAN -e 'shell') and follow the prompts. If you're doing this as an ordinary user when you're prompted for additional MAKE arguments you'll want to set PREFIX and LIB. More on that in a moment). I experienced problems building Catalyst::Plugin::Authentication::Credential::PAM when tar was set to the OS stock tar. When I used GNU tar it worked fine though. So you might like to install CSWgtar from OpenCSW/Blastwave.

If you're installing as a normal user, rather than root, you'll want to export PERLLIB and PERL5LIB to a three part path including your base PREFIX, plus PREFIX/site_perl and PREFIX/archname, where archname is the output of perl -V:archname. Perl should just use PERL5LIB, but I found a number of instances where it was ignored and setting PERLLIB to be the same as PERL5LIB actually helped. YMMV.

Most of the modules below will install with a simple 'cpan MODULENAME', but some fail during this. If that's the case it's noted below, and I simply installed by cd'ing .cpan/build/Module-Name-Directory/

The following is enough to get a basic Catalyst going, enough so that you can use catalyst.pl to create an app. You'll probably want considerably more though, so the second set of modules can be installed too to give a pretty comprehensive setup.

Test::More (Test::More (0.47) is installed in the OS Perl, but we need version >= 0.49)
Module::Build
ExtUtils::MakeMaker (OS version too old)
ExtUtils::Install
ExtUtils::CBuilder
ExtUtils::ParseXS
Class::Accessor::Fast
Class::Data::Inheritable
Class::Inspector
version
CGI::Simple::Cookie
Data::Dump
File::Modified
URI (is now failing heuristic test 6 - I fudged it by editing t/heuristic.t and changing the 'if' on line 44 to an 'unless', so tests 6,7 and 8 are missed out)
HTML::Tagset
HTML::Entities
YAML
IO::Compress::Base
Compress::Raw::Zlib
IO::Compress::Gzip
Compress::Zlib
HTTP::Headers
HTTP::Body
HTTP::Request::AsCGI
File::Spec
Module::Pluggable
Path::Class
Text::SimpleTable
Scalar::Util
Sub::Uplevel
Test::Exception
Tree::Simple
Tree::Simple::Visitor::FindByPath
parent
Config::General
Config::Any
File::Copy::Recursive
Template (best to install manually with perl Makefile.PL PREFIX= LIB= TT_ACCEPT=y)
Params::Util
Sub::Install
Data::OptList
Sub::Exporter
Variable::Magic
B::Hooks::EndOfScope
namespace::clean
UNIVERSAL::isa (cpan install fails, but a manual install with perl Build.PL --prefix=/dir/to/install/to works)
UNIVERSAL::can
Test::MockObject
Mouse
Test::use::ok
Tie::ToObject
Task::Weaken
Data::Alias
Data::Visitor
Algorithm::C3
Class::C3::XS
Class::C3
MRO::Compat
Pod::Escapes
Test (>1.24)
Pod::Simple
Test::Pod
MIME::Types
Test::Harness (3.13. OS version is 2.40)
Devel::PPPort
File::Remove
YAML::Tiny
Archive::Zip
PAR::Dist
Module::ScanDeps
Module::CoreList
Package::Constants
IO::Zlib
Compress::Raw::Bzip2
IO::Compress::Bzip2
Archive::Tar
Module::Install
Catalyst
Catalyst::Plugin::ConfigLoader
Catalyst::Plugin::Static::Simple
Catalyst::Action::RenderView
Catalyst::Devel

That lot will get you going. The following aren't required, but realistically they will be needed to build a fully fledged application. In terms of database access I only built this setup to cater for SQLite. In reality you'll probably be using something much larger, such as MySQL, PostgreSQL or Oracle. In that case you'll need to make sure you have the include files for your database on your system, and you'll probably want to add DBD::yourDB to the point where you install DBB::SQLite.

UPDATE: As of 19th March 2009 I've now added this bundle file to do the bare minimum. Copy this to ~/.cpan/Bundle and perl -MCPAN -e 'install Bundle::Catalyst' to install all the above modules. You will need to manually intervene anywhere things break, as noted above. The additional list (below) has also been turned into a bundle.

This isn't necessary, but if you're developing an SSL based application you'll want it installed before building some of the modules below. This is what you need the SUNWopenssl packages for.

Net::SSLeay
IO::Socket::SSL

Carrying on with our large list of supporting packages...

Directory::Scratch
Class::Accessor::Grouped
Class::Accessor::Chained::Fast
Data::Page
Carp::Clan
Class::C3::Componentised
DBI
DBD::SQLite
SQL::Abstract
Test::Tester
Test::NoWarnings
Test::Deep
Test::Warn
Test::Taint
SQL::Abstract::Limit
Module::Find
JSON
JSON::DWIW
JSON::XS
JSON::Syck
JSON::Any
Scope::Guard
DBIx::Class
Text::CSV_XS
UNIVERSAL::require
Digest::MD5
Lingua::EN::Inflect
Lingua::EN::Inflect::Number
Class::Data::Accessor (deprecated, and buggy. Fails CPAN install, because tests have t/*/*.t in the Makefile.PL. If you install outside of CPAN, edit Makefile.PL and change line 13 to be "tests "t/*.t"; - this will then make; make test; make install correctly. It's a requirement of the following module, so we have to install it)
DBIx::Class::Schema::Loader
Catalyst::Model::DBIC::Schema
Tie::IxHash
HTML::Template
CGI::FormBuilder
Encode
HTTP::Response::Encoding
HTTP::Server::Simple
Array::Compare
Tree::DAG_Node
PadWalker
Devel::Cycle
Test::Memory::Cycle
WWW::Mechanize
Test::LongString
Carp::Assert
Carp::Assert::More
Test::WWW::Mechanize
Object::Signature
Tie::RefHash
Catalyst::Plugin::Session::Store::Dummy
Catalyst::Plugin::Session::State::Cookie
Sub::Name
Sub::Identify
Devel::GlobalDestruction
Class::MOP
List::MoreUtils
Moose
Test::WWW::Mechanize::Catalyst
Catalyst::Controller::FormBuilder
Params::Validate
Digest::SHA
Data::Serializer
URI::Find (now uses Build - do manual install with perl Build.PL --prefix=PREFIXPATH)
Data::Taxi
PHP::Serialization
FreezeThaw

XML::Parser needs expat installing. I chose to use it from OpenCSW. Install CSWexpat, then in build dir perl Makefile.PL PREFIX=/your/install/path LIB=/your/install/path/lib EXPATLIBPATH=/opt/csw/lib EXPATINCPATH=/opt/csw/include

XML::Parser
XML::Simple
Data::Denter
Catalyst::Action::REST
Catalyst::Controller::REST
Catalyst::Plugin::Cache
IO::Scalar
Catalyst::Plugin::Unicode
Catalyst::Plugin::Session
Cache::FastMmap
Catalyst::Plugin::Session::Store::FastMmap
Error
Digest::SHA1
Cache::Cache
Catalyst::Plugin::Session::Store::File
Catalyst::Plugin::Session::Store::Delegate
Catalyst::Plugin::Session::Store::DBIC
Catalyst::Plugin::Static::Simple
Proc::ProcessTable
Catalyst::Plugin::AutoRestart
Catalyst::Plugin::Authentication
Set::Object
UNIVERSAL::moniker
Clone
Class::Trigger
DBIx::ContextualFetch
Ima::DBI
Class::DBI
Catalyst::Plugin::Authorization::Roles
Catalyst::Authentication::Store::DBIx::Class
Authen::PAM
Catalyst::Plugin::Authentication::Credential::PAM
Class::Throwable
Catalyst::Plugin::Authorization::ACL
Template::Timer
Template::Provider::Encoding
Catalyst::View::TT
Number::Compare
Text::Glob
File::Find::Rule
Jemplate
Catalyst::View::Jemplate
Catalyst::View::REST::YAML
Catalyst::View::REST::XML

Since this is quite an epic task I'm planning on making a Solaris SVR package with all this lot self contained. More on that soon.


Comments

comments powered by Disqus