Fix RT#57019: Fix bundling of File::Copy::Recursive.
[catagits/Catalyst-Devel.git] / lib / Module / Install / Catalyst.pm
index 5d45b69..5230d6f 100644 (file)
@@ -8,7 +8,7 @@ require Module::Install::Base;
 
 use File::Find;
 use FindBin;
-use File::Copy::Recursive 'rcopy';
+use File::Copy::Recursive;
 use File::Spec ();
 use Getopt::Long ();
 use Data::Dumper;
@@ -58,6 +58,11 @@ command called in C<Makefile.PL>.
 
 sub catalyst {
     my $self = shift;
+
+    if($Module::Install::AUTHOR) {
+        $self->include("File::Copy::Recursive");
+    }
+
     print <<EOF;
 *** Module::Install::Catalyst
 EOF
@@ -94,7 +99,7 @@ sub catalyst_files {
     my @path = split '-', $self->name;
     for my $orig (@files) {
         my $path = File::Spec->catdir( 'blib', 'lib', @path, $orig );
-        rcopy( $orig, $path );
+        File::Copy::Recursive::rcopy( $orig, $path );
     }
 }