X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FEngine%2FHTTP%2FRestarter%2FWatcher.pm;h=f1ddc286e39b35aa7d3abaa8e354ef673c640e07;hp=6aada3e06d61fd03acd674a4adcc6d8d29b78fab;hb=16b7c476167d91c4c6805ddb6c23be7206c62bd2;hpb=2f5cb0703a06e037f2521ba220242a937d0e35b9 diff --git a/lib/Catalyst/Engine/HTTP/Restarter/Watcher.pm b/lib/Catalyst/Engine/HTTP/Restarter/Watcher.pm index 6aada3e..f1ddc28 100644 --- a/lib/Catalyst/Engine/HTTP/Restarter/Watcher.pm +++ b/lib/Catalyst/Engine/HTTP/Restarter/Watcher.pm @@ -145,10 +145,15 @@ sub _test { my $is_immutable = $meta->can('is_immutable'); my $make_mutable = $meta->can('make_mutable'); $meta->$make_mutable() if $is_immutable && $make_mutable && $meta->$is_immutable(); + eval { # Do not explode the watcher process if this fails. + my $superclasses = $meta->can('superclasses'); + $meta->$superclasses('Moose::Object') if $superclasses; + }; } }); } + local $Catalyst::__AM_RESTARTING = 1; # Hack to avoid C3 fail delete $INC{$file}; # Remove from %INC so it will reload local $SIG{__WARN__} = sub { };