What are the best practices for installing Catalyst and SQLite on Ubuntu?
I am not experienced in Perl and working on Ubuntu.
I was working on Ubuntu 10.10. I installed the latest Catalyst version from the cat-install script and SQLite by sudo apt-get install sqlite
. After installing Catalyst I was able to run my server using Catalyst script but after installing SQLite when I try to run the server I get a compilation error in perl5/nam开发者_如何学编程espace/autoclean.pm
saying &namespace undefined subroutine
. But I never touched any code in there.
I am not looking to debug my problem as already my Ubuntu crashed last night. :( I just need to know the best practices for installing these packages and will be very thankful if one can specifically guide me how to install these packages.
The Catalyst runtime is also packaged on Ubuntu. You can install it the same way you did with SQLite. The package name is libcatalyst-perl
.
This is what I did at work the other day:
1. Obtain perl, e.g. current stable (as of the 12th of Jan 2011):
$ curl http://cpan.perl.org/src/5.0/perl-5.12.2.tar.gz -O
$ gunzip -c perl-5.12.2.tar.gz | tar xvf -
$ cd perl 5.12.2
$ sh Configure -des -Dprefix=~/perl-5.12 # install into ~/perl-5.12
$ make
$ make test
$ make install
2. Configure PATH and cpan config, by putting the following in ~/.bashrc:
export PERL_MM_USE_DEFAULT=1
export PATH=~/perl-5.12/bin:$PATH
export MANPATH=~/perl-5.12/man:$MANPATH # breaks stuff on solaris
Make CPAN slightly nicer to deal with.
$ source ~/.bashrc
$ cpan Bundle::CPAN
$ cpan App::cpanminus
=head2 Deploying to a different machine using the same architecture
Just copy ~/perl-5.12 over to the new machine and put perl-5.12/bin in the $PATH.
Then install catalyst:
$ cpanm Catalyst::Devel
$ cpanm Catalyst::Runtime
$ cpanm DBIx::Class # gives you sqlite along with it
精彩评论