Skip Menu |

This queue is for tickets about the Net-IMAP-Simple CPAN distribution.

Report information
The Basics
Id: 55552
Status: resolved
Priority: 0/
Queue: Net-IMAP-Simple

People
Owner: Nobody in particular
Requestors: aaron [...] gmx.co.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Difference in _unescape behaviour between 1.16 and 1.1900
Date: Sun, 14 Mar 2010 10:01:55 +0000
To: bug-Net-IMAP-Simple [...] rt.cpan.org
From: Aaron Wilson <aaron [...] gmx.co.uk>
Hi, Firstly, thanks for a great and useful perl library. I currently use this as the basis for a biff like application, and have recently upgraded my OS [0], going from version 1.16 to 1.1900. In the process of this my biff application seems to have broken. This seems to be related to the behaviour of the mailboxes command which seems to have changed between the two versions; in version 1.16, the following code: my @mailboxes = $imap->mailboxes(); foreach my $mbx ( @mailboxes ) { print "$mbx\n"; } produced the list: INBOX Spam <snip> while in the newer version the same code gives the output: "INBOX" "Spam" <snip> Looking into this, the difference seems to be due to the fact the the _unescape function has changed between the two versions for reasons that I can't see by a quick inspection of the changelog and looking at the code, the unescape function seems to be called in a similar context in both versions. I attach a simple test script to demonstrate this. Please could you revert to the earlier version of _unescape or explain the reason for this change (which my small brain might be missing) ? Many thanks for any help, aaron [0] Debian Etch to Debian Squeeze, out of interest.

Message body is not shown because sender requested not to inline it.

Show quoted text
> Firstly, thanks for a great and useful perl library.
For the record... I didn't write this, I'm just the current maintainer. I did put a lot of effort into writing a test suite and making it more modern (via Perl::Critic); but I didn't write it. So thanks from me to everyone else as well. Show quoted text
> Please could you revert to the earlier version of _unescape or explain > the reason for this change (which my small brain might be missing) ?
The reason for the change is simple. The action at a distance the function makes, while perfectly acceptable and useful in Perl, was unclear and the function also didn't pass Perl::Critic. I could have added ignores, but instead, I chose to make it a const function for clarity... I think the correct way to fix this is to look at the instances where _unescape() is used in the chomp() fashion and instead use it in the 3-arg substr() fashion. I released a patched version (see github or http://jettero.pl/ if you're in a hurry), which I'm going to push to cpan in a little bit. Please confirm that it fixes the problem (although I'm quite confident that it does); and thanks for an absolutely perfect bug report -- I already knew the patch before I got out of bed. -Paul -- If riding in an airplane is flying, then riding in a boat is swimming. 114 jumps, 47.2 minutes of freefall, 90.4 freefall miles.
This was actually resolved months ago (pretty sure) and I just never closed it. -- If riding in an airplane is flying, then riding in a boat is swimming. 116 jumps, 48.6 minutes of freefall, 92.9 freefall miles.