This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Document that epoch is always 1970
[perl5.git] / pod / perlport.pod
index c03e279..4b6224e 100644 (file)
@@ -436,7 +436,7 @@ too).  The portable idiom to remove all the versions of a file is
 
     1 while unlink "file";
 
-This will terminate if the file is undeleteable for some reason
+This will terminate if the file is undeletable for some reason
 (protected, not there, and so on).
 
 Don't count on a specific environment variable existing in
@@ -670,7 +670,7 @@ When calculating specific times, such as for tests in time or date modules,
 it may be appropriate to calculate an offset for the epoch.
 
     use Time::Local qw(timegm);
-    my $offset = timegm(0, 0, 0, 1, 0, 70);
+    my $offset = timegm(0, 0, 0, 1, 0, 1970);
 
 The value for C<$offset> in Unix will be C<0>, but in Mac OS Classic
 will be some large number.  C<$offset> can then be added to a Unix time
@@ -827,7 +827,7 @@ Mailing list: cpan-testers-discuss@perl.org
 
 =item *
 
-Testing results: L<http://www.cpantesters.org/>
+Testing results: L<https://www.cpantesters.org/>
 
 =back
 
@@ -1032,12 +1032,12 @@ The C<Win32::*> modules in L<Win32>.
 
 =item *
 
-The ActiveState Pages, L<http://www.activestate.com/>
+The ActiveState Pages, L<https://www.activestate.com/>
 
 =item *
 
 The Cygwin environment for Win32; F<README.cygwin> (installed
-as L<perlcygwin>), L<http://www.cygwin.com/>
+as L<perlcygwin>), L<https://www.cygwin.com/>
 
 =item *
 
@@ -1234,8 +1234,8 @@ character sets internally (usually Character Code Set ID 0037 for OS/400
 and either 1047 or POSIX-BC for S/390 systems).
 
 The rest of this section may need updating, but we don't know what it
-should say.  Please email comments to
-L<perlbug@perl.org|mailto:perlbug@perl.org>.
+should say.  Please submit comments to
+L<https://github.com/Perl/perl5/issues>.
 
 On the mainframe Perl currently works under the "Unix system
 services for OS/390" (formerly known as OpenEdition), VM/ESA OpenEdition, or
@@ -1362,7 +1362,7 @@ where
     Directory and File =~ m|[^\0- "\.\$\%\&:\@\\^\|\177]+|
 
 The default filename translation is roughly C<tr|/.|./|>, swapping dots
-and slahes.
+and slashes.
 
 Note that C<"ADFS::HardDisk.$.File" ne 'ADFS::HardDisk.$.File'> and that
 the second stage of C<$> interpolation in regular expressions will fall
@@ -1591,6 +1591,10 @@ in the SYSTEM environment settings.
 Setting the exec bit on some locations (generally F</sdcard>) will return true
 but not actually set the bit.
 
+(VMS)
+A mode argument of zero sets permissions to the user's default permission mask
+rather than disabling all permissions.
+
 =item chown
 
 (S<Plan 9>, S<RISC OS>)
@@ -1643,6 +1647,11 @@ Invokes VMS debugger.
 C<exec LIST> without the use of indirect object syntax (C<exec PROGRAM LIST>)
 may fall back to trying the shell if the first C<spawn()> fails.
 
+Note that the list form of exec() is emulated since the Win32 API
+CreateProcess() accepts a simple string rather than an array of
+command-line arguments.  This may have security implications for your
+code.
+
 (SunOS, Solaris, HP-UX)
 Does not automatically flush output handles on some platforms.
 
@@ -1955,13 +1964,19 @@ Not implemented.
 
 =item open
 
-(Win32, S<RISC OS>)
+(S<RISC OS>)
 Open modes C<|-> and C<-|> are unsupported.
 
 (SunOS, Solaris, HP-UX)
 Opening a process does not automatically flush output handles on some
 platforms.
 
+(Win32)
+Both of modes C<|-> and C<-|> are supported, but the list form is
+emulated since the Win32 API CreateProcess() accepts a simple string
+rather than an array of arguments.  This may have security
+implications for your code.
+
 =item readlink
 
 (Win32, VMS, S<RISC OS>)
@@ -2120,6 +2135,11 @@ L<C<$?>|perlvar/$?> to C<<< 255 << 8 >>>.  L<C<$?>|perlvar/$?> is set in a
 way compatible with Unix (i.e. the exit status of the subprocess is
 obtained by C<<< $? >> 8 >>>, as described in the documentation).
 
+Note that the list form of system() is emulated since the Win32 API
+CreateProcess() accepts a simple string rather than an array of
+command-line arguments.  This may have security implications for your
+code.
+
 (S<RISC OS>)
 There is no shell to process metacharacters, and the native standard is
 to pass a command line terminated by "\n" "\r" or "\0" to the spawned
@@ -2140,8 +2160,12 @@ may fall back to trying the shell if the first C<spawn()> fails.
 Does not automatically flush output handles on some platforms.
 
 (VMS)
-The return value is POSIX-like (shifted up by 8 bits), which only allows
-room for a made-up value derived from the severity bits of the native
+As with Win32, C<system(1, @args)> spawns an external process and
+immediately returns its process designator without waiting for the
+process to terminate.  In this case the return value may be used subsequently
+in L<C<wait>|perlfunc/wait> or L<C<waitpid>|perlfunc/waitpid PID,FLAGS>.
+Otherwise the return value is POSIX-like (shifted up by 8 bits), which only
+allows room for a made-up value derived from the severity bits of the native
 32-bit condition code (unless overridden by
 L<C<use vmsish 'status'>|vmsish/C<vmsish status>>).  If the native
 condition code is one that has a POSIX value encoded, the POSIX value will
@@ -2253,7 +2277,7 @@ Some tests are known to fail:
 =item *
 
 F<ext/XS-APItest/t/call_checker.t> - see
-L<https://rt.perl.org/Ticket/Display.html?id=78502>
+L<https://github.com/Perl/perl5/issues/10750>
 
 =item *
 
@@ -2408,7 +2432,6 @@ available at L<http://www.cpan.org/src/>
         Open UNIX       (Unixware) (since Perl 5.8.1/5.9.0)
         OS/2
         OS/400          (using the PASE) (since Perl 5.8.1/5.9.0)
-        PowerUX
         POSIX-BC        (formerly BS2000)
         QNX
         Solaris
@@ -2452,7 +2475,8 @@ the past (5.005_03 and earlier), but we haven't been able to verify
 their status for the current release, either because the
 hardware/software platforms are rare or because we don't have an
 active champion on these platforms--or both.  They used to work,
-though, so go ahead and try compiling them, and let perlbug@perl.org
+though, so go ahead and try compiling them, and let
+L<https://github.com/Perl/perl5/issues> know
 of any trouble.
 
         3b1
@@ -2510,7 +2534,7 @@ L<http://www.cpan.org/ports/index.html> for binary distributions.
 =head1 SEE ALSO
 
 L<perlaix>, L<perlamiga>, L<perlbs2000>,
-L<perlce>, L<perlcygwin>, L<perldos>,
+L<perlcygwin>, L<perldos>,
 L<perlebcdic>, L<perlfreebsd>, L<perlhurd>, L<perlhpux>, L<perlirix>,
 L<perlmacos>, L<perlmacosx>,
 L<perlnetware>, L<perlos2>, L<perlos390>, L<perlos400>,