Subject: | Starttls array ref argument dereferenced twice |
The documentation says that Starttls accepts an array reference with the arguments to pass
on to the start_SSL method.
However, when passing an array ref like $imap->Starttls([Timeout=>30]) I get the following
error:
Not a SCALAR reference at /opt/local/lib/perl5/site_perl/5.12.3/Mail/IMAPClient.pm line 426
Because on line 426 the Starttls argument is first dereferenced as a scalar (incorrect) and
THEN dereferenced as an array.
Cannot just fix it by passing $imap->Starttls(\[Timeout=>30]) because then it won't pass the
ref( $self->Starttls ) eq "ARRAY" check on the previous line (it would get "REF", not "ARRAY").
The following patch is against 3.29:
426c426
< ? ( @${ $self->Starttls } )
---
Show quoted text
> ? ( @{ $self->Starttls } )