user-pic

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

  • 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

  • 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.)

  • Mike Doherty commented on Why you don't need File::Slurp…

    Would you benchmark this method of slurping, which is what I typically see?

    my $contents = do { local $/; open my $in, '<', $filename; <$in> };

    Might be worth adding to https://github.com/melo/perl-benchmarks

  • Damien "dams" Krotkine commented on Why you don't need File::Slurp&#x2026;

    I like to use this for non production code :)

    my $content = do{local(@ARGV,$/)=$filename;<>};

    I don't think it's useful to benchmark it :)

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 with a graphic design donated by Six Apart, Ltd.