• Posted Seamless Proxy Auto-Config for CLI apps to stas

    Suppose you are in a corporate network environment and often times find yourself manually setting/unsetting the HTTP_PROXY environment variable in order to access different hosts (for instance, "yay proxy" for the external hosts and "nay proxy" for the internal…

  • Commented on Web Scraping with Modern Perl (Part 1)
    Thanks a lot for figuring this out, Scott! I've already fixed the gist....
  • Posted YAPC::EU 2013 afterimage to stas

    This was the biggest Perl event I've attended so far. Also, it was the first one I've attended outside of Brazil. And I'm happy to see that there is so many people in Ukraine who are passionate about Perl! So, listing some of my impressions below.

  • Commented on Ludic Perl
    Thanks Toby! This also reminded me of Perl Top Users @ Stack Overflow....
  • Posted Ludic Perl to stas

    Yep, indeed, contributing to the Perl community can be a very ludic activity (not to be confused with luddite!). I tried to list every Perl-related web resource where participants are…

  • Posted Web Scraping with Modern Perl (Part 2 - Speed Edition) to stas


    Grab the gist with the complete, working source code. Benchmark it against the one featured on the ="…

  • Commented on Put a fancy CPU/RAM usage chart in tmux status bar
    Thanks, Sawyer X! BTW, rainbarf is on the CPAN now, right where it belongs:
  • Posted Put a fancy CPU/RAM usage chart in tmux status bar to stas


    So, once upon a time I had a crazy idea: to put an almost complete resource meter into the tmux status bar. You know, the clock is so boring. Let's add a battery indicator there. And the load numbers. And the memory usage...


  • Posted Web Scraping with Modern Perl (Part 1) to stas


    Grab the gist with the complete, working source code.

    I often hear the question: "so, you're Perl guy, could you show me how to make a web crawler/spider/scraper, then?" I hope this post series will become my ultimate a…

  • Posted Merry XS-mas! to stas

    Some time ago, I've acknowledged the LWP::Protocol::Net::Curl existence here. Lots of things

  • Commented on cpantimes
    Great job! My two cents: the non-verbosity of cpantimes make it hard to figure out if it is actually working, so I'd mention as a debug aid....
  • Commented on CPAN module recommendation system
    Thanks for your comments :) @Olaf: I'll have to polish API/JS side a bit before tweaking MetaCPAN. Querying module recommendations from MetaCPAN will add an unique feature: the per-module recommendations will take into account logged user's favorites/dependencies. So, every user...
  • Posted CPAN module recommendation system to stas

    A little confession/reasoning/backstory: I love CPAN surfing. You know, watching the latest releases, browsing module dependencies and other modules by the same authors... And favoriting the interesting stuff. Stats show that I'm…

  • Commented on Categorizing CPAN modules
    Thanks for raising an issue, Steven! Your post made me unbox and polish a toy project of mine which envolves tapping into the collective wisdom of Perl community: CPAN::U is a collaborative filter based recommendation system for Perl developers. It...
  • Commented on TMTOWTDI, plus benchmarking
    Awesome :D I hope you plan to release this code as Sort::Key::Top::PP and/or integrate it into Sort::Key::Top as a fallback when compiler is unavailable....
  • Commented on TMTOWTDI, plus benchmarking
    Did it using binary search (code stolen from List::BinarySearch): pureperl3 => sub { my @top; for my $word (keys %words) { if (@top $words{$top[0]}) { unless (@top) { @top = ($word); } else { my ($low, $high) = (0, scalar...
  • Commented on TMTOWTDI, plus benchmarking
    Excellent point! I've forgot completely to point that both quickselect and selection-by-sorting algorithms execute in a linear time. So, the quickselect/quicksort performance ratio of 10x will be the same while selecting 10 or 1000 elements. I am not good at...
  • Posted TMTOWTDI, plus benchmarking to stas

    There's a very common Perl idiom for getting "top N elements" from an array: @top = (sort @a) [0 .. $n - 1]. Mostly, it's good enough for anything one would dare to store in RAM.

    Then, there is Sort::Key:…

  • Posted Google Refine + Perl to stas

    Google Refine is awesome. If you're unaware of what it is, access their official page an…

  • Commented on libcurl as LWP backend (or "all your protocol are belong to us")
    In a few keystrokes: use LWP::Protocol::Net::Curl sslversion => 3;. 3 means to force SSLv3, while 1 means TLSv1. However, the right way of doing this would be use Net::Curl::Easy qw(:constants); and then accessing the constants CURL_SSLVERSION_TLSv1 or CURL_SSLVERSION_SSLv3. Check
  • Posted libcurl as LWP backend (or "all your protocol are belong to us") to stas

    Suppose you are planning to scrap a few thousands of pages using WWW::Mechanize.

    Over HTTPS. Via SOCKS5 tunnel. On an aged CentOS box (think Perl v5.8). With no root privileges. Bonus points if it uses HTTP compression. Better prepare for some serious yak shaving.

    If only WWW::Mech…

  • Commented on HTML-Tree 5: Now with weakref support
    What do you think about ? :)...
Subscribe to feed Recent Actions from stas

  • Toby Inkster commented on cpantimes

    If there's an error sending a report, then you should get a stack trace dumped to STDERR.

    It would be nice to also mention successfully sending a report. They annoying thing is that the test is run after cpanminus has printed "Building and testing $dist ..." but before it prints "OK\n". So if I want cpantimes to print anything, it needs to be between them. :-(

    Ideas for a good way to proceed would be welcome.

  • Hercynium commented on cpantimes

    This is really great!

    Since cpanminus, one of the few reasons I still use at all is to send test reports for dists that unexpectedly fail.

    Have you checked with miyagawa on getting this functionality into cpanm? Perhaps as a plugin? (I remember that cpanm was going to support plugins at one point but it looks like those plans were put aside some time ago)

  • Ether commented on cpantimes
    It would be nice to also mention successfully sending a report.

    It would be *very* useful indeed to print the URL of the submitted report.

  • commented on Put a fancy CPU/RAM usage chart in tmux status bar

    I can't get the bars to show up like you have (

    I am using OSX, iTerm2, Solarized, and tried terminus, but it still donesnt work.

  • commented on Web Scraping with Modern Perl (Part 1)

    Hey Great tutorial. thx.
    So let's say I want to access the dom for each page that's traversed? How do I do that? Also what is
    push @urls, $link;
    doing in parse_html, it doesn't seem to do anything (at least I can comment it out and it makes no difference).

Subscribe to feed Responses to Comments from stas

About is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.