Fix warning when devel is missing
[catagits/Catalyst-Devel.git] / lib / Catalyst / Helper.pm
index f298ad8..68632c5 100644 (file)
@@ -1082,7 +1082,18 @@ use strict;
 use warnings;
 use Getopt::Long;
 use Pod::Usage;
-use Catalyst::Helper;
+eval "use Catalyst::Devel;";
+
+if ($@) {
+  die <<END;
+To use the Catalyst development tools including catalyst.pl and the
+generated script/myapp_create.pl you need Catalyst::Helper, which is
+part of the Catalyst-Devel distribution. Please install this via a
+vendor package or by running one of -
+
+  perl -MCPAN -e 'install Catalyst::Devel'
+  perl -MCPANPLUS -e 'install Catalyst::Devel'
+END
 
 my $force = 0;
 my $mech  = 0;