diff --git a/aegisub/auto4_perl.cpp b/aegisub/auto4_perl.cpp index 5ff892e87..c3ce6bb91 100644 --- a/aegisub/auto4_perl.cpp +++ b/aegisub/auto4_perl.cpp @@ -510,7 +510,10 @@ namespace Automation4 { loaded = false; engine_name = _T("Perl"); filename_pattern = _T("*") _T(PERL_SCRIPT_EXTENSION); + } + void PerlScriptFactory::RegisterFactory() + { // On Visual Studio, first check if the dll is available // This needs to be done because it is set to delay loading of this dll #ifdef __VISUALC__ diff --git a/aegisub/auto4_perl.h b/aegisub/auto4_perl.h index 7fc5cb336..26fe90c95 100644 --- a/aegisub/auto4_perl.h +++ b/aegisub/auto4_perl.h @@ -251,6 +251,8 @@ namespace Automation4 { public: PerlScriptFactory(); ~PerlScriptFactory(); + + void RegisterFactory(); Script* Produce(const wxString &filename) const; }; diff --git a/aegisub/plugin_manager.cpp b/aegisub/plugin_manager.cpp index 32ac76c8b..7eaef4ec4 100644 --- a/aegisub/plugin_manager.cpp +++ b/aegisub/plugin_manager.cpp @@ -85,7 +85,8 @@ void PluginManager::RegisterBuiltInPlugins() { new Automation4::LuaScriptFactory(); #endif #ifdef WITH_PERL - new Automation4::PerlScriptFactory(); + Automation4::PerlScriptFactory *perl = new Automation4::PerlScriptFactory(); + perl->RegisterFactory(); #endif #ifdef WITH_AUTO3 new Automation4::Auto3ScriptFactory();