Friday, January 9, 2015

How to make your first contribution to CPAN - the first steps

The first thing we want to try to do is to make a small change to an existing module.

If you already know what you'd like to contribue, that is good. If not, you may be able to find ideas at

I was assigned to the DateTime::Format::Pg module.

On the MetaCPAN page, I see that the code is hosted on github at

The first step is to follow the instructions at and to get a copy of the code on your box.

Next, we need to run the tests, and make sure they pass. We also need to check that all the dependencies for this module are installed. We do this in different ways depending on which build system the module uses. If we find a Build.PL in the module, then we use

perl Build.PL
./Build test

If we find a Makefile.PL, then we do
perl Makefile.PL
make test

If we find a dist.ini, then we first have to make sure we have Dist::Zilla installed. Then we run

dzil test

If we want to run only the tests, but we have the module already installed, then the tests will use that module and not the code that we pulled from github. To make sure we run the tests on our code, we use the -Ilib switch.

prove -Ilib t/*

If you get all your tests passing, you can start adding more tests to this module and then change the code as you see fit.

If you're stuck at any stage, jump onto #pr-challenge on, and ask for help. You will find some very helpful people there.

Friday, September 26, 2014

Jumping to conclusions

"The fake tree is dying. The leaves are falling off."
"Quick. Glue it back on."
"Wow. He knows the secret of bringing dead things to life."

English is a strange language

"Where's Philip?"
"In his room."
"How is he?"
"What's he doing"
"With whom?"
"Stupid, I said knackered. Not naked!"

Wednesday, June 25, 2014

Friendly Tech Support

"Can you please stop the rain?"
"Sure, what time would you like me to turn it off?"
"I was planning to go home at 4,  could you please turn it off from 4 to 4:15?"
"OK, Let me login to the server."
"The cloud server?"

Saturday, June 21, 2014


You do not plan on being lucky. You do not plan on being successful.
You just do a good job, and plan for all kinds of problems.

Do that right, and you just might get lucky and be successful.

How to bake bread

Tips for people like me who are new too cooking, and always get confused -
  • Tea spoon is the small one and table spoon is the big one. 
  • Remember to set the alarm every time you need to keep something aside for 15 minutes or half an hour.
  • Clean the bowls and pans as soon as you are done with them, cleaning them later when the dough has hardened is a big pain.
Stuff you need:
  • Flour
  • Yeast
  • Milk powder or milk
  • Oil or butter
  • A pan to bake bread in 
  • An oven
  • Warm water
  • Bowl
  • Table spoon
  • Tea spoon
  • Clean cloths
  • A nice warm place where the yeast can grow

Take a bowl and add two tea spoons of yeast, and a bit for luck. Add two table spoons of sugar and one tablespoon of milk powder (or two table spoons of milk), to feed the yeast.

If you are lucky enough to have 24 hours hot water at home, open the hot water tap, and wait until the water stays hot, then open the cold water tap, and make the water slightly warm to touch. Otherwise, find a way to make warm water. Make sure its not hot, or the yeast will die, and you'll end up making some terrible chapathis!

If you have a measuring jar, add one cup of water, if not, add a glass of water.
Mix well, until there are no clumps of yeast around.

Cover the bowl with a cloth and keep aside in a warm place for 15 minutes. When you take it out, you should see a frothy mixture and it should smell of yeast.

Add two tablespoons of salt and one table spoon of oil and mix well. Then add in maida or wheat flour and mix until it stops sticking to the bowl, but it still sticks to your hand. If that doesn't make sense, well, just don't make it too dry. You'll figure it out by the time you bake a few times.

Cover the bowl and with a cloth and keep it in a warm place for another half an hour.

Take a bread baking pan and spread oil on it. Transfer the dough from the bowl to this pan, cover with a cloth and keep aside for another half an hour. If you don't have a pan, don't worry, just oil a plate and use it. It won't be shaped like the shop bread, but it will taste the same.

20 minutes later, turn on the oven to Bake, and set it to 180 degerees Celcius.

10 minutes after that, take the pan with the dough and put it in the oven. You should start getting the sweet aroma of a bakery around 5 minutes later.

Wait for half an hour. Have a nice plastic or wooden spoon ready to help you scoop out the bread.

Take out the bread and turn it around, knock on it a few times and make sure it sounds hollow. If it doesn't, it needs more baking.

Cover the hot bread in a cloth and keep it till it cools. And if like me, you can't resist, every once in a way, cut out a slice and help yourself to it.

Friday, June 13, 2014

Good old Perl

What is Perl used for?

Testing, Web Applications, BioPerl.


Because it has always been used for them.

How are most Perl web applications  run?

Mod Perl.

How long more with this continue?

As long as possible. Probably many years into the future....

Where is Perl used for Web Applications and Testing? 

In the enterprise. A lot of HTML developers may have learnt PHP, and made it more popular than Perl. But for real projects, in large corporations, the choice was Perl.

What does an enterprise want?


This is where Perl shines. It has proven itself many times over.

Companies will keep their existing applications running without change for as long as they can. If they have existing frameworks, they will continue using them for new applications. If they can copy and paste existing code, and use it in a new appliction, they will. A new technology will only be considered if it provides a compelling advantage, generally in terms of money. 

If a company has an existing framework, and does decide to use a new language or framework, then they have to start supporting two frameworks, because they are never going to have the time to translate all the existing applications to the new one. Having to support two or more frameworks or languages is bad, because it leads to increased team size, support and training costs.

So, what should Perl do?

Learn about, support, and train people in the technologies used in the enterprise. And if that means supporting Red Hat Linux, Perl 5.8 and mod_perl, then so be it. 

Continue doing that, and the next enterprise application could well be written with Dancer or Mojolicious, while reusing the existing Perl modules at that company.