user-pic

Joel Berger

  • Website: github.com/jberger
  • About: As I delve into the deeper Perl magic I like to share what I can.
Subscribe to feed Recent Actions from Joel Berger

  • Alberto Simões commented on Term::ReadLine::Gnu Unicode Hell

    Hmms, is there a difference? It seems I have to RTFM. Will say something soon. Thanks.

  • Alberto Simões commented on Term::ReadLine::Gnu Unicode Hell

    I confess I did not notice the difference when looking to the manpage. I though they were just aliases (similar names). But of course, it was my mistake.

    Nevertheless, still not that good:

    my $newGloss = $self->{term}->readline(">> ", decode("utf-8", $gloss->{gloss}));
    if (length($newGloss) && $newGloss ne $gloss->{gloss}) {
    chomp($newGloss);
    my $x = decode("utf-8", $newGloss);
    my $ans = $self->post("gloss/$offset", gloss => $x);

    But got simpler, yes.
    Next, try to figure out if I am using post_form fro…

  • Alberto Simões commented on Term::ReadLine::Gnu Unicode Hell

    And yes, the comparison works well with $newGloss. But the post needs to be decoded first...

  • brian d foy commented on A quick static file webserver

    The render_static was deprecated in the middle of the Mojolicious 5 evolution and is now reply->static:

    #!/usr/bin/env perl
    
    use Mojolicious::Lite;
    
    use Cwd;
    app->static->paths->[0] = getcwd;
    
    any '/' => sub {
      shift->reply->static('index.html');
    };
    
    app->start;
    
  • https://www.google.com/accounts/o8/id?id=AItOawlsH6xT98cO8R6i25T3JKnyf3im9QgVvvA commented on An example using Mojo::DOM for rewriting HTML

    Hi, I’m curious about Mojo:Dom. Let’s say you want a generic method of traversing a page, and returning a hash of headers and related sub headings and text from a page using Mojo::Dom. The sub text may not necessarily be a descendant of the heading and from what I can tell, mojo::dom can only descend not ascend. How does one construct this? I’ve read the docs and tried a number of things but I’m not getting far :(

Subscribe to feed Responses to Comments from Joel Berger

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.