In GetAvailableMods() modules paths were returned like "moddir//module.pm",
but when they are loaded, they use path "moddir/module.pm".
Because of that our hack of cleaning %INC when the module is unloaded,
which enables UpdateMod, removed wrong record from %INC, left right
record in it, and erased the module's namespace.
When the module was loaded again, the namespace was not restored,
because "require" didn't load the module, because it was still in %INC.
So, when we call a function of that module, the function does not exist
anymore.
Normally, when the Makefile calls swig, the resulting files end up in the build
directory. However, when the files are pre-generated (e.g. as in the znc 1.0
tarball) and an out of tree build is used, they are in the source directory and
installation fails.
Thanks to Kinji for reporting this.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The symptoms looked like this:
Packing man page znc-buildmod.1.gz...
Generating ZNC API for Perl...
Generating ZNC API for Perl...
Generating ZNC API for Perl...
Linking znc...
The reason was that the old rule was executed multiple times in parallel. See
the following commit for more information:
commit 84ec49780e
Author: Uli Schlachter <psychon@znc.in>
Date: Sun Sep 23 12:03:22 2012 +0200
Get rid of the modpythin jobhack
Signed-off-by: Uli Schlachter <psychon@znc.in>
Make was always rebuilding modperl/ZNC.so because the Makefile was actually
describing a file modperl/ZNC."so". Fix this by getting rid of the unnecessary
pair of quotes.
Signed-off-by: Uli Schlachter <psychon@znc.in>
It tries to run SWIG for modpython several times simultaneously.
Just force modules to be built in 1 thread for now if modpython is going
to be built.
Makefiles should be thrown away.
Also don't show warning about unused perl, fix#219
Workaround for broken swig, which allows old swig versions to work too.
These files should be removed when fixed swig is released.
Thanks to Juvenal for suggestion.
This means that now it's possible to have the same class names in
different modules, which reduces chances of weird errors.
Thanks to mclc for noticing this.
That functionality was accessible by perl and python modules before.
Now that stuff is in own headers, so let's parse them too,
to have them still be able to use this.
Instead of doing ugly stuff to shorten the "Loaded Module [foo]" message, we now
just always generate the shorter version of that message. The code paths which
didn't do this shortening now prepend that message themselves.
The result is that every message looks the same as it did before, but the code
for generating these is a little nicer.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This removes the following module hooks:
OnConfigLine()
OnWriteConfig()
OnWriteUserConfig()
OnWriteChanConfig()
Modules could use these hooks for writing/reading their own stuff to/from
znc.conf. However, no module (ever?) did this and IMHO no module should ever do
this either. Modules can save stuff via SetNV(), module arguments (SetArgs())
and in their GetSavePath().
Signed-off-by: Uli Schlachter <psychon@znc.in>