Skip Menu |

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

Report information
The Basics
Id: 46266
Status: new
Priority: 0/
Queue: Net-IMAP-Client

People
Owner: Nobody in particular
Requestors: icestar [...] inbox.ru
Cc: mihai.bazon [...] gmail.com
AdminCc:

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



Subject: strange output from <fetch> method
Hello! Sorry, but I can't understand how you suggest to use your <fetch> method and I think here is a bug. I want to compose such command "UID FETCH 2 (UID BODY[HEADER.FIELDS (Subject From)])", no problem I write in my script: my $result = $imap->fetch('2', ['UID', 'BODY[HEADER.FIELDS (Subject From)]']); And what I receive: print Dumper($result); $VAR1 = { 'BODY' => [ 'HEADER.FIELDS', [ 'Subject', 'From' ] ], 'UID' => '2', 'From: Name Lastname <dima@mail.xx> Subject: test subject ' => undef }; How I can get the responce on my request from this structure? In addition, I don't understand what you include 'BODY' key for in the hash, how I can use this?
RT-Send-CC: mihai.bazon [...] gmail.com
I think I now what is the cause of the problem: when you're parsing data: $VAR1 = [ BODY[HEADER.FIELDS ("Subject" "From")] ', \'From: Name Lastname <dima@mail.xx>\n Subject: test subject ' ]; You expect that in result will be the hash $VAR1 = { 'BODY[HEADER.FIELDS (Subject From)]' => 'From: Name Lastname <dima@mail.xx>\n Subject: test subject ' }; But really as I wrote already I got this: $VAR1 = { 'BODY' => [ 'HEADER.FIELDS', [ 'Subject', 'From' ] ], 'From: Name Lastname <dima@mail.xx> Subject: test subject ' => undef }; In addition I got warnings: "Odd number of elements in hash assignment at /usr/lib64/perl5/ site_perl/5.8.8/Net/IMAP/Client.pm line 351, <GEN0> line 36." when I call <$summary = $imap->get_summaries($msg_id, 'Subject From');> and "Odd number of elements in anonymous hash at /usr/lib64/perl5/ site_perl/5.8.8/Net/IMAP/Client.pm line 388, <GEN0> line 36." when I call <my $result = $imap->fetch('2', ['UID', 'BODY[HEADER.FIELDS (Subject From)]']);>