Mailinglist Archive: yast-devel (62 mails)

< Previous Next >
[yast-devel] Scripts in client - do not use global namespace!
after my latest debugging of installer failure I found one important
thing how clients works in Yast. It behaves like scripts, but with one
big difference -> if invoked via WFM.Call then it is not completelly
thrown away.
It have benefits like storing some data, but one big drawback. You can
mess global namespace during run of script. And exactly this happen in
the latest issue. I use `include Yast` on top level and it includes all
modules to global namespace. Result is collision between
Yast::FileUtils and ::FileUtils in ruby, which is used for file
So my general recommendation is to not use global namespace in scripts
and also in other places, otherwise you risk collission with ruby
own libraries.
Example of my fix can be seen in [1]


To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages