Changed how the Perl factory is registered.

Originally committed to SVN as r1999.
This commit is contained in:
Rodrigo Braz Monteiro 2008-03-09 21:33:35 +00:00
parent d7ad931526
commit f8d7c69c15
3 changed files with 7 additions and 1 deletions

View File

@ -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__

View File

@ -251,6 +251,8 @@ namespace Automation4 {
public:
PerlScriptFactory();
~PerlScriptFactory();
void RegisterFactory();
Script* Produce(const wxString &filename) const;
};

View File

@ -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();