Date-Manip
view release on metacpan or search on metacpan
internal/module.isp view on Meta::CPAN
FWn
FWT
GAAS
GD
Geraint
german
GetNext
GetPrev
getpw
getpwnam
getpwuid
Gilles
Gillingwater
Giray
github
GitHub
GlobalCnf
gmt
gmtime
gmtoff
Gosta
lib/Date/Manip/DM5.pm view on Meta::CPAN
#
# This is Windows/Mac friendly.
# This is efficient.
sub _ExpandTilde {
my($file)=shift;
my($user,$home)=();
# ~aaa/bbb= ~ aaa /bbb
if ($file =~ s|^~([^/]*)||) {
$user=$1;
# Single user operating systems (Mac, MSWindows) don't have the getpwnam
# and getpwuid routines defined. Try to catch various different ways
# of knowing we are on one of these systems:
return "" if ($OS eq "Windows" or
$OS eq "Mac" or
$OS eq "Netware" or
$OS eq "MPE");
$user="" if (! defined $user);
if ($user) {
$home= (getpwnam($user))[7];
} else {
$home= (getpwuid($<))[7];
}
$home = VMS::Filespec::unixpath($home) if ($OS eq "VMS");
return "" if (! defined $home);
$file="$home/$file";
}
$file;
}
# $File=_FullFilePath($file);
# Returns the full or relative path to $file (expanding "~" if necessary).
lib/Date/Manip/DM5.pod view on Meta::CPAN
other method of determining the time zone, Date::Manip uses this and doesn't
have to look elsewhere for the time zone.
When running outside the tests, Date::Manip has to rely on its other
methods for determining the time zone.
=item B<Missing date formats>
Please see the Date::Manip::Problems document for a discussion.
=item B<Complaining about getpwnam/getpwuid>
Another problem is when running on Micro$oft OS's. I have added many
tests to catch them, but they still slip through occasionally. If any ever
complain about getpwnam/getpwuid, simply add one of the lines:
$ENV{OS} = Windows_NT
$ENV{OS} = Windows_95
to your script before
use Date::Manip
=item B<Date::Manip is slow>
( run in 0.364 second using v1.01-cache-2.11-cpan-8d75d55dd25 )