Skip Menu |

This queue is for tickets about the Authen-PAM CPAN distribution.

Report information
The Basics
Id: 13478
Status: resolved
Priority: 0/
Queue: Authen-PAM

People
Owner: nikip [...] cpan.org
Requestors: at [...] altlinux.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.15
Fixed in: (no value)



Subject: PAM.pm: use POSIX: surpress import()
POSIX exports some 500 functions to the caller. Since PAM.pm uses none of them, supressing implicit import() call makes some sense. --- Authen-PAM-0.16/PAM.pm.in- 2005-05-04 13:43:30 +0400 +++ Authen-PAM-0.16/PAM.pm.in 2005-06-30 09:50:47 +0400 @@ -5,7 +5,7 @@ use strict; #no strict "subs"; use Carp; -use POSIX; +use POSIX (); use vars qw($VERSION @ISA %EXPORT_TAGS $AUTOLOAD); #use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $AUTOLOAD); --- Authen-PAM-0.16/test.pl- 2005-06-30 09:41:30 +0400 +++ Authen-PAM-0.16/test.pl 2005-06-30 09:51:05 +0400 @@ -10,7 +10,7 @@ END { print "not ok 1\n" unless $loaded; use strict; use vars qw($loaded $fd_status); -use POSIX; +use POSIX qw(ttyname); use Authen::PAM; # qw(:functions :constants); $loaded = 1; End of patch -- Alexey Tourbin ALT Linux Team
Nope, it uses at least EINVAL and ENOSYS. I was wrong... -- Alexey Tourbin ALT Linux Team
Here is hopefully a better patch: --- Authen-PAM-0.16/PAM.pm.in- 2005-05-04 13:43:30 +0400 +++ Authen-PAM-0.16/PAM.pm.in 2005-06-30 10:29:12 +0400 @@ -5,7 +5,7 @@ use strict; #no strict "subs"; use Carp; -use POSIX; +use POSIX qw(EINVAL ENOSYS ECHO TCSANOW); use vars qw($VERSION @ISA %EXPORT_TAGS $AUTOLOAD); #use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $AUTOLOAD); @@ -140,13 +140,13 @@ sub pam_default_conv { my $termios = POSIX::Termios->new; $termios->getattr(1); my $c_lflag = $termios->getlflag; - $termios->setlflag($c_lflag & ~POSIX::ECHO ); - $termios->setattr(1, POSIX::TCSANOW) ; + $termios->setlflag($c_lflag & ~ECHO); + $termios->setattr(1, TCSANOW) ; chomp( $ans = <STDIN> ); print "\n"; $termios->setlflag($c_lflag); - $termios->setattr(1, POSIX::TCSANOW ); + $termios->setattr(1, TCSANOW); } elsif ($code == PAM_PROMPT_ECHO_ON() ) { chomp( $ans = <STDIN> ); } elsif ($code == PAM_ERROR_MSG() ) { print STDERR "$msg\n"; } --- Authen-PAM-0.16/test.pl- 2004-11-09 10:30:39 +0300 +++ Authen-PAM-0.16/test.pl 2005-06-30 10:29:12 +0400 @@ -10,7 +10,7 @@ END { print "not ok 1\n" unless $loaded; use strict; use vars qw($loaded $fd_status); -use POSIX; +use POSIX qw(ttyname); use Authen::PAM; # qw(:functions :constants); $loaded = 1; End of patch