Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POSIX::tmpnam() is deprecated in Perl 5.22.0 #103

Open
lianwangtao opened this issue Jul 13, 2020 · 8 comments
Open

POSIX::tmpnam() is deprecated in Perl 5.22.0 #103

lianwangtao opened this issue Jul 13, 2020 · 8 comments

Comments

@lianwangtao
Copy link

Perl update: http://perl11.org/pod/perl5251delta.html

Unimplemented: POSIX::tmpnam(): use File::Temp instead at /System/Library/Perl/5.28/darwin-thread-multi-2level/POSIX.pm line 185.
Unimplemented: POSIX::tmpnam() at /usr/local/bin/csshx line 1130.
BEGIN failed--compilation aborted at /usr/local/bin/csshx line 1130.
@ajunB7
Copy link

ajunB7 commented Aug 5, 2020

I fixed it via the following:

in /usr/local/bin/csshX

change use POSIX qw(tmpnam); to use File::Temp qw/ :POSIX /;

@dounokouno
Copy link

This has been fixed in the following fork version.

https://github.com/parera10/csshx

The fork version can be installed with hombrew tap.

https://github.com/parera10/homebrew-csshx

@maicololiveira
Copy link

Thank you guys! It's working fine for MAC OS Ventura as well.

@kayatomic
Copy link

kayatomic commented Nov 11, 2022

What do I do if I installed csshx via homebrew and the path is /opt/homebrew/bin/csshx? (I'm on MacOS Ventura)

I tried:

change use POSIX qw(tmpnam); to use File::Temp qw/ :POSIX /;

but it's still giving me:
Unimplemented: POSIX::tmpnam(): use File::Temp instead at /System/Library/Perl/5.30/darwin-thread-multi-2level/POSIX.pm line 185. Unimplemented: POSIX::tmpnam() at /opt/homebrew/bin/csshx line 1131. BEGIN failed--compilation aborted at /opt/homebrew/bin/csshx line 1131.

This is what my csshx looks like:
#use POSIX qw(uname);
use File::Temp qw/ :POSIX /;

@wolf3142
Copy link

wolf3142 commented Nov 12, 2022

After making the suggested change above, the aforementioned errors went away, but I am now faced with:

Undefined subroutine &CsshX::Config::uname called at /usr/local/bin/csshx line 81.
This is referring to:

($obj->{osver} = (uname())[2]) =~ s/^(\d+)(\.\d+).*/"10.".($1-4)."$2"/e;

Any ideas?

@code-for-practice
Copy link

@kayatomic Just in case if you were unable to resolve this; you might need to check the same at line 1131.
I did the same change at another instance of "use POSIX qw(tmpnam);" and it didn't worked.

@Akhileshkumarkc
Copy link

Akhileshkumarkc commented Feb 16, 2023

@wolf3142 @code-for-practice Try adding this line for uname().
use POSIX qw(uname)
https://github.com/parera10/csshx/blob/master/csshX#L25 (based on this).

@arrajeev87
Copy link

I installed csshx using brew and it was working pretty good, un till I upgraded my MacOS.
My current MacOS version is Ventura - 13.2.1 (22D68)
I was facing the below issue,
Unimplemented: POSIX::tmpnam(): use File::Temp instead at /System/Library/Perl/5.34/darwin-thread-multi-2level/POSIX.pm line 185. Unimplemented: POSIX::tmpnam() at /usr/local/bin/csshX line 1130. BEGIN failed--compilation aborted at /usr/local/bin/csshX line 1130.

So I did the changes in the csshX file as mentioned
so my current code looks like this,

use base qw(CsshX::Socket::Selectable); #use POSIX qw(tmpnam); use File::Temp qw/ :POSIX /; use FindBin qw($Bin $Script);;

However I am getting this below error now,
Can't locate Foundation.pm in @INC (you may need to install the Foundation module) (@INC contains: /Library/Perl/5.34/darwin-thread-multi-2level /Library/Perl/5.34 /Network/Library/Perl/5.34/darwin-thread-multi-2level /Network/Library/Perl/5.34 /Library/Perl/Updates/5.34.0 /System/Library/Perl/5.34/darwin-thread-multi-2level /System/Library/Perl/5.34 /System/Library/Perl/Extras/5.34) at (eval 8) line 1. BEGIN failed--compilation aborted at (eval 8) line 1.

I see this in csshX
my $terminal; sub init { eval "use Foundation; use List::Util qw(min max) "; die $@ if $@;

Can anyone help me how can I install this Foundation module into perl?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants