BEGIN {
use Exporter ();
- use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
- @ISA = qw(Exporter);
+ use vars qw(@EXPORT @EXPORT_OK %EXPORT_TAGS);
@EXPORT = qw(getpwent getpwuid getpwnam getpw);
@EXPORT_OK = qw(
$pw_name $pw_passwd $pw_uid
}
use vars @EXPORT_OK;
-use Class::Template qw(struct);
+# Class::Struct forbids use of @ISA
+sub import { goto &Exporter::import }
+
+use Class::Struct qw(struct);
struct 'User::pwent' => [
name => '$',
passwd => '$',
gid => '$',
quota => '$',
comment => '$',
- gcos => '$',
+ gecos => '$',
dir => '$',
shell => '$',
];
sub getpwent ( ) { populate(CORE::getpwent()) }
sub getpwnam ($) { populate(CORE::getpwnam(shift)) }
-sub getpwgid ($) { populate(CORE::getpwgid(shift)) }
-sub getpw ($) { ($_[0] =~ /^\d+/) ? &getpwgid : &getpwnam }
+sub getpwuid ($) { populate(CORE::getpwuid(shift)) }
+sub getpw ($) { ($_[0] =~ /^\d+/) ? &getpwuid : &getpwnam }
1;
__END__
=head1 NAME
-User::pwent.pm - by-name interface to Perl's built-in getpw*() functions
+User::pwent - by-name interface to Perl's built-in getpw*() functions
=head1 SYNOPSIS
=head1 NOTE
-While this class is currently implemented using the Class::Template
+While this class is currently implemented using the Class::Struct
module to build a struct-like class, you shouldn't rely upon this.
=head1 AUTHOR