Closed swelljoe closed 7 years ago
Joe, hi!
I will try to take a look tonight.
Joe,
When Config::IniFiles
is not installed the error is returned:
Error - Perl execution failed
Can't locate Config/IniFiles.pm in @INC (@INC contains: /usr/libexec/webmin /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . /usr/libexec/webmin/ ..) at ./jailkit-lib.pl line 32.
BEGIN failed--compilation aborted at ./jailkit-lib.pl line 32.
Compilation failed in require at /usr/libexec/webmin/webmin-jailkit/index.cgi line 8.
Here is the fix https://github.com/swelljoe/webmin-jailkit/pull/1
Yes, I used those for the purpose of giving a notion to the level of the variable. I will try to avoid using it in the future. (for Mail Module).
I built JailKit quickly, it works! ;)
The other reason why I used it, is to make sure that global variables are not overwritten due to old and stupid concept that has been fixed in ES6.
Now we can and should use const
and let
.
Block-scoped binding constructs. let
is the new var. const
is single-assignment. Static restrictions prevent use before assignment.
function f() {
{
let x;
{
// okay, block scoped name
const x = "sneaky";
// error, const
x = "foo";
}
// error, already declared in block
let x = "inner";
}
}
Have a look at ES6 features - it's a joy!
Block scope is great! I agree! (It's something I missed when going to Python many years ago...Perl had block scope, but Python didn't.)
Also, thanks! That fixes it. Now I can work on other stuff for Virtualmin 6 release!
Hey Ilia,
I've built a new module for managing Jailkit configuration. Super simple with just a few forms. It works fine in the old framed theme, but the delete confirmation form fails in Authentic theme with a JavaScript error.
In Firefox the error is:
In Chrome the error is:
The new module which exhibits this problem is here:
https://github.com/swelljoe/webmin-jailkit
It's kinda clunky (it's been a while since I've built a Webmin module), but it works in the old theme, so I dunno what to do about it. The problem shows up when you select a jail, and click delete.
The see this, you don't need Jailkit installed, but you do need a file in /etc/jailkit/jk_init.ini
That file would look something like this (it can have any number of sections, this is enough to allow you to test with multi deletes though both single and multi-deletes fail with the same error; it's the delete confirmation page that fails to work):
As an aside, I hate the use of ____ in variables! There's so many underscores throughout Authentic, and the number of underscores seems to be significant (there's a lot of them, but different numbers of them in different variables...very hard to read and make sense of).