Double definition of identifiers

Since the MinGW that comes with Perl 5.16.1 cpan installation is officially weird, I upgraded the Perl installation to use MinGW 4.6.2.

But this comes with it's own problem, today, I tried to install DB_File and I encounter this error during make process:
> dmake
C:\CPANTE~1\PERL51~1.1\site\lib\auto\MINGW-~1.2\bin\gcc.exe -c  -IC:\CPANTesters\archives\db-4.8.30-mingw32\include\db  -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT-DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T -DHASATTRIBUTE -fno-strict-aliasing -mms-bitfields -O2           -DVERSION=\"1.827\"   -DXS_VERSION=\"1.827\"  "-IC:\CPANTesters\Perl5.16.1\lib\CORE"  -D_NOT_CORE  -DmDB_Prefix_t=size_t -DmDB_Hash_t=u_int32_t version.c
In file included from C:\CPANTesters\archives\db-4.8.30-mingw32\include\db/db.h:30:0,
                 from version.c:30:
c:\cpante~1\perl51~1.1\site\lib\auto\mingw-~1.2\bin\../lib/gcc/mingw32/4.6.2/../../../../include/pthread.h:612:3: error: expected identifier before numeric constant
dmake.exe:  Error code 129, while making 'version.o'

Different View on Documentation

The actual intention behind perlybook.org was to make module documentation from CPAN more portable. Ebook-Readers today are designed for reading-pleasure everywhere - in your garden at daylight or in your bed at night... and this works so far.

But recently I noticed an effect which could also be of interest for "normal" Perl programmers who just work at a the computer and also prefer reading the docs there.

I always found it a bit complicated to read documentation on CPAN. If the author does not give a lot of love to the documentation it's even complicate to browse through all the docs of each module, since there is no auto-generated TOC over the complete distribution (only on inside each modules doc).

But there are even more issues.
See how the documentation of EBook::MOBI looks like on my screen (1920x1080):

CPAN_small.jpg

This is what you see first. It is a horrible layout, isn't it? You have so much unused space and the TOC is so big that you don't see what you are probably most interested in... a small description and the example in the SYNOPSIS.

How to surf the website with help of Perl

Hi All
How i can access a website with the help of Perl
- I am able to open the website and can enter the username and password and then log in into it
- After loginned i have to select a value from a drop down box(How Can i do that?)

Your own Task::BeLike::$AUTHOR::Favorited

Do you mark favorite distributions on metacpan.org? Do you want to be able to do:

% cpanm -n Task::BeLike::YOURCPANID::Favorited

to install all your favorite modules in one go?

If yes, install Dist::Create::TaskBeLikeFavorited to create your task distribution, then type:

% create-task-belike-favorited-dist YOURCPANID
% cd Task-BeLike-YOURCPANID-Favorited
% dzil release

You'll probably want to tweak the generated dist.ini prior to dzil release.

An example distribution created by this tool is Task-BeLike-SHARYANTO-Favorited.

You'll also want to run:

% update-task-belike-favorited-dist
% dzil release

from time to time, to update your task, if you add/remove favorites.

Have fun.

A Glimpse of YAPC::Asia Tokyo 2012

So, like my entry on YAPC::Asia Tokyo 2011 last year, I thought I'd give you guys a very brief tour of what it was like this year. Before I start, you can find the full set of photos here, and videos will be uploaded here.

Find my signature in Google NY

Find my signature in the Google NY office, tell me where it is (you're not supposed to take pictures), and I'll send you a set of my books. It's not hidden, but it's not out of place either.

You don't have to work for Google to make good on this. The same technical sourced that gave me the tour can do the same for you. Ask for for the referral and I'll tell you who you have to talk to. If you were at dinner with me and NY.pm at Wildwood, you've already met him.

Google isn't known as a big Perl user, but Google isn't really looking for skills, unlike most companies I visit. They want people who know how things work, and everything after that is just tools.

Maybe I should send Google a set of books too. In there several walls of tech books, they have the right Perl titles, just in older editions.

Stupid benchmarks and a bit of confusion

Please note: the following was done as an exercise in intellectual curiosity and not in any way an example of a real optimization. Any comments about "premature optimization" will be downvoted as soon as we get a voting system ;)

We're deep in the heart of micro-optimizing some extremely performance-intensive code when I stumbled across this:

if ( $number == -1 ) {
    # do something
}

Clearly a numeric comparison isn't expensive and I managed to find a few areas where we could improve some performance, but out of curiosity, I decided to benchmark $number == -1. The -1 is returned if a function failed (because throwing an exception would be far too expensive here) and we test for that. In reality, we only care if the number is less than 0. I was mildly curious to know if I could get a tiny performance increase in bit comparison (again, this was curiosity only. If I have to get this deep in optimization, I have more serious issues than this).

Perl 5 Porters Weekly: September 17-September 23, 2012

[ crossposted from its original blog ]

Welcome to Perl 5 Porters Weekly, a summary of the email traffic on the perl5-porters email list. Normally, I'd have a dusty thread and some "witty" banter here, but I'm just running too far behind for that this week.

Topics this week include:

  • Perl 5.17.4 is now available
  • Parrot 4.8.0 "Spix's Macaw" Released!
  • WANTED: "whole program" benchmarks
  • Changing the Perl error message when a module is not found
  • Subroutine signatures on the blog
  • Why ugly Perl is a guide for optimizing Perl

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 hosted by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.