-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cyradm perl warnings on perl v5.34.1 #4184
cyradm perl warnings on perl v5.34.1 #4184
Comments
That was I think easily fixed:
but I also get this, which I'm not so clear how to fix:
This is line 688:
|
In the absence of comments, I couldn't tell why the code needed to be so complex - based on observed behavior, I "rewrote" the offending code segment like this:
diff is here:
Hopefully someone smarter than me can figure out what I might or might not have done wrong. I tested "lm user/foo*" and "lm -subscribed user/foo" when logged in as either cyrus or foobar and got the same results before/after my "patch" |
I think the original code was trying to format the output into multiple columns if the terminal was wide enough and the values narrow enough.
And then in the double loop, the outer loop is each line of output, the inner loop is each column within that line, and all the stuffing about with I can't tell at a glance whether the column display sorts downwards first or across first, some comments in here sure would be nice, wouldn't they... I wonder if anyone ever sees the output in columns, or if real mailboxes are usually wide enough that it never happens. I guess if someone has a big monitor and runs a terminal on it full screen... The column formatting is cute, but I'm not convinced it's necessary. It's also hard to read -- at a glance I don't see a likely cause of the "Negative repeat count" warning, nor is the display order obvious -- and hard to read is the same as hard to fix. Your patch looks like it solves the problems in the complex column processing by just always outputting a single column instead, am I right? That seems reasonable to me. Do you want to submit this as a PR? I think all the calculation of |
Simplify multi-column to single column fixes cyrusimap#4184
I could reproduce this easily with:
interestingly, if you create the mailbox one byte shorter, it doesn't print this msg:
The |
list mailbox with wildcard e.g. (lm user/foobar/* or lm user/foo*) will produce this error at seemingly random intervals:
Use of uninitialized value $w in numeric gt (>) at /usr/lib64/perl5/vendor_perl/Cyrus/IMAP/Shell.pm line 676.
This is on Fedora 36 - perl-interpreter-5.34.1-486.fc36.x86_64
The text was updated successfully, but these errors were encountered: