diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-02-01 07:28:05 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-02-01 07:28:05 +0000 |
commit | 99804bbbf0b24ddc3b565419ea53f59e7410d1f4 (patch) | |
tree | e36d3e921f073666bca01a5660d386b10804613b /lib | |
parent | beed81117712f7512341eefdf74a027ce5d0e806 (diff) | |
download | perl-99804bbbf0b24ddc3b565419ea53f59e7410d1f4.tar.gz |
devnull() support from Jan Dubois <jan.dubois@ibm.net> and others
p4raw-id: //depot/perl@2751
Diffstat (limited to 'lib')
-rw-r--r-- | lib/File/Spec/OS2.pm | 4 | ||||
-rw-r--r-- | lib/File/Spec/Unix.pm | 10 | ||||
-rw-r--r-- | lib/File/Spec/VMS.pm | 10 | ||||
-rw-r--r-- | lib/File/Spec/Win32.pm | 4 |
4 files changed, 28 insertions, 0 deletions
diff --git a/lib/File/Spec/OS2.pm b/lib/File/Spec/OS2.pm index d602617702..ee7b3316fb 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 77de73a216..ae3546eb68 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 c5269fd10c..208450589e 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 034a0cbc2e..3af8bcf38a 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) = @_; |