user-pic

https://www.google.com/accounts/o8/id?id=AItOawlKCInGw3AtPhoc4NBTcIFE1ggZxSjXMXY

  • About: I blog about Perl.
  • Commented on Unicode is 20++ years old and still a problem
    You can workaround and find any file with File::Find. Just convert file/dir names to/from bytes before/after passing to file::find....
  • Commented on I love pre-modern Perl and so should you, my introduction
    @David, I totally agree, I use core-only functions/modules and trying avoid adding extra dependencies without very, very good reason. And it works perfectly. Second language, that I use is Ruby (with Rails), so I know what Moo* and other modern...
  • Commented on Why you don't need File::Slurp…
    There's a flaw IMHO, read() may not return the whole file content (and actually it won't with large files), depends on OS buffering. The usual boilerplate includes a while() and buffer concatenation. AFAIK, sysread() might return partial data. But...
Subscribe to feed Recent Actions from https://www.google.com/accounts/o8/id?id=AItOawlKCInGw3AtPhoc4NBTcIFE1ggZxSjXMXY

  • xdg commented on Unicode is 20++ years old and still a problem

    How is File::Find supposed to know how file names are encoded on your particular filesystem? (Hint: not all filesystems store names as UTF-8 Unicode.)

    That said, I don't see what Text::CSV::Slurp is doing to filenames that would cause a problem. If it gets octets from File::Find, it looks like it's passing them right back to an open call.

    It's not opening files in UTF-8 mode, but that's sort of a separate problem.

  • Helmut Wollmersdorfer commented on Unicode is 20++ years old and still a problem

    How is File::Find supposed to know how file names are encoded on your particular filesystem?

    File::Find could guess the encoding via e.g. Encode::Locale with an accuracy of 99.99%. Of course the sanity must be checked during decoding, because Posix handles only bytes.

    Each module importing strings from an external representation should take care of the correct decoding, or as a minimum should document and warn about its limitations.

    That said, I don't see what Text::CSV::Slurp is doing to filenames that would cause a problem.

    I used Text::CSV::Slurp only to s…

  • Zak B. Elep commented on I love pre-modern Perl and so should you, my introduction

    This evokes a comment in the Camel book I've read years ago: you could be speaking baby perl or modern/advanced perl, but in the end you're still speaking perl. I think the modern perl "movement" isn't so much a movement to change the way we use perl but rather the way we think with perl. Like natural language, perl isn't so big on syntax or language extension, but on nuance and overall "whipupititude" on solving the problems concerned; the way solutions have been thought may have changed, but the way we express it in the language we love is largely unchanged.

  • vsespb commented on Unicode is 20++ years old and still a problem

    > File::Find could guess the encoding via e.g. Encode::Locale with an accuracy of 99.99%.

    So you want it to be broken by design, and write/read garbage from filesystems in some cases?
    Filesystem encodings never should not be detected with locale !
    Your proposed design leads to data loss.

  • Toby Inkster commented on I love pre-modern Perl and so should you, my introduction

    If it's a daemon, expected to run for days (or weeks, or months, or even years), then a 3-5 second start up time is hardly much of a penalty to pay. In fact, 30-50 seconds would probably be tolerable. (And still faster than Tomcat!)

    Moose takes a while to get started, but once it's running it tends to be very fast and pretty solid. (Much like an actual moose.)

    Moose's constructors and accessors are generally faster than any you'd write by hand. (Mouse's even more so, thanks to lots of crazy XS.)

Subscribe to feed Responses to Comments from https://www.google.com/accounts/o8/id?id=AItOawlKCInGw3AtPhoc4NBTcIFE1ggZxSjXMXY

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is run by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.