I want Package BLOCK syntax return 1.

I want Package BLOCK syntax return 1.

package Point {
  # foo
}

I want This is interpreted as the following.

{
  package Point;

  # foo

  1;
}

In current Perl, module need to return 1 at the end of script. But this is a little strange specification. If package BLOCK syntax return 1;, we don't need to write 1; at the end of module.

Is this difficult?

Testing HTTP client code with Plack

I've been using Perl for a while now, and while much of my day job has revolved around legacy Perl, continuous development and refactoring has helped to introduce more and more modern Perl into my daily work. It was one of my more recent adventures that led me to write this, my first Perl blog post.

I'd been working on a small Plack-based application which grabs image files over HTTP for processing. To make testing easier, I'd written the class so that I could inject the HTTP client as a dependency (the default is HTTP::Tiny). But I then wondered if rather than creating a mock HTTP client for testing, it would be simpler and more effective to fire up a simple HTTP server instead. I thought I'd share my solution here because I've been so impressed with all the modules that made it (and the project as a whole) possible.

Next stable DBD::SQLite to be released in mid-December

DBD::SQLite 1.45_05 is a release candidate of the next stable DBD::SQLite. I usually wait one month for users to test, but as it includes an important security fix for PerlData virtual table, I'll release it a bit earlier than usual, in mid-December, hopefully on 10th (if there's no blocker nor request to wait). Please test it with your modules/applications and let me know if you find anything. I also strongly encourage you to upgrade DBD::SQLite to this release candidate immediately if you're using PerlData virtual table.

Other notable changes since the last stable release follow:

  • Performance enhancements introduced in SQLite 3.8.7.
  • Improved 64bit integer handling under 32bit environments.

Can you send 24 pull requests this December?

For many of us, the holiday season is approaching. The Advent calendars will be kicking off soon, which is great. If you're into blogging, I'm sure there are some calendars which may still be looking for articles. However, if you're looking to push some code, let me point out 24pullrequests.com The idea is that you send one pull request per day for 24 days.

There are two ways for you to contribute. You can sign up and start pushing code or you can suggest a project for others to create pull requests for. http://24pullrequests.com/projects/new Hey, you can probably do both. There's no commitment once you start. It's just a fun leaderboard to let you track your progress in the 24 days leading up to Christmas.

RFC Perl for education

For some time now, I have an idea of ePerl in my head. A subset of Perl or Perl in a sandbox. You might guess why? well Perl is great language, backwards compatibility makes your old code still run, even if some of the ancient designs are considered wrong nowadays. It’s all fine, except it’s not suitable for education.

In my opinion, to make Perl more acceptable in School/University curriculum we need to sell it to lazy teachers/lecturers, who need something like:

  • Current best practises upfront
  • No backwards compatibility
  • Strict, warnings, utf8 and newest Perl features on by default
  • Sub signatures and postfix dereferencing should be on and without experimental warnings
  • Most of the greatest CPAN modules should come preinstalled, and I am really talking about modules that helps beginners! i.e. Devel::REPL, Devel::DidYouMean, Moo, and many many other like Mojolicious, Dancer, Catalyst, whatever…
  • Forbid/remove special cases like split emulating awk.. or indirect object notation and many other silly leftovers
  • etc. etc.

Perl::Critic Has New Home And New Look

Perl::Critic has been improving code and irritating developers for almost 10 years! To celebrate, perlcritic.com has been moved to new hardware and completely rewritten.

The back end is now written in Modern Perl™ using Mojolicious. And the front end uses Bootstrap and jQuery to create a productive and fun user experience.

The source code is on GitHub as Perl-Critic/Perl-Critic-Jed and I welcome pull requests. If you're looking for an opportunity to contribute to a public site, this is a great place to start.

Check it out now: http://perlcritic.com

Creating Missions in Veure

Creating missions in Veure is probably the most challenging issue in the game. Not only is it technically complex, but in terms of game design, it's very easy to get wrong. If you get missions wrong, it's easy for the game to be a dud. So today I'm going to talk about how World of Warcraft got their missions (er, quests), so very wrong, yet still became the most wildly successful MMORPG of all time.

See that quest on the right? That's a level 6 quest named "A Putrid Task". All you have to do is bring seven "Putrid Claws" to Deathguard Dillinger in Brill. There is nothing challenging about this. Go out, find the claws, pick 'em up and bring 'em back. However, this is where it gets interesting. Let's jump ahead to a typical level 42 quest in World of Warcraft.

Imager::Draw::Hexagon - Draw hexes easily using Imager - metacpan.org

Imager::Draw::Hexagon - Draw hexes easily using Imager - metacpan.org :

After I gave my Tour of Imager talk last week I ended up releasing my own Imager module: Imager::Draw::Hexagon. It allows you to easily calculate the points of a hexagon of any size and draw it or outline it into your image. 

[From my blog.]

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.