Skip to content

Commit bdbfc92

Browse files
wip for removing MI catalyst plugin, and replacing with autogenerating a dist.ini
1 parent 50b263e commit bdbfc92

File tree

7 files changed

+41
-175
lines changed

7 files changed

+41
-175
lines changed

Makefile.PL

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ my %META = (
3232
'File::Copy::Recursive' => 0,
3333
'Path::Class' => '0.09',
3434
'Template' => '2.14',
35-
'Module::Install' => '1.02',
3635
},
3736
},
3837
develop => {

lib/Catalyst/Devel.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ them. This is intended to make it easier to deploy Catalyst apps. The
2424
runtime parts of Catalyst are now known as C<Catalyst::Runtime>.
2525
2626
C<Catalyst-Devel> includes the L<Catalyst::Helper> system, which
27-
autogenerates scripts and tests; L<Module::Install::Catalyst>, a
28-
L<Module::Install> extension for Catalyst; and requirements for a
27+
autogenerates scripts, tests and a starter dist.ini for releasing;
28+
and requirements for a
2929
variety of development-related modules. The documentation remains with
3030
L<Catalyst::Runtime>.
3131

lib/Catalyst/Helper.pm

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ sub mk_app {
107107
|| 'Catalyst developer';
108108

109109
my $gen_scripts = ( $self->{makefile} ) ? 0 : 1;
110-
my $gen_makefile = ( $self->{scripts} ) ? 0 : 1;
110+
my $gen_dist_ini = ( $self->{scripts} ) ? 0 : 1;
111111
my $gen_app = ( $self->{scripts} || $self->{makefile} ) ? 0 : 1;
112112

113113
if ($gen_app) {
@@ -117,8 +117,8 @@ sub mk_app {
117117
$self->$_;
118118
}
119119
}
120-
if ($gen_makefile) {
121-
$self->_mk_makefile;
120+
if ($gen_dist_ini) {
121+
$self->_mk_dist_ini;
122122
}
123123
if ($gen_scripts) {
124124
for ( qw/ _mk_cgi _mk_fastcgi _mk_server
@@ -376,19 +376,16 @@ sub _mk_rootclass {
376376
file( $self->{c}, "Root.pm" ) );
377377
}
378378

379-
sub _mk_makefile {
379+
sub _mk_dist_ini {
380380
my $self = shift;
381381
$self->{path} = join('/', 'lib', split( '::', $self->{name} ) );
382382
$self->{path} .= '.pm';
383383
my $dir = $self->{dir};
384-
$self->render_sharedir_file( 'Makefile.PL.tt', file($dir, "Makefile.PL") );
384+
$self->render_sharedir_file( 'dist.ini.tt', file($dir, "dist.ini") );
385385

386-
if ( $self->{makefile} ) {
387-
388-
# deprecate the old Build.PL file when regenerating Makefile.PL
389-
$self->_deprecate_file(
390-
file( $self->{dir}, 'Build.PL' ) );
391-
}
386+
# deprecate the old Makefile.PL and Build.PL file when regenerating dist.ini
387+
$self->_deprecate_file( file( $self->{dir}, 'Makefile.PL' ) );
388+
$self->_deprecate_file( file( $self->{dir}, 'Build.PL' ) );
392389
}
393390

394391
sub _mk_psgi {

lib/Module/Install/Catalyst.pm

Lines changed: 0 additions & 134 deletions
This file was deleted.

share/Makefile.PL.tt

Lines changed: 0 additions & 26 deletions
This file was deleted.

share/dist.ini.tt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
; TODO
2+
; IMPORTANT: if you delete this file your app will not work as
3+
; expected. You have been warned.
4+
5+
name '[% dir %]';
6+
all_from '[% path %]';
7+
8+
name = [% dir %]
9+
author = Your Name
10+
copyright_holder = Your Name
11+
copyright_year = [% (localtime())[5] %]
12+
license = Perl_5
13+
14+
[@Git::Starter]
15+
16+
[Prereqs]
17+
Catalyst::Runtime = [% catalyst_version %]
18+
Catalyst::Plugin::ConfigLoader = 0
19+
Catalyst::Plugin::Static::Simple = 0
20+
Catalyst::Action::RenderView = 0
21+
Moose = 0
22+
namespace::autoclean = 0
23+
Config::General = 0 ; This should reflect the config file format you've chosen
24+
; See Catalyst::Plugin::ConfigLoader for supported formats
25+
26+
[Prereqs / TestRequires]
27+
Test::More = 0.88
28+
29+
[ExecDir]
30+
dir = script

t/generated_app.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ chdir($app_dir) or die "Cannot chdir to $app_dir: $!";
6060
lib->import(catdir($dir, 'TestApp', 'lib'));
6161

6262
my @files = qw|
63-
Makefile.PL
63+
dist.ini
6464
testapp.conf
6565
testapp.psgi
6666
lib/TestApp.pm

0 commit comments

Comments
 (0)