Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Alias (5735)

Alias
  (email not shown publicly)
http://ali.as/

Journal of Alias (5735)

Monday October 23, 2006
07:26 AM

File::Remove 0.32_01: Testers wanted

[ #31390 ]

I've just uploaded my first devel release after taking over maintenance of File::Remove.

This release now allows remove to delete read-only files within a recursive delete if the user has permissions control and can set a file back to writeable (and I've added tests for this behaviour).

I've also done a variety of house cleaning tasks, using File::Spec a bit better, and adding some common sense special cases, such as remove saying it has deleted a path, if the path passed to it didn't exist anyway.

This version should now also work on Perl versions before 5.6.

Since a hell of a lot of modules sit on top of File::Remove, I'd appreciate it if people could test it for me, particularly if you have exotic or unusual hardware, or really old Perl versions.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • From the documentation:

    Removes files and directories. Directories are removed recursively like in rm -rf if the first argument is a reference to a scalar that evaluates to true. If the first arguemnt is a reference to a scalar then it is used as the value of the recursive flag. By default it's false so only pass \1 to it.

    Lovely, a magical first value of \1. That must make for some scores of very sad maintainance programmers.

    I've never used File::Remove, and after seeing this, I doubt I ever will.

    • Indeed, I hate it... but hey it works and it's very common.

      I would like to have a go at another module though at some point (although I doubt very much that will happen) that would be a safer delete.

      Prescan the tree and work out if you SHOULD be able to delete it, then do it seperately.