daily pastebin goal
59%
SHARE
TWEET

Untitled

a guest Aug 14th, 2018 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm
  2. index 4e97a49..5d0978f 100644
  3. --- a/lib/Catalyst.pm
  4. +++ b/lib/Catalyst.pm
  5. @@ -2619,17 +2619,32 @@ sub engine_class {
  6.              Catalyst::EngineLoader->new({
  7.                  application_name => $class,
  8.                  (defined $requested_engine
  9. -                     ? (requested_engine => $requested_engine) : ()),
  10. +                     ? (catalyst_engine_class => $requested_engine) : ()),
  11.              }),
  12.          );
  13.      }
  14. +
  15.      $class->engine_loader->catalyst_engine_class;
  16.  }
  17.  
  18.  sub setup_engine {
  19.      my ($class, $requested_engine) = @_;
  20.  
  21. -    my $engine = $class->engine_class($requested_engine);
  22. +    my $engine = do {
  23. +        my $loader = $class->engine_loader;
  24. +
  25. +        if (!$loader || $requested_engine) {
  26. +            $loader = Catalyst::EngineLoader->new({
  27. +                application_name => $class,
  28. +                (defined $requested_engine
  29. +                     ? (requested_engine => $requested_engine) : ()),
  30. +            }),
  31. +
  32. +            $class->engine_loader($loader);
  33. +        }
  34. +
  35. +        $loader->catalyst_engine_class;
  36. +    };
  37.  
  38.      # Don't really setup_engine -- see _setup_psgi_app for explanation.
  39.      return if $class->loading_psgi_file;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top