Skip to content

Commit

Permalink
DSML.pm, Protocol/ldap.pm: use MIME::Base64::decode()
Browse files Browse the repository at this point in the history
Save some bytes and cycles by using MIME::Base64::decode() instead of
MIME::Base64::decode_base64().
  • Loading branch information
marschap committed Sep 26, 2013
1 parent 1e77b09 commit a49d2bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/LWP/Protocol/ldap.pm
Expand Up @@ -79,7 +79,7 @@ sub request {
# we only accept Basic authorization for now
if ($authorization =~ /^Basic\s+([A-Z0-9+\/=]+)$/i) {
require MIME::Base64;
($user, $password) = split(/:/, MIME::Base64::decode_base64($1), 2);
($user, $password) = split(/:/, MIME::Base64::decode($1), 2);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Net/LDAP/DSML.pm
Expand Up @@ -296,7 +296,7 @@ sub characters {
my $state = $self->{reader};
if (my $sref = $state->{value}) {
$$sref = ($state->{encoding}||'') eq 'base64'
? do { require MIME::Base64; MIME::Base64::decode_base64($data->{Data}) }
? do { require MIME::Base64; MIME::Base64::decode($data->{Data}) }
: $data->{Data};
}
}
Expand Down

0 comments on commit a49d2bc

Please sign in to comment.