diff options
| author | 2008-11-17 11:21:37 +0000 | |
|---|---|---|
| committer | 2008-11-17 11:21:37 +0000 | |
| commit | 5a41cbf05cbedfe7ef749b08e7f3e8fa327df82c (patch) | |
| tree | a7003b57b4a25bd151cecbf793e9219142988aac /src/modules/perlcore | |
| parent | fixed dialog.textinput layout (diff) | |
| download | KVIrc-5a41cbf05cbedfe7ef749b08e7f3e8fa327df82c.tar.gz KVIrc-5a41cbf05cbedfe7ef749b08e7f3e8fa327df82c.tar.bz2 KVIrc-5a41cbf05cbedfe7ef749b08e7f3e8fa327df82c.zip | |
re-enabled perl support; patched to work nicely with perl 5.10
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@2872 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/perlcore')
| -rw-r--r-- | src/modules/perlcore/CMakeLists.txt | 18 | ||||
| -rw-r--r-- | src/modules/perlcore/libkviperlcore.cpp | 8 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/modules/perlcore/CMakeLists.txt b/src/modules/perlcore/CMakeLists.txt index 82e1de70a..928949256 100644 --- a/src/modules/perlcore/CMakeLists.txt +++ b/src/modules/perlcore/CMakeLists.txt @@ -1,14 +1,5 @@ # CMakeLists for src/modules/perlcore -IF(UNIX) - IF(APPLE) - LIST(APPEND LIBS -lperl) - ENDIF() -ELSE() - # Assume windows - LIST(APPEND LIBS -lperl58) -ENDIF() - SET(kviperlcore_SRCS libkviperlcore.cpp ) @@ -17,4 +8,13 @@ SET(kviperlcore_SRCS QT4_WRAP_CPP(kviperlcore_MOC_SRCS ${kviperlcore_MOC_HDRS}) SET(kvi_module_name kviperlcore) + +EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -MExtUtils::Embed -e ccopts + OUTPUT_VARIABLE PERL_COMPILE_FLAGS +) + +STRING(REGEX REPLACE "(\r?\n)+$" "" PERL_COMPILE_FLAGS "${PERL_COMPILE_FLAGS}") + INCLUDE(${CMAKE_SOURCE_DIR}/cmake/module.rules.txt) + +SET_TARGET_PROPERTIES(${kvi_module_name} PROPERTIES COMPILE_FLAGS ${PERL_COMPILE_FLAGS}) diff --git a/src/modules/perlcore/libkviperlcore.cpp b/src/modules/perlcore/libkviperlcore.cpp index 584e8a2d9..0c66ff6f9 100644 --- a/src/modules/perlcore/libkviperlcore.cpp +++ b/src/modules/perlcore/libkviperlcore.cpp @@ -65,7 +65,7 @@ #include <XSUB.h> #include "ppport.h" - + #include "kvi_kvs_runtimecontext.h" static KviKvsRunTimeContext * g_pCurrentKvsContext = 0; @@ -223,12 +223,12 @@ bool KviPerlInterpreter::execute( szError = __tr2qs_ctx("Internal error: perl interpreter not initialized","perl"); return false; } - + g_lWarningList.clear(); KviQCString szUtf8 = szCode.toUtf8(); PERL_SET_CONTEXT(m_pInterpreter); - + // clear the _ array AV * pArgs = get_av("_",1); SV * pArg = av_shift(pArgs); @@ -322,7 +322,7 @@ static void perlcore_destroy_interpreter(const QString &szContextName) static void perlcore_destroy_all_interpreters() { KviPointerHashTableIterator<QString,KviPerlInterpreter> it(*g_pInterpreters); - + while(it.current()) { KviPerlInterpreter * i = it.current(); |
