Catalyst::Utils is not an exporter
[catagits/Catalyst-Devel.git] / lib / Catalyst / Restarter.pm
index d5b9b55..fd5a534 100644 (file)
@@ -6,6 +6,7 @@ use Cwd qw( abs_path );
 use File::ChangeNotify;
 use File::Spec;
 use FindBin;
+use Catalyst::Utils;
 use namespace::clean -except => 'meta';
 
 has start_sub => (
@@ -48,8 +49,7 @@ sub pick_subclass {
 
     $subclass = 'Catalyst::Restarter::' . $subclass;
 
-    eval "use $subclass";
-    die $@ if $@;
+    Catalyst::Utils::ensure_class_loaded($subclass);
 
     return $subclass;
 }
@@ -202,7 +202,7 @@ the child, forks again, and starts a new server.
 
 =head1 SEE ALSO
 
-L<Catalyst>, <File::ChangeNotify>
+L<Catalyst>, L<File::ChangeNotify>
 
 =head1 AUTHORS