According to the Fine Source, Archive::Tar::File strips off the high bits from the mode.
You can try the following magic incantation at the beginning of your script (before anything
might have referenced Archive::Tar) and see if that subverts it:
use Archive::Tar::Constant ();
BEGIN {
local $SIG{__WARN__} = sub{};
*Archive::Tar::Constant::STRIP_MODE = sub(){ sub {shift} };
}
...
use Archive::Tar;
...
Brief explanation: STRIP_MODE is a constant that contains a subroutine that can be passed the raw mode and returns the mode that should be stored. It is normally set to
sub { shift() & 0777 }
Because it is a constant, imported from Archive::Tar::Constant into Archive::Tar::File and used there, whatever it is set to will be inlined into Archive::Tar::File as it is compiled. So to change it, the constant must be changed before it is inlined, that is, before Archive::Tar::File ever gets loaded.
N.B. Because changing an inlinable constant is prone to error (changing it after it is too late to have any effect), it normally generates a severe warning that can't be disabled by usual means.