Thomas Funk wrote: > Hi there! > > I've developed a module for fvwm-perllib using it with Fvwm-Nightshade. It > works fine if I copying it to the lib location. > > Now I want to install it with Fvwm-Nightshade. This is fine as the user is > root. Make can copy it to the right place. > But it is also possible to install Fvwm-Nightshade locally e.g. to ~/.local/. > Now make can't copy it to the right place. > > The path to fvwm-perllib is (on my system): /usr/share/fvwm/perllib/ > underneath the structure: > FVWM/ > FVWM/Modules/ > ... > > The module's package name is FVWM::Modules::SimpleGtk2 and it is placed in > FVWM/Modules/ because it's a sub module of Modules.pm located in FVWM/. > > Now my question: > > How can I add the module to the perllib so that the inheritance with > Module.pm works as expected. Is it enough to copy the module to e.g. > ~/.local/perllib/FVWM/Modules/ > > and add > > use lib "/home/tf/.local/perllib/" > > before > > package FVWM::Modules::SimpleGtk2 > > > ?
I've tested it and use lib "/home/tf/.local/perllib/" has to go into the perl script which used FVWM::Module::SimpleGtk2 and not in the module itself. 1) I've created /home/tf/.local/share/fvwm/perlib/FVWM/Module and copy my module to that place. 2) copy 'use lib' line _above_ the 'use' line: #!/usr/bin/perl -w use lib 'fvwm-perllib dir'; use lib "/home/tf/.local/share/fvwm/perlib"; use FVWM::Module::SimpleGtk2; and that's it - inheritance with Module.pm in /usr/share/fvwm/perllib/FVWM/ works as expected \O/ *Hurray* -- Thomas -- -- -- "Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe." -- Albert Einstein -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/