CPAN

Perlbuzz news roundup for 2012-04-30

April 30, 2012 Code craft, CPAN, Perl 5 No comments

These links are collected from the
Perlbuzz Twitter feed.
If you have suggestions for news bits, please mail me at
andy@perlbuzz.com.

  • In case you have a burning need to use ಠ_ಠ for warnings/errors: (metacpan.org)
  • Expanded the “More Tools” page of the ack website: (betterthangrep.com) Help your users by including alternatives for them to choose from!
  • YAPC::NA is NOT sold out. Still 30 tickets left. Sign up now! (blog.yapcna.org)
  • Before you send a patch, send an email (petdance.com)
  • For want of a newline (blogs.perl.org)
  • Use the command “perldoc -q whatever” to search the Perl FAQ for “whatever”
  • Perl 5.16.0 is coming soon, probably early May (rjbs.manxome.org)
  • Regexp::Common has regexes for just about everything. Check there first. (search.cpan.org)
  • Is Try::Tiny still the best choice for exception handling? (stackoverflow.com)
  • Using named regexes in ack output (stackoverflow.com)
  • Automating gov’t websites w/WWW::Mechanize + HTML::DOM (blogs.perl.org)
  • Using Moose’s “lazy” attribute for caching (blogs.perl.org)

Perlbuzz news roundup for 2012-04-23

April 23, 2012 Code craft, CPAN, Perl 5 No comments

These links are collected from the
Perlbuzz Twitter feed.
If you have suggestions for news bits, please mail me at
andy@perlbuzz.com.

Perlbuzz news roundup for 2012-04-16

April 16, 2012 Community, CPAN, Perl 5 No comments

These links are collected from the
Perlbuzz Twitter feed.
If you have suggestions for news bits, please mail me at
andy@perlbuzz.com.

  • K=R=P (Kindness = Repeat business = Profit) says @tom_peters. I say that for open source, K=U=G+S, Kindness = Users = Growth+Success.
  • You probably don’t want to be using use_ok() (modernperlbooks.com)
  • Interpolate, concatenate or join? (perlmonks.org)
  • Quick-n-dirty tool to send messages to HipChat (blogs.perl.org)
  • Painless RSS processing with Mojo (blogs.perl.org)
  • RT @chromatic_x If you use SQLite for your CPAN distribution’s tests, consider an in-memory database. Helps parallelism/Reduces disk IO.
  • Explaining web programming via Plack (blogs.perl.org)
  • Common Perl pitfalls (perlmonks.org)
  • Test::WWW::Mechanize adds scraping functions (perlbuzz.com)

Test::WWW::Mechanize adds scraping functions

April 13, 2012 CPAN No comments

The new 1.40 release of Test::WWW::Mechanize adds functions to help scrape text from your HTML as you test it. This should make things much easier for your integration test of your web apps.

For example, if you want to make sure that this shows up:


<h1>My awesome page!</h1>

then you can add an id attribute to the <h1>


<h1 id="pagetitle">My awesome page!</h1>

and your test can check for it:


$mech->scraped_id_is( 'pagetitle', 'My Awesome Page!' );

Two other functions are added to help in your text extraction: ->scrape_text_by_id() and ->scrape_text_by_attr().

Will these functions help your testing? Do you have other methods that you use to aid testing? As always, I welcome your feedback.

Perlbuzz news roundup for 2012-04-09

April 9, 2012 Code craft, Community, CPAN, Perl 5, Perl 6 No comments

These links are collected from the
Perlbuzz Twitter feed.
If you have suggestions for news bits, please mail me at
andy@perlbuzz.com.

  • The Perl Unicode cookbook (perl.com)
  • bdfoy’s got some ideas for code (blogs.perl.org)
  • How @rjbs spent his Perl QA Hackathon (rjbs.manxome.org)
  • The homepage for ack is completely redesigned. Hooray for open source, making up for my lack of design skillz. (betterthangrep.com)
  • Tricks to compiling mod_perl 2 to OS X Lion (blogs.perl.org)
  • Have you seen perl-reversion? (blogs.perl.org)
  • Using WWW::Mechanize and mech-dump to get my scratchy 45s (perlbuzz.com)
  • DBD::Firebird releases v1.0 (firebirdnews.org)
  • Recap of the Perl QA Hackathon (dagolden.com)
  • Reading about what people are working on = happy. (blogs.perl.org)
  • Whatever task you have, it’s probably already on CPAN (blogs.perl.org)
  • The Perl Foundation wants to give you money to work on Perl (news.perlfoundation.org)
  • More niche modules, “incredibly useful for about 5 people on earth”: (github.com)
  • Did you know prove has –shuffle to run tests in random order? Has randomizing tests uncovered bugs for you?
  • MetaCPAN has a new logo (perlnews.org)
  • RT @dukeleto This is a huge step forward in #perl dependency management: “carton bundle” support! (github.com)
  • RT @aaronlerch Some devs think “I’ll just copy and paste this code block.” Now you have two problems. Now you have two problems.
  • Would love to see this Perl::Critic talk (blogs.perl.org)
  • “The Python site talks about the value the reader gets out of Python, while the Perl site talks about Perl” (modernperlbooks.com)
  • How to get ahead in open source: Wear sunscreen. (blog.nerdchic.net)
  • Help Open Source Bridge select session proposals (plus.google.com)
  • MetaCPAN at the QA hackathon (blogs.perl.org)
  • Perl Foundation helps fund critical Perl 5 dev (news.perlfoundation.org)

