Subject: | "Cheap" path is never taken in ls() with "wanted" |
Date: | Thu, 01 Feb 2018 15:12:01 +0200 |
To: | bug-Net-SFTP-Foreign [...] rt.cpan.org |
From: | Dean West <dwest1975 [...] ukr.net> |
Hi,
From the source code:
if ($cheap and
ref $opts{wanted} eq 'RegExp' and
not defined $opts{no_wanted}) {
$cheap_wanted = delete $opts{wanted}
}
else {
$wanted = (delete $opts{_wanted} ||
_gen_wanted(delete $opts{wanted},
delete $opts{no_wanted}));
undef $cheap if defined $wanted;
}
There is no such reference type as "RegExp" in Perl (unless a custom class with such a name is created).
From documentation (http://perldoc.perl.org/perlop.html#Regexp-Quote-Like-Operators): ref(qr/x/) returns "Regexp".
As a result there is no possibility to avoid processing the attributes when "wanted" is used in ls().
Regards,
--
Dean