You are trying to use Net::SFTP::Foreign::Compatput method as Net::SFTP::Foreign one, that's wrong, they have different arguments. Specifically, Net::SFTP::Foreign::Compat::put doesn't accept optional arguments as copy_time.
But most important, checking the status value is useless after calling put or any other high level method!!!, You should be using $sftp->error instead.