Sidef
view release on metacpan or search on metacpan
lib/Sidef.pm view on Meta::CPAN
$self->{sidef_config_dir} //= $ENV{SIDEF_CONFIG_DIR}
|| File::Spec->catdir(
$ENV{XDG_CONFIG_DIR}
|| (
$ENV{HOME}
|| $ENV{LOGDIR}
|| (
$^O eq 'MSWin32'
? '\Local Settings\Application Data'
: eval { ((getpwuid($<))[7] || `echo -n ~`) }
)
|| File::Spec->curdir()
),
'.config',
'sidef'
);
if (not -d $self->{sidef_config_dir}) {
require File::Path;
eval { File::Path::make_path($self->{sidef_config_dir}) }
lib/Sidef/Sys/Sys.pm view on Meta::CPAN
Sidef::Types::String::String->new($quota), Sidef::Types::String::String->new($comment),
Sidef::Types::String::String->new($gcos), Sidef::Types::String::String->new($shell),
);
}
sub setpwent {
my ($self) = @_;
(CORE::setpwent) ? (Sidef::Types::Bool::Bool::TRUE) : (Sidef::Types::Bool::Bool::FALSE);
}
sub getpwuid {
my ($self, $uid) = @_;
$self->__GETPW__(CORE::getpwuid($uid));
}
sub getpwnam {
my ($self, $name) = @_;
$self->__GETPW__(CORE::getpwnam($name));
}
sub getpwent {
my ($self) = @_;
$self->__GETPW__(CORE::getpwent);
lib/Sidef/Sys/Sys.pod view on Meta::CPAN
=cut
=head2 getpwnam
Sys.getpwnam(name)
Returns the
=cut
=head2 getpwuid
Sys.getpwuid(uid)
Returns the
=cut
=head2 getservbyname
Sys.getservbyname(name, proto)
Returns the
lib/Sidef/Types/Glob/Dir.pm view on Meta::CPAN
sub root {
__PACKAGE__->new(File::Spec->rootdir);
}
sub home {
my ($self) = @_;
my $home = $ENV{HOME} || $ENV{LOGDIR};
if (not $home and $^O ne 'MSWin32') {
$home = (getpwuid($<))[7];
}
$home ? __PACKAGE__->new($home) : do {
state $x = require File::HomeDir;
__PACKAGE__->new(File::HomeDir->my_home);
};
}
sub tmp {
__PACKAGE__->new(File::Spec->tmpdir);
( run in 0.304 second using v1.01-cache-2.11-cpan-8d75d55dd25 )