From: Gurusamy Sarathy Date: Mon, 1 Feb 1999 07:28:05 +0000 (+0000) Subject: devnull() support from Jan Dubois and others X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=99804bbbf0b24ddc3b565419ea53f59e7410d1f4;p=p5sagit%2Fp5-mst-13.2.git devnull() support from Jan Dubois and others p4raw-id: //depot/perl@2751 --- diff --git a/lib/File/Spec/OS2.pm b/lib/File/Spec/OS2.pm index d602617..ee7b331 100644 --- a/lib/File/Spec/OS2.pm +++ b/lib/File/Spec/OS2.pm @@ -31,6 +31,10 @@ sub path { @path; } +sub devnull { + return "/dev/nul"; +} + 1; __END__ diff --git a/lib/File/Spec/Unix.pm b/lib/File/Spec/Unix.pm index 77de73a..ae3546e 100644 --- a/lib/File/Spec/Unix.pm +++ b/lib/File/Spec/Unix.pm @@ -105,6 +105,16 @@ sub curdir { return "." ; } +=item devnull + +Returns the name of the null device (bit bucket). "/dev/null" on UNIX. + +=cut + +sub devnull { + return "/dev/null"; +} + =item rootdir Returns a string representing of the root directory. "/" on UNIX. diff --git a/lib/File/Spec/VMS.pm b/lib/File/Spec/VMS.pm index c5269fd..2084505 100644 --- a/lib/File/Spec/VMS.pm +++ b/lib/File/Spec/VMS.pm @@ -97,6 +97,16 @@ sub curdir { return '[]'; } +=item devnull (override) + +Returns a string representing the null device. + +=cut + +sub devnull { + return 'NL:'; +} + =item rootdir (override) Returns a string representing of the root directory. diff --git a/lib/File/Spec/Win32.pm b/lib/File/Spec/Win32.pm index 034a0cb..3af8bcf 100644 --- a/lib/File/Spec/Win32.pm +++ b/lib/File/Spec/Win32.pm @@ -66,6 +66,10 @@ sub catfile { return $dir.$file; } +sub devnull { + return "nul"; +} + sub path { local $^W = 1; my($self) = @_;