X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FBuild.pm;h=ab6ba53bcb21fa72097f1df55a169027bb040648;hp=570802bb57ef747790572ccd139cf6df70a7f910;hb=0ba80bce27a56d366c8d44c254332dd83f9ba0f9;hpb=b94ad1f40068c6b51d531b36a687be9733fb0c0d diff --git a/lib/Catalyst/Build.pm b/lib/Catalyst/Build.pm index 570802b..ab6ba53 100644 --- a/lib/Catalyst/Build.pm +++ b/lib/Catalyst/Build.pm @@ -2,10 +2,14 @@ package Catalyst::Build; use strict; use Module::Build; -use base 'Module::Build'; use Path::Class; use File::Find 'find'; +our @ISA; +eval "require Module::Build"; +die "Please install Module::Build\n" if $@; +push @ISA, 'Module::Build'; + our @ignore = qw/Build Build.PL Changes MANIFEST META.yml Makefile.PL Makefile README _build blib lib script t/; @@ -25,8 +29,41 @@ See L L extension for Catalyst. +=head1 DEPRECATION NOTICE + +This module is deprecated in favor of L. + =head1 METHODS +=over 4 + +=item new + +=cut + +sub new { + my $class = shift; + my $self = $class->SUPER::new(@_); + + my $app_name = $self->{properties}{module_name}; + warn <<"EOF"; + + Note: + + The use of Build.PL for building and distributing Catalyst + applications is deprecated in Catalyst 5.58. + + We recommend using the new Module::Install-based Makefile + system. You can generate a new Makefile.PL for your application + by running: + + catalyst.pl -force -makefile $app_name + +EOF + + return $self; +} + =item ACTION_install =cut @@ -53,18 +90,16 @@ sub ACTION_fakeinstall { =cut sub ACTION_install_extras { - my $self = shift; - my $prefix = $self->{properties}{destdir} || ''; - my $path = dir( - $prefix, - $self->{config}{installsitelib}, - split( '::', $self->{properties}{module_name} ) - ); - my @files = $self->_find_extras; + my $self = shift; + my $prefix = $self->{properties}{destdir} || undef; + my $sitelib = $self->install_destination('lib'); + my @path = defined $prefix ? ( $prefix, $sitelib ) : ($sitelib); + my $path = dir( @path, split( '::', $self->{properties}{module_name} ) ); + my @files = $self->_find_extras; print "Installing extras to $path\n"; for (@files) { $FAKE - ? print "$_ -> $path/$_ (FAKE)\n" + ? print "$_ -> $path (FAKE)\n" : $self->copy_if_modified( $_, $path ); } } @@ -97,8 +132,8 @@ Sebastian Riedel, C =head1 LICENSE -This library is free software . You can redistribute it and/or modify it under -the same terms as perl itself. +This library is free software, you can redistribute it and/or modify it under +the same terms as Perl itself. =cut