Pod-Simple

 view release on metacpan or  search on metacpan

t/perlcyg.pod  view on Meta::CPAN

running as `C<./perl harness>'.

Test results vary depending on your host system and your Cygwin
configuration.  If a test can pass in some Cygwin setup, it is always
attempted and explainable test failures are documented.  It is possible
for Perl to pass all the tests, but it is more likely that some tests
will fail for one of the reasons listed below.

=head2 File Permissions

UNIX file permissions are based on sets of mode bits for
{read,write,execute} for each {user,group,other}.  By default Cygwin
only tracks the Win32 read-only attribute represented as the UNIX file
user write bit (files are always readable, files are executable if they
have a F<.{com,bat,exe}> extension or begin with C<#!>, directories are
always readable and executable).  On WinNT with the I<ntea> C<CYGWIN>
setting, the additional mode bits are stored as extended file attributes.
On WinNT with the I<ntsec> C<CYGWIN> setting, permissions use the standard
WinNT security descriptors and access control lists.  Without one of
these options, these tests will fail:

  Failed Test           List of failed
  ------------------------------------
  io/fs.t               5, 7, 9-10
  lib/anydbm.t          2
  lib/db-btree.t        20
  lib/db-hash.t         16
  lib/db-recno.t        18
  lib/gdbm.t            2
  lib/ndbm.t            2
  lib/odbm.t            2
  lib/sdbm.t            2
  op/stat.t             9, 20 (.tmp not an executable extension)

=head2 Hard Links

FAT partitions do not support hard links (whereas NTFS does), in which
case Cygwin implements link() by copying the file.  On remote (network)
drives Cygwin's stat() always sets C<st_nlink> to 1, so the link count
for remote directories and files is not available.  In either case,
these tests will fail:

  Failed Test           List of failed
  ------------------------------------
  io/fs.t               4
  op/stat.t             3

=head2 Filetime Granularity

On FAT partitions the filetime granularity is 2 seconds.  The following
test will fail:

  Failed Test           List of failed
  ------------------------------------
  io/fs.t               18

=head2 Tainting Checks

When Perl is running in taint mode, C<$ENV{PATH}> is considered tainted
and not used, so DLLs not in the default system directories will not
be found.  While the tests are running you will see warnings popup from
the system with messages like:

  Win9x
    Error Starting Program
    A required .DLL file, CYGWIN1.DLL, was not found

  WinNT
    perl.exe - Unable to Locate DLL
    The dynamic link library cygwin1.dll could not be found in the
      specified path ...

Just click OK and ignore them.  When running `C<make test>', 2 popups
occur.  During `C<./perl harness>', 4 popups occur.  Also, these tests
will fail:

  Failed Test           List of failed
  ------------------------------------
  op/taint.t            1, 3, 31, 37

Alternatively, you can copy F<cygwin1.dll> into the directory where the
tests run:

  cp /bin/cygwin1.dll t

or one of the Windows system directories (although, this is B<not>
recommended).

=head2 /etc/group

Cygwin does not require F</etc/group>, in which case the F<op/grent.t>
test will be skipped.  The check performed by F<op/grent.t> expects to
see entries that use the members field, otherwise this test will fail:

  Failed Test           List of failed
  ------------------------------------
  op/grent.t            1

=head2 Script Portability

Cygwin does an outstanding job of providing UNIX-like semantics on top of
Win32 systems.  However, in addition to the items noted above, there are
some differences that you should know about.  This is a very brief guide
to portability, more information can be found in the Cygwin documentation.

=over 4

=item * Pathnames

Cygwin pathnames can be separated by forward (F</>) or backward (F<\>)
slashes.  They may also begin with drive letters (F<C:>) or Universal
Naming Codes (F<//UNC>).  DOS device names (F<aux>, F<con>, F<prn>,
F<com*>, F<lpt?>, F<nul>) are invalid as base filenames.  However, they
can be used in extensions (e.g., F<hello.aux>).  Names may contain all
printable characters except these:

  : * ? " < > |

File names are case insensitive, but case preserving.  A pathname that
contains a backslash or drive letter is a Win32 pathname (and not subject
to the translations applied to POSIX style pathnames).

=item * Text/Binary

When a file is opened it is in either text or binary mode.  In text mode
a file is subject to CR/LF/Ctrl-Z translations.  With Cygwin, the default
mode for an open() is determined by the mode of the mount that underlies
the file.  Perl provides a binmode() function to set binary mode on files
that otherwise would be treated as text.  sysopen() with the C<O_TEXT>
flag sets text mode on files that otherwise would be treated as binary:

    sysopen(FOO, "bar", O_WRONLY|O_CREAT|O_TEXT)

lseek(), tell() and sysseek() only work with files opened in binary mode.



( run in 1.419 second using v1.01-cache-2.11-cpan-364913b4093 )