# ABOUT: # # This is the Shadowcat Catalyst installer. Its purpose is to make it easier # and quicker to get started with Catalyst development. In order to use it, # make sure you have perl 5.8.1+, a make and a compiler, (nmake and dev-c++ # are good on windows), a configured CPAN.pm and Module::Build installed. Then # run this script by executing # # /path/to/perl cat-install # # and go for a tea break. If anything breaks, please send the full build log # and the output of perl -V to and we'll # see what we can do. This script is still BETA though, so don't be too # surprised if something *does* break. # # See http://www.shadowcatsystems.co.uk/projects/catalyst/ for more information # on the Catalyst project and Shadowcat's involvement with it. # # COPYRIGHT: # # This software is Copyright (c) 2006 Shadowcat Systems Limited # # # LICENSE: # # This work is made available to you under the terms of Version 2 of # the GNU General Public License. A copy of this license can be obtained # from www.gnu.org, or by writing to the Free Software Foundation, Inc., # 675 Mass Ave, Cambridge, MA 02139, USA. # # This work is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. package CPAN::Override; $ENV{PERL_MM_USE_DEFAULT} = 1; my $orig = CPAN::Distribution->can('new'); my $replace = sub { my $dist = $orig->(@_); my @bits = split('-', (split('/', $dist->normalize))[-1]); pop(@bits); my $o_pack = join('::', 'CPAN::Override::Distribution', @bits); if ($o_pack->isa('CPAN::Distribution')) { bless($dist, $o_pack); } return $dist; }; { no warnings 'redefine'; *CPAN::Distribution::new = \&$replace; } package CPAN::Override::Distribution::Template::Toolkit; use base qw/CPAN::Distribution/; use strict; use warnings; sub make { my $self = shift; my %args = (DOCS => 'n', SPLASH => 'n', EXAMPLES => 'n', EXTRAS => 'n', DBI => 'n', LATEX => 'n', QUIET => 'n', ACCEPT => 'y'); my $extra_args = join(' ', map { "TT_$_=".$args{$_} } keys %args); local $CPAN::Config->{makepl_arg} = $CPAN::Config->{makepl_arg}.' '.$extra_args; $self->SUPER::make(@_); } package CPAN::Override::Distribution::Module::Install; use base qw/CPAN::Distribution/; sub make { my $self = shift; $self->get; my $builddir = $self->dir; chdir($builddir) && (!-f 'Makefile') && do { my $perl = $self->perl; my $re_code = 's/^auto_install_now.*//; s/.*prerequisites_policy.*//;'; if ($^O eq 'MSWin32') { $re_code .= ' s/^.*ExtUtils::ParseXS.*$//;'; system(qq!$perl -p -i.bak -e "s/\n/\r\n/;" Makefile.PL!); } system(qq!$perl -p -i.bak -e "${re_code}" Makefile.PL!); }; return $self->SUPER::make(@_); } 1; package main; use CPAN; if ($^O eq 'MSWin32') { system("ppm install Test-Simple"); system("ppm install Spiffy"); system("ppm install Test-Base"); system("ppm install YAML"); system("ppm install UNIVERSAL-require"); system("ppm install Module-Pluggable-Fast"); system("ppm install Class-Accessor"); system("ppm install Test-use-ok"); system("ppm install Sub-Uplevel"); system("ppm install Test-Exception"); system("ppm install UNIVERSAL-isa"); system("ppm install UNIVERSAL-can"); system("ppm install Test-MockObject"); system("ppm install Data-Visitor"); system("ppm install Test-Tester"); system("ppm install Test-NoWarnings"); system("ppm install Scalar-List-Utils"); system("ppm install Tree-Simple"); system("ppm install Tree-Simple-VisitorFactory"); system("ppm install URI"); system("ppm install Compress-Zlib"); system("ppm install HTML-Tagset"); system("ppm install HTML-Parser"); system("ppm install libwww-perl"); system("ppm install Class-Data-Inheritable"); system("ppm install File-Modified"); system("ppm install Module-Install"); system("ppm install HTTP-Request-AsCGI"); system("ppm install HTTP-Body"); system("ppm install Text-SimpleTable"); system("ppm install MIME-Types"); system("ppm install AppConfig"); system("ppm install Template-Toolkit"); system("ppm install Path-Class"); system("ppm install File-Copy-Recursive"); system("ppm install Class-Inspector"); system("ppm install Catalyst"); install('Test::MockObject'); } install('Catalyst');