Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^2: RFC - File::Util 4.x Series Pre-Release

by Tommy (Chaplain)
on Jan 31, 2013 at 00:37 UTC ( #1016187=note: print w/replies, xml ) Need Help??

in reply to Re: RFC - File::Util 4.x Series Pre-Release
in thread RFC - File::Util 4.x Series Pre-Release

Brilliant, vsespb. Thank you for all your points! I'll respond below...

point #1 - I've never encountered a situation where someone needed classic macos support, but I tried to support it anyway.

point #2 - I've been considering lifting the minimum Perl to 5.6. Thoughts?

point #3 - still thinking about that one

point #4 - in addition to claiming to be cross platform, File::Util guides you to use filenames and characters that can port between FAT32, EXT2 and upwards. Is it bad to enforce that? Hmmm. Nobody ever brought it up before. This could become much more complicated if I get unicode involved --- or --- I could just not attempt to trap nasty characters. The entire point of trying to do so was to make sure nobody tried to name a file with an embedded directory separator in it. It grew out from there (by request, from people who wanted me to trap *potential* dangers and provide diagnostic and "helpful" error messages.) Perhaps it's time to leave that behind...

point #5 - Agree to disagree there. While I personally can relate to what you're saying, I've had a lot of people ask for methods that are "easier to remember" than -X. For the sake of those people, those methods will remain.

point #6 - Yes, they are sorted a la sort { $a cmp $b } OR sort { uc $a cmp uc $b } depending on what was requested by the caller. That's "asciibetical" sorting for the most part. I should either advertise that up front, or use a unicode sorting mechanism. I wonder if the latter is overkill.

point #7 - I haven't written a way to detect looping symlinks, so I don't follow them in the code. It could be an option, but I'd have to keep track of actual inodes I think (lstat). Is there a preferred way to do this without memory bloat and performance degredation while constantly adding to and comparing entries in the %inodes_seen lookup table?

point #8 - That very well may be deprecated and silently removed from the documentation. On the backend, everything is done with syswrite anyway, for THAT EXACT reason.

point #9 - same reasoning and response as point #4. Open to suggestions and criticisms on this.

A mistake can be valuable or costly, depending on how faithfully you pursue correction

Replies are listed 'Best First'.
Re^3: RFC - File::Util 4.x Series Pre-Release
by vsespb (Chaplain) on Jan 31, 2013 at 10:19 UTC
    > point #2 
    It was about unicodel. I think think that proper unicode support will require 5.8.. No other objections about version.
    > point #4
    It's pretty uncommon to _escape_ illegal characters to make filenames portable. I think better deny it. Btw here is what Dropbox thinks about filename portability
    > point #7
    yep, that's the thing. when one provide method to traverse directory, it usually have option to follow symlinks (with this option on it takes much more memory) OR at least
    this method should not hang - it should detect symlinks to stop crawling it
Re^3: RFC - File::Util 4.x Series Pre-Release
by Argel (Prior) on Jan 31, 2013 at 19:28 UTC
    Why 5.6 or even older versions? Are you supporting legacy systems? Unicode support seems far more important these days.

    Elda Taluta; Sarks Sark; Ark Arks
    My deviantART gallery

      Well. I'm getting a big indication that Unicode is a priority, moreso than back compat. This has got my head buzzing with ideas... such as detecting old Perls and conditionally enabling Unicode if the Perl is new enough. I just don't know if it can be done at runtime -- haven't tried it yet. Seems like an unwise strategy.

      I may just throw down the guantlet and support Unicode, requiring 5.8 from now on... after all, that's what Perl did. If you don't like it, you can always go get an older version, right?

      A mistake can be valuable or costly, depending on how faithfully you pursue correction

        Be warned, that is a big ask and a very big task to do portably.

        Perl really doesn't have any built-in facilities to deal with Unicode paths on Windows.

        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1016187]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2018-06-21 15:13 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (118 votes). Check out past polls.