my $other_secret = Crypt::SecretBuffer->new("Foo"); $password->unmask_to(sub($pass) { do_something($user, $pass, $other_secret) });