Perlbuzz news roundup for 2012-04-02

April 2, 2012 CPAN, Perl 5 No comments

These links are collected from the
Perlbuzz Twitter feed.
If you have suggestions for news bits, please mail me at
andy@perlbuzz.com.

  • “The measure of a civilization is how it treats its weakest members.” So too it is with how an open source project treats its newbies.
  • A recap of the Israeli Perl Workshop 2012 (blogs.perl.org)
  • Who is a contributor to Perl? (perlmonks.org)
  • RT @OvidPerl Perl version 5.15.9 has 521,047 tests all of which just passed. #software #testing #tdd #perl
  • Perl-based search engine DuckDuckGo is taking off: (duckduckgo.com)
  • Discounts on bulk orders of Modern Perl for user groups (modernperlbooks.com)
  • New beta version of HTML::Lint validates HTML entities (perlbuzz.com)
  • The two most premature optimizations: Optimization of non-working code, and of unmeasured code. (perlmonks.org)
  • Devel::Cover reports in vim (blogs.perl.org)
  • Syntax coloring in the debugger (blogs.perl.org)
  • How to install BerkeleyDB (blogs.perl.org)
  • What I learned teaching Perl for advocacy (blogs.perl.org)

New version of HTML::Lint validates HTML entities

March 29, 2012 Code craft, CPAN, Perl 5 1 comment

I’ve released a beta of the new version of HTML::Lint, version 2.11_01. (At the time of this writing, this 2.11_01 release has not reached its search.cpan.org page yet) This version adds HTML entity checking to the tag checking that HTML::Lint has done since the dawn of time. If you’re already using HTML::Lint, please help test this beta version!

Entity checking can be a messy business, but can be invaluable for finding little mistakes, especially in static HTML pages sent to you from other sources. For example, if I have this HTML file, filled with HTML entities and ampersands and all sorts of potential problems, HTML::Lint sniffs out the problems and reports them:

<html>
<head>
<title>Ace of &spades;: A tribute to Mot&oumlrhead. ® &metalhorns;</title>
<script>
function foo() {
if ( 6 == 9 && 25 == 6 ) {
x = 14;
}
}
</script>
</head>
<body bgcolor="white">
<p>
Thanks for visiting Ace of ♠
<!-- Numeric version of &spades; -->
<p>
Ace of ♠ is your single source for
everything related to Mot&ouml;rhead.
<p>
Here's an icon of my girlfriend Jenny: &#8675309;
<!-- invalid because we cap at 65536 -->
<p>
And here's an icon of a deceased cow: &#xdeadbeef;
<!-- Invalid because we cap at xFFFF -->
<p>
Another <i>deceased cow: &xdeadbeef;
<!-- Not a valid hex entity, but unknown to our lookup tables -->
<p>
Here's an awesome link to
<!-- here comes the ampersand in the YouTube URL! -->
<a href="http://www.youtube.com/watch?v=8yLhA0ROGi4&feature=related">"You Better Swim"</a>
from the SpongeBob movie.
<!--
Here in the safety of comments, we can put whatever &invalid; and &malformed entities we want, &
nobody can stop us.  Except maybe Cheech & Chong.
-->
</body>
</html>
$ weblint motorhead.html
motorhead.html (3:9) Entity &ouml; is missing its closing semicolon
motorhead.html (3:9) Entity &oumlrhead. ® is unknown
motorhead.html (3:9) Entity &metalhorns; is unknown
motorhead.html (17:9) Entity &#8675309; is invalid
motorhead.html (19:9) Entity &#xdeadbeef; is invalid
motorhead.html (22:17) Entity &xdeadbeef; is unknown
motorhead.html (31:5) <i> at (22:17) is never closed

That last error about the unclosed <i> tag has always been part of HTML::Lint, but all the others are new with this version of HTML::Lint.

The HTML-Lint distribution includes the HTML::Lint module, which is object based for easy handling, and also includes Test::HTML::Lint so that you can add HTML validation to your test suites.

my $html = $app->generate_home_page();
html_ok( $html, 'Home page is valid HTML' );

If you’re not doing any validation of your HTML in your apps, I suggest you give HTML::Lint a try.

Perlbuzz news roundup for 2012-03-26

March 26, 2012 CPAN, Perl 5 No comments

These links are collected from the
Perlbuzz Twitter feed.
If you have suggestions for news bits, please mail me at
andy@perlbuzz.com.

Perlbuzz news roundup for 2012-03-20

March 20, 2012 CPAN No comments

These links are collected from the
Perlbuzz Twitter feed.
If you have suggestions for news bits, please mail me at
andy@perlbuzz.com.

Perlbuzz news roundup for 2012-03-12

March 12, 2012 Code craft, CPAN, Perl 5 No comments

These links are collected from the
Perlbuzz Twitter feed.
If you have suggestions for news bits, please mail me at
andy@perlbuzz.com.