summaryrefslogtreecommitdiff
path: root/lib/File
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'smoke-me/jkeenan/afresh/132401-file-copy' into bleadJames E Keenan2017-11-122-2/+9
|\
| * Increment $File::Copy::VERSIONJames E Keenan2017-11-061-1/+1
| |
| * Support Time::HiRes::utime in File::CopyAndrew Fresh2017-11-062-1/+8
| | | | | | | | | | | | | | If Time::HiRes exists and has utime support for setting hires utime, use that so cross-device moves can keep time accurately. Used by autoconf.
* | Replace multiple 'use vars' by 'our' in libNicolas R2017-11-111-3/+9
|/ | | | | | | | Using vars pragma is discouraged and has been superseded by 'our' declarations available in Perl v5.6.0 or later. This commit is about replacing the usage of 'vars' pragma by 'our' in 'lib' directory.
* avoid sysread()/syswrite() warnings from the default :utf8 from PERL_UNICODETony Cook2017-09-201-1/+6
| | | | | | | | | | | | In a UTF-8 locale, if the PERL_UNICODE environment variable is set, perl may add a :utf8 layer. v5.23.1-197-gfb10a8a deprecated using sysread(), syswrite() etc on such handles, which meant that a test run under PERL_UNICODE could produce a significant number of deprecation warnings. Prevent those warnings, typically by binmode(), but in one case by disabling the warning.
* Switch most open() calls to three-argument form.John Lightsey2016-12-233-20/+20
| | | | | | | | | | Switch from two-argument form. Filehandle cloning is still done with the two argument form for backward compatibility. Committer: Get all porting tests to pass. Increment some $VERSIONs. Run: ./perl -Ilib regen/mk_invlists.pl; ./perl -Ilib regen/regcharclass.pl For: RT #130122
* (perl #128199) rmscopy() is VMS specific and not exportedTony Cook2016-06-151-1/+6
| | | | | | The first is kind of implied by the text, but make it explicit. Added minor punctuation fixes suggested by Reuben Thomas.
* Bump $File::Copy::VERSIONDominic Hargreaves2016-04-301-1/+1
|
* File::Copy: add a warning about flushing writesDominic Hargreaves2016-04-301-0/+8
| | | | Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=494590
* Replace common Emacs file-local variables with dir-localsDagfinn Ilmari Mannsåker2015-03-221-5/+0
| | | | | | | | | | | | | | | | An empty cpan/.dir-locals.el stops Emacs using the core defaults for code imported from CPAN. Committer's work: To keep t/porting/cmp_version.t and t/porting/utils.t happy, $VERSION needed to be incremented in many files, including throughout dist/PathTools. perldelta entry for module updates. Add two Emacs control files to MANIFEST; re-sort MANIFEST. For: RT #124119.
* Stop test suite filling /tmpDavid Mitchell2014-12-031-1/+1
| | | | | | | | | | | | | | | | | | | Some test files use File::Temp in such a way that the temporary files and directories under /tmp aren't deleted at the end. On a smoker system, this can gradually accumulate thousands of entries under /tmp. The general culprits fixed by this commit are: 1) using tempfile() without the UNLINK => 1 argument; 2) Using Test::More (which uses Test::Stream), which creates a test directory in such a way that only the original parent thread will remove it; for some reason I still don't fully understand, detaching a thread rather than joining it stops this clean up happening. In the affected test files, I replaced the ->detach() with a ->join() just before exit, and the problem went away. Some tests under cpan/ are still leaky; these will be addressed upstream.
* these permissions appear to be handled correctly in current cygwinTony Cook2014-10-201-6/+2
| | | | | | this TODO has been passing on my smoke testers for years, if it turns out it isn't passing for someone, it should probably be skipped instead of TODOed to prevent the noise.
* use a different name for the test directoryTony Cook2014-10-201-5/+6
| | | | | | on Windows (cygwin) I was getting rare failures creating $copy1 with an error complaining that it was a directory, possibly due to some background process tracking directories.
* File::Copy does not overwrite read-only filesAlexandr Ciornii2014-07-141-1/+2
|
* Bump File::Copy to version 2.29.Craig A. Berry2013-12-211-1/+1
|
* Simplify and clarify VMS specifics in File::Copy.Craig A. Berry2013-12-211-33/+19
| | | | | | | | | 4c38808d92b95 added some logic to make a "to" path with no directory component inherit from the current working directory rather than the directory portion of the "from" path. It also added a trailing dot to make null file types unambiguous. But the comments emphasized the latter and made no mentin of the former, and the implementation was unnecessarily complex.
* Revert "Unix compatibility mode" in File::Copy on VMS.Craig A. Berry2013-12-211-85/+4
| | | | | | | | | | This backs out the changes introduced in fc06fdeb76c89. On reflection, it doesn't make any sense to support what is actually a Unix *report* mode in an API that does not report filenames. File::Copy just needs to supply names to the underlying copy functions that they can operate on. How those names are presented is of no concern here as we don't present them to the caller.
* Fix typo introduced in 4c38808d92b95.Craig A. Berry2013-12-211-1/+1
| | | | | | The variable name is '$^O' not '-$^O'. This meant File::Copy::move didn't put the file in the current working directory when the to argument had no path component.
* bump File::Copy's $VERSIONTony Cook2013-09-181-1/+1
|
* Added note about directories not being created with File::Copy::copyNathan Glenn2013-09-181-2/+4
|
* Convert to use of Test::More. Boost test coverage.James E Keenan2013-07-101-58/+71
| | | | | | | | | | Since File::Compare's functions are documented to return 1, 0, or -1, we will continue to examine the return value in our tests, rather than simply checking for truth when 0 or 1 is returned. Following code review, eliminate trailing whitespace. For: RT #118823
* Add block to exercise case of very large buffer in lib/File/Copy.pm.James E Keenan2013-07-081-4/+17
|
* Move File::Find from lib/ to ext/Nicholas Clark2013-07-053-2475/+0
|
* Change File::Find's tests to look for taint.t instead of commonsense.tNicholas Clark2013-07-052-12/+12
| | | | | | | | | This passes whether the tests are in lib/ (and hence run with the CWD as t/) or in ext/File-Find (and hence run with that as the CWD) because they find t/op/taint.t or ext/File-Find/t/taint.t respectively. Change taint.t to count the number of times it finds a file named taint.t, and fail if the count isn't 1. find.t was already testing a count.
* Improve the BEGIN-time setup code for File::Find's tests.Nicholas Clark2013-07-052-25/+19
| | | | | | | | | In find.t merge the two BEGIN blocks and eliminate the redundant C<use File::Spec;> In both, don't attempt to change directory to t/ (which will be unhelpful once File::Find is moved to ext/) Only make paths in @INC absolute if $ENV{PERL_CORE} is set (which will ease making File::Find dual-life, if we want to this.)
* Add test for undefined first argument to fileparse().James E Keenan2013-07-041-1/+7
|
* Increase $File::Basename::VERSION to 2.85Father Chrysostomos2013-06-221-1/+1
|
* Fixed verbatim lines in POD over 79 charactersBrian Gottreu2013-06-221-8/+8
|
* prevent lib/File/stat.t from aborting at END on cygwinTony Cook2013-06-111-2/+4
| | | | | | | | | cygwin appears to be unique in that it uses fast_abs_path() for abs_path() and vaguely follows POSIX semantics on directory permissions. Previously the tempdir created would be chmod() to 0600 (non-executable) and fast_abs_path() would croak when it couldn't chdir into the directory.
* use more descriptive examples in File::CopyZsbán Ambrus2013-06-091-3/+3
|
* typo fix for File::FindDavid Steinbrunner2013-05-251-2/+2
| | | | Bump $VERSION for File::Find.
* Bump File::Copy version as the contents have changedChris 'BinGOs' Williams2013-03-051-1/+1
|
* fix pod: add missing 'C' of inline code tagsreneeb2013-03-041-2/+2
|
* Skip tests in File::Copy tests on DragonflyBSD tooChris 'BinGOs' Williams2013-03-011-0/+3
| | | | Setting 0100, 0300 and 0500 on files is totally non-reversable
* Move File::DosGlob from lib to extFather Chrysostomos2012-12-092-429/+0
|
* Fix test-skipping logic for File::Find under no-taint-perlSteffen Mueller2012-11-201-2/+2
|
* Remove the EPOC port.Nicholas Clark2012-11-191-3/+2
| | | | | | | EPOC was a family of operating systems developed by Psion for mobile devices. It was the predecessor of Symbian. The port was last updated in April 2002.
* Remove an inadvertent case sensitivity from find.t.Craig A. Berry2012-11-111-1/+1
| | | | | The extension of a VMS directory may be presented as .DIR or .dir depending on various settings and its actual name on disk.
* Add C define to remove taint support from perlSteffen Mueller2012-11-052-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By defining NO_TAINT_SUPPORT, all the various checks that perl does for tainting become no-ops. It's not an entirely complete change: it doesn't attempt to remove the taint-related interpreter variables, but instead virtually eliminates access to it. Why, you ask? Because it appears to speed up perl's run-time significantly by avoiding various "are we running under taint" checks and the like. This change is not in a state to go into blead yet. The actual way I implemented it might raise some (valid) objections. Basically, I replaced all uses of the global taint variables (but not PL_taint_warn!) with an extra layer of get/set macros (TAINT_get/TAINTING_get). Furthermore, the change is not complete: - PL_taint_warn would likely deserve the same treatment. - Obviously, tests fail. We have tests for -t/-T - Right now, I added a Perl warn() on startup when -t/-T are detected but the perl was not compiled support it. It might be argued that it should be silently ignored! Needs some thinking. - Code quality concerns - needs review. - Configure support required. - Needs thinking: How does this tie in with CPAN XS modules that use PL_taint and friends? It's easy to backport the new macros via PPPort, but that doesn't magically change all code out there. Might be harmless, though, because whenever you're running under NO_TAINT_SUPPORT, any check of PL_taint/etc is going to come up false. Thus, the only CPAN code that SHOULD be adversely affected is code that changes taint state.
* Remove the MPE/iX port.Nicholas Clark2012-09-211-9/+1
| | | | | MPE/iX was a business-oriented minicomputer operating system made by Hewlett-Packard. Support from HP terminated at the end of 2010.
* Make new File::Copy test case insensitive.Craig A. Berry2012-08-311-1/+1
| | | | | On VMS with default setttings, the filename is reported as copy.t, not Copy.t, so make the regex allow that.
* Revert File::Copy::copy() to fail when copying a file onto itselfSteve Hay2012-08-282-6/+4
| | | | | | | | | Copying a file onto itself was made a fatal error by 96a91e0163. This was changed in 754f2cd0b9 from an undesirable croak() to return 1, but the documentation was never changed from it being a fatal error. It should probably have remained an error as per the documentation (but updated not to say fatal) for consistency with cases of copying a file onto itself via symbolic links or hard links.
* Fix File::Copy test failure on WindowsSteve Hay2012-08-281-0/+4
| | | | | Failure was introduced by 43ddfa5614 which looks for a warning message from code that isn't run on Windows.
* rt #111126 - don't empty a file with copy("foo/bar", "foo/");Tony Cook2012-08-242-6/+5
|
* rt #111126 - TODO test for copy foo/file to foo/Tony Cook2012-08-241-1/+27
|
* Consistent unixy path handling in File::Find::_find_opt.Craig A. Berry2012-08-201-1/+2
| | | | | | | | | | | | | | | Back in a1ccf0c4149b we converted the current working directory to Unix format on VMS, but neglected to change what later gets pasted onto it with a hard-coded slash delimiter. The resulting mongrel filespec was invalid and of course would not appear to exist even if the file did exist under a properly assembled name. So this commit makes the use of Unix-style paths on VMS within _find_opt consistent. The bug was tickled by a recent change to Module::Pluggable, whose tests and the tests of other modules that depend on it started failing en masse.
* [perl #113796] lib/File/stat.t failures when -l $^XFather Chrysostomos2012-06-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems that gcc produces this: $ ./perl -Ilib -e 'warn $^X' /Users/sprout/Perl/perl.git/perl at -e line 1. while g++ produces this: $ ./perl -Ilib -e 'warn $^X' ./perl at -e line 1. (I may be misdiagnosing this, but I have two blead builds that give different values for $^X.) The script is using $^X for testing, which is why it could produce different results. In any case, this produces the same output for both compilers: use File::stat; my $stat = File::stat::stat('./perl'); warn eval '-l $stat'; warn eval '-l "./perl"'; __END__ Warning: something's wrong at - line 3. 1 at - line 4. The test is wrong, as -l _ will fail after a stat. You have to do lstat for -l _ to work. Similarly, -l $stat_obj should only return true if the $stat_obj was returned by File::stat::lstat. This commit adjusts the test accordingly.
* lib/File/stat.t shouldn't test -A $^XNicholas Clark2012-06-211-2/+7
| | | | | | Testing this fails intermittently on darwin, which has POSIXly-correct atime semantics. When tests run in parallel, the atime of $^X will update whenever another perl process starts, which is a race condition with this test.
* Fix File::stat's -x and -X for root for directories and executable files.Nicholas Clark2012-06-211-6/+13
| | | | | | | | | | | Previously File::stat's overloaded -x and -X operators did not give the correct results for directories or executable files when running as root. They had been treating executable permissions for root just like for any other user, performing group membership tests etc. for files not owned by root. They now follow the correct Unix behaviour - for a directory they are always true, and for a file if any of the three execute permission bits are set then they report that root can execute the file. Perl's builtin -x and -X operators, added in Perl 2, have always been correct.
* Test that File::stat exports stat by default, overriding the builtin.Nicholas Clark2012-06-211-1/+7
| | | | | Also, add a test that the array produced by File::stat::stat is identical to the list produced by the builtin.