Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove MI catalyst plugin, and replace with a placeholder cpanfile #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ my %META = (
'File::Copy::Recursive' => 0,
'Path::Class' => '0.09',
'Template' => '2.14',
'Module::Install' => '1.02',
},
},
develop => {
Expand Down
4 changes: 2 additions & 2 deletions lib/Catalyst/Devel.pm
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ them. This is intended to make it easier to deploy Catalyst apps. The
runtime parts of Catalyst are now known as C<Catalyst::Runtime>.

C<Catalyst-Devel> includes the L<Catalyst::Helper> system, which
autogenerates scripts and tests; L<Module::Install::Catalyst>, a
L<Module::Install> extension for Catalyst; and requirements for a
autogenerates scripts, tests and a starter cpanfile for declaring dependencies;
and requirements for a
variety of development-related modules. The documentation remains with
L<Catalyst::Runtime>.

Expand Down
19 changes: 8 additions & 11 deletions lib/Catalyst/Helper.pm
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ sub mk_app {
|| 'Catalyst developer';

my $gen_scripts = ( $self->{makefile} ) ? 0 : 1;
my $gen_makefile = ( $self->{scripts} ) ? 0 : 1;
my $gen_cpanfile = ( $self->{scripts} ) ? 0 : 1;
my $gen_app = ( $self->{scripts} || $self->{makefile} ) ? 0 : 1;

if ($gen_app) {
Expand All @@ -117,8 +117,8 @@ sub mk_app {
$self->$_;
}
}
if ($gen_makefile) {
$self->_mk_makefile;
if ($gen_cpanfile) {
$self->_mk_cpanfile;
}
if ($gen_scripts) {
for ( qw/ _mk_cgi _mk_fastcgi _mk_server
Expand Down Expand Up @@ -376,19 +376,16 @@ sub _mk_rootclass {
file( $self->{c}, "Root.pm" ) );
}

sub _mk_makefile {
sub _mk_cpanfile {
my $self = shift;
$self->{path} = join('/', 'lib', split( '::', $self->{name} ) );
$self->{path} .= '.pm';
my $dir = $self->{dir};
$self->render_sharedir_file( 'Makefile.PL.tt', file($dir, "Makefile.PL") );
$self->render_sharedir_file( 'cpanfile.tt', file($dir, 'cpanfile') );

if ( $self->{makefile} ) {

# deprecate the old Build.PL file when regenerating Makefile.PL
$self->_deprecate_file(
file( $self->{dir}, 'Build.PL' ) );
}
# deprecate the old Makefile.PL and Build.PL file when regenerating cpanfile
$self->_deprecate_file( file( $self->{dir}, 'Makefile.PL' ) );
$self->_deprecate_file( file( $self->{dir}, 'Build.PL' ) );
}

sub _mk_psgi {
Expand Down
134 changes: 0 additions & 134 deletions lib/Module/Install/Catalyst.pm

This file was deleted.

26 changes: 0 additions & 26 deletions share/Makefile.PL.tt

This file was deleted.

3 changes: 3 additions & 0 deletions share/cpanfile.tt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# see `perldoc cpanfile` for more information about declaring prerequisites

requires 'Catalyst';
2 changes: 1 addition & 1 deletion t/generated_app.t
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ chdir($app_dir) or die "Cannot chdir to $app_dir: $!";
lib->import(catdir($dir, 'TestApp', 'lib'));

my @files = qw|
Makefile.PL
cpanfile
testapp.conf
testapp.psgi
lib/TestApp.pm
Expand Down