Commit 88b06576 authored by Michael Pyne's avatar Michael Pyne
Browse files

modularize: Add code to find kdesrc-build modules.

This is the lead-in to work which will eventually split out kdesrc-build
into component Perl modules and complete the modularization process.

This commit makes it possible for Perl to locate kdesrc-build modules
that are located in the XDG app-data directory (in case kdesrc-build is
installed), with a fallback to the kdesrc-build script directory (in
case kdesrc-build is run from a git checkout).

Although I am "modularizing" kdesrc-build, this is not an attempt to
split into CPAN-quality modules, rather we're just splitting into
separate files modules that are already conceptually separate
internally. At this point kdesrc-build will still be a single package
using as few dependencies as possible. However this will make it
possible to clone useful Perl modules if needed and will continue on the
path of de-cluttering the main script.
parent d51b7533
......@@ -31,6 +31,10 @@
# Adding an option? Grep for 'defaultGlobalOptions' --mpyne
use FindBin qw($RealBin);
use lib "$RealBin/../share/apps/kdesrc-build/modules";
use lib "$RealBin/modules";
# Force all symbols to be in this package. We can tell if we're being called
# through require/eval/etc. by using the "caller" function.
package main;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment