- Fixes for rt.cpan #17322 and #17331
[catagits/Catalyst-Runtime.git] / lib / Module / Install / Catalyst.pm
index 70c03c8..ff46f44 100644 (file)
@@ -11,6 +11,8 @@ use FindBin;
 use File::Copy::Recursive 'rcopy';
 use File::Spec ();
 
+my $SAFETY = 0;
+
 our @IGNORE =
   qw/Build Build.PL Changes MANIFEST META.yml Makefile.PL Makefile README
   _build blib lib script t inc/;
@@ -35,6 +37,22 @@ L<Module::Install> extension for Catalyst.
 
 =head1 METHODS
 
+=head2 catalyst
+
+=cut
+
+sub catalyst {
+    my $self = shift;
+    print <<EOF;
+*** Module::Install::Catalyst
+EOF
+    $self->catalyst_files;
+    $self->catalyst_par;
+    print <<EOF;
+*** Module::Install::Catalyst finished.
+EOF
+}
+
 =head2 catalyst_files
 
 =cut
@@ -86,9 +104,8 @@ sub catalyst_ignore {
 # Workaround for a namespace conflict
 sub catalyst_par {
     my ( $self, $par ) = @_;
-    print <<EOF;
-*** Module::Install::Catalyst
-EOF
+    return if $SAFETY;
+    $SAFETY++;
     my $name  = $self->name;
     my $usage = $USAGE;
     $usage =~ s/"/\\"/g;
@@ -100,7 +117,6 @@ catalyst_par :: all
 EOF
     print <<EOF;
 Please run "make catalyst_par" to create the PAR package!
-*** Module::Install::Catalyst finished.
 EOF
 }