user-pic

Helmut Wollmersdorfer

  • About: I blog about Perl.
  • Commented on Entering MooseX, XXIV Well Now Lets See
    Have a look at Dist::Milla by Miyagawa San....
  • Commented on And Now for Something Not Moose Releated
    Crappy MT ... $count++ while(<$filehandle>)...
  • Commented on And Now for Something Not Moose Releated
    @dolmen: Your code filters away filenames beginning with '.'. I tried $count++ while() against 'wc -l'. On a file with 3 mio. lines it's 0.466s versus 0.087s on a Mac Air, but on a small file with 6 lines it's...
  • Commented on And Now for Something Not Moose Releated
    As a oneliner: $ perl -e 'print join("\t",(map{`wc -l $_`} grep{-f}map{chomp;$_}(`ls -1t`))[0]=~/(\S+)/g),"\n";' 6 title_12_1832.txt As script-snippet: my $dir = "."; my ($lines,$file) = ( map { `wc -l $_` } grep { -f "$dir/$_" } map { chomp; $_ }...
  • Commented on WTF: $Test::Builder::Level is invalid
    Who is the someone using Test::Pretty? Ron, how are you starting your tests?...
  • Commented on WTF: $Test::Builder::Level is invalid
    It's Test::Pretty with Test::Version in combination which is broken. This is reproducable....
  • Commented on WTF: $Test::Builder::Level is invalid
    You already tried hard to locate or isolate the problem? What exactly are you doing? Test::Pretty also exists as App::Prove::Plugin, thus can come via prove (.proverc, ENV, -Pretty ...)....
  • Commented on Spelunking: why 'while(){ }' is my new favorite perl-ism
    until(){} gives a syntax error. I wonder if Larry intended to imitate the behaviour of another language. Or if this is Larryish syntactic sugar. Or a bug....
  • Commented on Spelunking: why 'while(){ }' is my new favorite perl-ism
    As if () {} gives a syntax error, there must be a bug in while or if, or the docs are wrong. Compare this: $ perl -e '$c = () ? 1 : 2;print $c,"\n";' 2 From the docs I...
  • Commented on One package perl pm file
    Tricky hiding things from a not-so-smart parser isn't a good solution. Yes, it should be a CPANTS/Kwalitee metric. It compares to use strict, where also are good reasons in some cases for no strict....
  • Commented on One package perl pm file
    I would not go so far that this is a bug, but it is not best practice, not straight ahead design. Tie::Handle seems repaired in a backwards compatible way. Why not the other Tie::* ones?...
  • Commented on One package perl pm file
    Is there an important reason, why Tie::* does not have its own source distribution?...
  • Commented on Detecting JSON/YAML/Perl/CSV/TSV/LTSV
    Just a test, if posting works....
  • Commented on Detecting JSON/YAML/Perl/CSV/TSV/LTSV
    You can see it as a classification problem and try feature detection. A feature can be a matching pattern, e.g. reserved words: my $patterns = { 'true' => qr/ \b true \b /xms, 'false' => qr/ \b false \b /xms,...
  • Commented on Does it Really only take a min?
    I tried on my server with 1 gbit connection: Install Debian package Mojolicious (no tests): 8.321 seconds The latest and gratest Mojoliciuos via cpanm: 38.687 seconds Install DBIx::Class via cpanm: 4m32.159s....
  • Commented on Blast From the Past
    This blog-software is really crap....
  • Commented on Blast From the Past
    For the avoidance of doubt: Mojo::Template can be used standalone and is not restricted to HTML: # perl -e 'use Mojo::Template;my $o = Mojo::Template->new->render("1+1 = ");print $o;' 1+1 = 2...
  • Commented on Blast From the Past
    You forgot Mason which IMHO has still a large community. The embedded Perl of Mason uses a syntax which is very similar to Mojo embedded Perl. I do not understand why you believe that "Mojolicious breaks CPAN". You can use...
  • Commented on Moose Dying With "Invalid version format (version required)"
    To catch more of such problems earlier it would be nice to have (and run) something like: Test::DependentModules->minimaltocurrent_version() Test::WithRequiredModules->minimaltocurrent_version() It would help to set 'x_breaks' announced by ETHER. Also helps to downgrade required versions numbers to avoid dependency 'bleed and...
  • Commented on I hate Dist::Zilla and missing Makefile.PL
    Yep. That's why I stopped contributing to padre after two days wasting my time to distzilla caused problems. I just wanted to debug some broken plugins, which was not possible by the usual build test, or direct execution of t/some.t...
  • Commented on Showing Hidden Files on OS X and Time Machine
    I always have ShowAllFiles on, because I need to see and edit .git .gitignore .htaccess .perlcriticrc .perltidyrc and others. Also I want to see the crap which OSX, Windows and (most) Linux desktop environments (DE) leave in directories. It's a...
  • Commented on CPAN modules for converting markdown to HTML
    Thanks for these reviews. What I would also like to see in a comparison is the amount of code (verbosity, complexity) necessary for the examples. Maybe this needs some trials which measure out of - lines of code - keystrokes,...
  • Commented on Galileo CMS
    I like Galileo because it's very well designed and clearly coded. But as an CMS for real world sites it's too limited: - use of web sockets limits it to modern browsers - only flat menu structure...
  • Commented on CPAN candidates for adoption
    Nice work. IMHO the scoring should be improved. The current scoring does not score high, if - the author releases cosmetic changes - the author maintains many packages - the module has no dependents - the module has a small...
  • Commented on ruby vs perl / github cannot use utf8
    In Perl it is also possible to use the range above 0x10FFFF. This feature was re-enabled with Perl 5.14 (or 5.16?). Many editors have also the restriction of an 16 bit internal representation. So, sometimes it's hard to create test...
  • 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...
  • Commented on Unicode is 20++ years old and still a problem
    It's File::Find which does not use char-mode. There is nothing wrong with Text::CSV::Slurp....
  • Posted Unicode is 20++ years old and still a problem to Helmut Wollmersdorfer

    Just did a quick hack to read out product data from an old shop site and import it into a new one:

    - wget -r
    - File::Find
    - Mojo::Dom for parsing
    - Text::CSV::Slurp for the result

    After 11 minutes running for 14 K pages I experienced the bad surprise:

    One …

Subscribe to feed Recent Actions from Helmut Wollmersdorfer

  • Andrew Rodland commented on Spelunking: why 'while(){ }' is my new favorite perl-ism

    (And the commits from ??? until 2008 are real enough, but they were originally done in Perforce, of all things, and imported into git in 2008, when the git became the master repo.)

  • rns commented on WTF: $Test::Builder::Level is invalid

    Not sure if that applies, but at least it looks suspiciously.

    Just saw [2] and [1] (which has to do with $Test::Builder::Level).

    [2] says: "CPAN test modules might — in their own tests — be looking for specific output and start breaking. Such tests are inherently fragile, and should be changed to use a TAP parser instead of parsing literal text, but in the meantime, if your favorite test class fails its tests, this Test::More change might be the reason."

    [1] https://github.com/Test-More/test-more/pull…

  • Ron Savage commented on WTF: $Test::Builder::Level is invalid

    $many x $thanx for the replies.

    For each of my 8 modules which use Marpa::R2, I do:

    local $CWD = $dir_name;
    ($stdout, $stderr) = capture{system 'prove', 't'};

    Then I parse the output with:

    if ($line =~ /^Files=.+Tests=(\d+),/)

    Looking for a line like:

    Files=3, Tests=88, 2 wallclock secs ( 0.04 usr 0.02 sys + 2.15 cusr 0.04 csys = 2.25 CPU)

    And no, this is not the problem :-).

    The first module, Graph::Easy::Marpa, works. It does not use Test::Version. All its tests use Test::More.

    The second module, Gra…

  • Ether commented on WTF: $Test::Builder::Level is invalid


    For each of my 8 modules which use Marpa::R2, I do:

    local $CWD = $dir_name;
    ($stdout, $stderr) = capture{system 'prove', 't'};

    Then I parse the output with:

    if ($line =~ /^Files=.+Tests=(\d+),/)

    Looking for a line like:

    Files=3, Tests=88, 2 wallclock secs ( 0.04 usr 0.02 sys + 2.15 cusr 0.04 csys = 2.25 CPU)

    Please for the love of all kittens, use Test::Harness to run your tests and
    then ask it for the result, rather than manually parsing the text output.

  • Randal L. Schwartz commented on Spelunking: why 'while(){ }' is my new favorite perl-ism

    Well, they're real git commits, for sure. But they are cloned from all the things that preceded git for Perl's version control by an immense effort to accurate capture as much of Perl history as was now possible.

Subscribe to feed Responses to Comments from Helmut Wollmersdorfer

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.