Filesys::CygwinPaths is a Perl extension to get various conversions of path specifications in the Cygwin port of Perl.
SYNOPSIS
use Filesys::CygwinPaths;
PATHS_mode('cyg_win32');
my $HOME = $ENV{'HOME'};
my @pics_to_ogle = glob("$HOME/mypics/*.jpg");
foreach my $pic (@pics_to_ogle) {
system('C:/Applications/IrfanView/iview32',
vetted_path($pic), '/bf /pos=(0,0) /one', "/title=$pic")
or die "No fun today!";
}
system('C:/Applications/IrfanView/iview32', '/killmesoftly');
OR
use Filesys::CygwinPaths ':all';
my $windows_groks_this = fullwin32path("$ENV{HOME}");
my $posix_style = fullposixpath($ENV{'USERPROFILE'});
if(posixpath($windows_groks_this) ne $posix_style)
{
print "You don't keep your bash HOME in your NT Profile dir, huh?
";
}
Filesys::CygwinPaths is a Cygwin-specific module created to ease the author's occasional pique over the little quirks that come up with using Perl on Cygwin, the free POSIX emulation psuedoplatform for Microsoft Windows(tm). The subroutines it exports allow various kinds of path conversions to be made in a fairly concise, simple, procedural manner. At the present time the module does not have an OO interface but one might be added in the future. The module can be used according to two diffent approaches, which are outlined below.
Note: Hopefully it is obvious that the module can be neither built nor used on any platform besides Perl for Cygwin, and there would be no reason to want to do so.
Product's homepage
Requirements:
· Perl