[Koha-bugs] [Bug 26163] Add plugin directories to PERL5LIB

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Aug 12 01:30:45 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26163

--- Comment #4 from David Cook <dcook at prosentient.com.au> ---
(In reply to Kyle M Hall from comment #3)
> Basically, it's so that plugins can have DBIC schema files.
> 

I was hoping for more of a technical explanation, but I think I understand
after re-reading the earlier comments. The plugin developer would provide DBIC
schema files with the plugin in the lib directory, and if the plugin is loaded
early enough, then Koha::Database will detect them?

I am all for using DBIC schema files. It would make plugins a lot easier to
write.

However, wouldn't that mean that you'd have to restart Starman before being
able to use the plugin? Shouldn't that requirement should be surfaced to users
(even if only as a warning)? 

> We should be able to test PERL5LIB to see if the path already exists in and
> to not add it if it does.

Since koha-plack uses bash, we could try something like the following (although
I admit it uses bash magic I haven't fully understood yet):

[[ ":$PATH:" != *":/path/to/add:"* ]] && PATH="${PATH}:/path/to/add"

(https://unix.stackexchange.com/questions/217622/add-path-to-path-if-not-already-in-path)

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list